patch -p0 < firebird-0.7.diff setenv MOZ_PHOENIX 1 ../firebird-0.7/configure \ --disable-auto-deps \ --disable-bidi \ --disable-composer \ --disable-cpp-exceptions \ --disable-cpp-rtti \ --disable-debug \ --disable-dtd-debug \ --disable-freetypetest \ --disable-glibtest \ --disable-gtktest \ --disable-installer \ --disable-jsd \ --disable-ldap \ --disable-mailnews \ --disable-md \ --disable-oji \ --disable-pedantic \ --disable-plaintext-editor-only \ --disable-profilesharing \ --disable-shared \ --disable-svg \ --disable-tests \ --disable-xprint \ --disable-xterm-updates \ --enable-chrome-format=jar \ --enable-crypto \ --enable-default-toolkit=gtk \ --enable-double-buffer \ --enable-extensions=cookie,xml-rpc,xmlextras,p3p,pref,transformiix,universalchardet,typeaheadfind,webservices,inspector \ --enable-mathml \ --enable-static \ --enable-strip \ --enable-xinerama \ --prefix=/usr/X11R6 \ --with-pthreads \ --with-system-jpeg=/usr/local \ --with-system-mng=/usr/local \ --with-system-png=/usr/local \ --with-system-zlib=/usr/lib \ --x-includes=/usr/X11R6/include \ --x-libraries=/usr/X11R6/lib gmake MOZ_PHOENIX=1 can't get xft to work; it's installed, but configure insists on using pkg-config to find it. had to remove /usr/include/freetype, /usr/include/freetype.h (freetype 1 vs 2) --- configure.orig Fri Aug 29 13:19:05 2003 +++ configure Fri Jan 30 11:38:31 2004 @@ -5338,14 +5338,22 @@ ;; *-openbsd*) + CFLAGS="$CFLAGS -fno-stack-protector" + CXXFLAGS="$CXXFLAGS -fno-stack-protector" DLL_SUFFIX=".so.1.0" DSO_CFLAGS='' DSO_PIC_CFLAGS='-fPIC' - DSO_LDOPTS='-shared -h $@' - MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@' - MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@' + DSO_LDOPTS='-shared' + MKSHLIB='$(CXX) $(DSO_LDOPTS) -o $@' + MKCSHLIB='$(CC) $(DSO_LDOPTS) -o $@' if $CC -E - -dM /dev/null; then - DSO_LDOPTS="-Bshareable /usr/lib/c++rt0.o" + case `uname -r` in + [01].* | 2.[[0-7]] | 2.[[0-7]].*) + DSO_LDOPTS="-Bshareable /usr/lib/c++rt0.o" + MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@' + MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@' + ;; + esac fi if test "$LIBRUNPATH"; then DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS" @@ -8558,9 +8566,8 @@ EOF if test "$ac_cv_have_dash_pthread" = "yes"; then - _PTHREAD_LDFLAGS="" - else - _PTHREAD_LDFLAGS="-lc_r" + _PTHREAD_LDFLAGS="-pthread" + LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}" fi ;; @@ -11454,39 +11461,9 @@ echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - echo $ac_n "checking for xft""... $ac_c" 1>&6 -echo "configure:11461: checking for xft" >&5 - - if $PKG_CONFIG --exists "xft" ; then - echo "$ac_t""yes" 1>&6 - succeeded=yes - - echo $ac_n "checking MOZ_XFT_CFLAGS""... $ac_c" 1>&6 -echo "configure:11468: checking MOZ_XFT_CFLAGS" >&5 - MOZ_XFT_CFLAGS=`$PKG_CONFIG --cflags "xft"` - echo "$ac_t""$MOZ_XFT_CFLAGS" 1>&6 - - echo $ac_n "checking MOZ_XFT_LIBS""... $ac_c" 1>&6 -echo "configure:11473: checking MOZ_XFT_LIBS" >&5 - MOZ_XFT_LIBS=`$PKG_CONFIG --libs "xft"` - echo "$ac_t""$MOZ_XFT_LIBS" 1>&6 - else - MOZ_XFT_CFLAGS="" - MOZ_XFT_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - MOZ_XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft"` - echo $MOZ_XFT_PKG_ERRORS - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi + succeeded=yes + MOZ_XFT_CFLAGS="-I/usr/X11R6/include -I/usr/local/include/freetype2 -I/usr/local/include" + MOZ_XFT_LIBS="-L/usr/X11R6/lib -L/usr/local/lib -lXft -lfreetype -lz -lXrender -lXext -lX11 -lfontconfig" fi if test $succeeded = yes; then --- nsprpub/configure.orig Fri Aug 29 20:18:12 2003 +++ nsprpub/configure Thu Jan 29 17:16:50 2004 @@ -5213,7 +5213,8 @@ case "$target" in *-solaris*) if test "$ac_cv_have_dash_pthreads" = "yes"; then - _PTHREAD_LDFLAGS= + _PTHREAD_LDFLAGS=-pthread + LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}" fi ;; *-freebsd*) --- nsprpub/pr/include/md/_openbsd.cfg.orig Tue Jun 20 17:23:14 2000 +++ nsprpub/pr/include/md/_openbsd.cfg Tue Jan 27 14:21:05 2004 @@ -91,9 +91,9 @@ #define PR_ALIGN_OF_DOUBLE 4 #define PR_ALIGN_OF_POINTER 4 -#elif defined(__sparc__) +#elif defined(__sparc__) && !defined(__sparc_v9__) -#undef IS_LITTLE_ENDIAN 1 +#undef IS_LITTLE_ENDIAN #define IS_BIG_ENDIAN 1 #define HAVE_LONG_LONG #define HAVE_ALIGNED_DOUBLES @@ -143,6 +143,53 @@ #define HAVE_LONG_LONG #define HAVE_ALIGNED_DOUBLES #define HAVE_ALIGNED_LONGLONGS +#define IS_64 + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 8 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 8 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 64 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 64 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 6 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 6 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 8 +#define PR_ALIGN_OF_INT64 8 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 8 +#define PR_ALIGN_OF_POINTER 8 + +#define PR_BYTES_PER_WORD_LOG2 3 +#define PR_BYTES_PER_DWORD_LOG2 3 + +#elif defined(__sparc_v9__) +#undef IS_LITTLE_ENDIAN +#define IS_BIG_ENDIAN 1 +#define HAVE_LONG_LONG +#define HAVE_ALIGNED_DOUBLES +#define HAVE_ALIGNED_LONGLONGS #define IS_64 #define PR_BYTES_PER_BYTE 1 --- nsprpub/pr/include/md/_pth.h.orig Tue Jan 7 10:29:57 2003 +++ nsprpub/pr/include/md/_pth.h Tue Jan 27 14:21:05 2004 @@ -248,7 +248,10 @@ */ #define PT_PRIO_MIN 1 #define PT_PRIO_MAX 127 -#elif defined(NETBSD) || defined(OPENBSD) \ +#elif defined(OPENBSD) +#define PT_PRIO_MIN 0 +#define PT_PRIO_MAX 31 +#elif defined(NETBSD) \ || defined(BSDI) || defined(DARWIN) || defined(UNIXWARE) /* XXX */ #define PT_PRIO_MIN 0 #define PT_PRIO_MAX 126 --- nsprpub/pr/src/linking/prlink.c.orig Tue Mar 25 20:36:09 2003 +++ nsprpub/pr/src/linking/prlink.c Tue Jan 27 14:21:05 2004 @@ -162,8 +162,8 @@ * On these platforms, symbols have a leading '_'. */ #if defined(SUNOS4) || defined(DARWIN) || defined(NEXTSTEP) \ - || defined(OPENBSD) || defined(WIN16) \ - || (defined(NETBSD) && !defined(__ELF__)) + || defined(WIN16) \ + || ((defined(OPENBSD) || defined(NETBSD)) && !defined(__ELF__)) #define NEED_LEADING_UNDERSCORE #endif --- nsprpub/pr/src/md/unix/unix.c.orig Wed Dec 11 19:19:57 2002 +++ nsprpub/pr/src/md/unix/unix.c Wed Jan 28 17:37:31 2004 @@ -65,7 +65,8 @@ * PRInt32* pointer to a _PRSockLen_t* pointer. */ #if defined(HAVE_SOCKLEN_T) \ - || (defined(LINUX) && defined(__GLIBC__) && __GLIBC__ >= 2) + || (defined(LINUX) && defined(__GLIBC__) && __GLIBC__ >= 2) \ + || defined(FREEBSD) #define _PRSockLen_t socklen_t #elif defined(IRIX) || defined(HPUX) || defined(OSF1) || defined(SOLARIS) \ || defined(AIX4_1) || defined(LINUX) || defined(SONY) \ @@ -73,7 +74,7 @@ || defined(SUNOS4) || defined(NCR) || defined(DARWIN) \ || defined(NEXTSTEP) || defined(QNX) #define _PRSockLen_t int -#elif (defined(AIX) && !defined(AIX4_1)) || defined(FREEBSD) \ +#elif (defined(AIX) && !defined(AIX4_1)) \ || defined(NETBSD) || defined(OPENBSD) || defined(UNIXWARE) \ || defined(DGUX) || defined(VMS) || defined(NTO) #define _PRSockLen_t size_t --- nsprpub/pr/src/misc/prinit.c.orig Mon Jan 20 15:13:09 2003 +++ nsprpub/pr/src/misc/prinit.c Thu Jan 29 17:20:26 2004 @@ -430,6 +430,12 @@ _PR_LogCleanup(); /* + * accesses the current thread + */ + _PR_CleanupNet(); + _PR_CleanupIO(); + + /* * This part should look like the end of _PR_NativeRunThread * and _PR_UserRunThread. */ @@ -441,6 +447,7 @@ PR_DELETE(me->stack); PR_DELETE(me); } + _PR_MD_SET_CURRENT_THREAD(NULL); /* * XXX: We are freeing the heap memory here so that Purify won't @@ -449,8 +456,6 @@ * Ideally, for each _PR_InitXXX(), there should be a corresponding * _PR_XXXCleanup() that we can call here. */ - _PR_CleanupNet(); - _PR_CleanupIO(); #ifdef WINNT _PR_CleanupCPUs(); #endif --- nsprpub/pr/src/misc/prnetdb.c.orig Tue Apr 29 20:36:39 2003 +++ nsprpub/pr/src/misc/prnetdb.c Tue Jan 27 14:21:05 2004 @@ -321,7 +321,7 @@ } #elif (defined(DARWIN) && defined(HAVE_GETIFADDRS)) || defined(FREEBSD) \ - || defined(NETBSD) + || defined(NETBSD) || defined(OPENBSD) /* * Use the BSD getifaddrs function. --- nsprpub/pr/src/misc/prtime.c.orig Wed Feb 26 19:01:02 2003 +++ nsprpub/pr/src/misc/prtime.c Wed Jan 28 17:28:28 2004 @@ -1666,7 +1666,7 @@ */ #if defined(SUNOS4) || (__GLIBC__ >= 2) || defined(XP_BEOS) \ - || defined(NETBSD) + || defined(NETBSD) || defined(__FreeBSD__) || defined(OPENBSD) a.tm_zone = NULL; a.tm_gmtoff = tm->tm_params.tp_gmt_offset + tm->tm_params.tp_dst_offset; #endif --- nsprpub/pr/src/pthreads/ptio.c.orig Mon Jul 14 17:59:47 2003 +++ nsprpub/pr/src/pthreads/ptio.c Wed Jan 28 17:33:24 2004 @@ -189,7 +189,7 @@ #endif #endif -#ifdef DARWIN +#if defined(DARWIN) || defined(FREEBSD) static PRBool _pr_ipv6_v6only_on_by_default; /* The IPV6_V6ONLY socket option is not defined on Mac OS X 10.1. */ #ifndef IPV6_V6ONLY @@ -1154,7 +1154,7 @@ _pr_stderr = pt_SetMethods(2, PR_DESC_FILE, PR_FALSE, PR_TRUE); PR_ASSERT(_pr_stdin && _pr_stdout && _pr_stderr); -#ifdef DARWIN +#if defined(DARWIN) || defined(FREEBSD) /* In Mac OS X v10.3 Panther Beta the IPV6_V6ONLY socket option * is turned on by default, contrary to what RFC 3493, Section * 5.3 says. So we have to turn it off. Find out whether we @@ -3462,7 +3462,7 @@ if (osfd == -1) pt_MapError(_PR_MD_MAP_SOCKET_ERROR, errno); else { -#ifdef DARWIN +#if defined(DARWIN) || defined(FREEBSD) if ((domain == AF_INET6) && _pr_ipv6_v6only_on_by_default) { int on = 0; --- security/coreconf/OpenBSD.mk.orig Fri May 17 23:24:14 2002 +++ security/coreconf/OpenBSD.mk Thu Jan 29 17:23:44 2004 @@ -46,6 +46,13 @@ CPU_ARCH = x86 endif +ifndef CLASSIC_NSPR +USE_PTHREADS = 1 +DEFINES += -D_THREAD_SAFE -pthread +OS_LIBS += -pthread +DSO_LDOPTS += -pthread +endif + DLL_SUFFIX = so.1.0 OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe -DOPENBSD @@ -55,7 +62,7 @@ ARCH = openbsd DSO_CFLAGS = -fPIC -DPIC -DSO_LDOPTS = -shared -Wl,-soname,lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) +DSO_LDOPTS = -shared -fPIC -Wl,-soname,lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) DSO_LDFLAGS = MKSHLIB = $(CC) $(DSO_LDOPTS) --- xpcom/io/nsNativeCharsetUtils.cpp.orig Wed Jul 30 01:58:28 2003 +++ xpcom/io/nsNativeCharsetUtils.cpp Thu Jan 29 17:24:29 2004 @@ -294,7 +294,11 @@ { const char *blank_list[] = { "", NULL }; const char **native_charset_list = blank_list; +#ifdef CODESET const char *native_charset = nl_langinfo(CODESET); +#else + const char *native_charset = nsnull; +#endif if (native_charset == nsnull) { NS_ERROR("native charset is unknown"); // fallback to ISO-8859-1 --- xpcom/sample/Makefile.in.orig Sun Jul 13 18:28:50 2003 +++ xpcom/sample/Makefile.in Thu Jan 29 17:25:23 2004 @@ -53,7 +53,7 @@ TESTCPPSRCS = nsTestSample.cpp -CPPSRCS += $(TESTCPPSRCS) +#CPPSRCS += $(TESTCPPSRCS) SIMPLE_PROGRAMS = $(TESTCPPSRCS:.cpp=$(BIN_SUFFIX))