--- mozilla.orig/security/coreconf/Linux.mk 2004-02-10 20:33:51.000000000 -0600 +++ mozilla/security/coreconf/Linux.mk 2005-04-01 22:41:04.000000000 -0600 @@ -54,6 +54,10 @@ OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE CPU_ARCH = m68k else +ifeq ($(OS_TEST),ppc64) + OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE + CPU_ARCH = ppc64 +else ifeq ($(OS_TEST),ppc) OS_REL_CFLAGS = -DLINUX1_2 -D_XOPEN_SOURCE CPU_ARCH = ppc @@ -117,6 +121,7 @@ endif endif endif +endif LIBC_TAG = _glibc @@ -138,7 +143,7 @@ OS_PTHREAD = -lpthread endif -OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe -DLINUX -Dlinux -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR +OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -pipe -DLINUX -Dlinux -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR OS_LIBS = -L/lib $(OS_PTHREAD) -ldl -lc ifdef USE_PTHREADS --- mozilla.orig/nsprpub/pr/src/io/prprf.c 2004-03-08 21:18:19.000000000 -0600 +++ mozilla/nsprpub/pr/src/io/prprf.c 2005-04-16 13:18:10.000000000 -0500 @@ -51,7 +51,8 @@ ** Note: on some platforms va_list is defined as an array, ** and requires array notation. */ -#if (defined(LINUX) && defined(__x86_64__)) +#if (defined(LINUX) && defined(__x86_64__)) || \ + (defined(LINUX) && defined(__powerpc64__)) #define VARARGS_ASSIGN(foo, bar) __va_copy((foo), (bar)) #elif (defined(LINUX) && defined(__powerpc__)) || \ (defined(LINUX) && defined(__s390__)) || \ diff -uNr mozilla.orig/nsprpub/pr/include/md/_linux.cfg mozilla/nsprpub/pr/include/md/_linux.cfg --- mozilla.orig/nsprpub/pr/include/md/_linux.cfg 2004-03-08 21:18:20.000000000 -0600 +++ mozilla/nsprpub/pr/include/md/_linux.cfg 2005-04-16 13:02:50.000000000 -0500 @@ -45,7 +45,52 @@ #define PR_AF_INET6 10 /* same as AF_INET6 */ -#ifdef __powerpc__ +#ifdef __powerpc64__ + +#undef IS_LITTLE_ENDIAN +#define IS_BIG_ENDIAN 1 +#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_ALIGN_OF_WORD 8 +#define PR_BYTES_PER_WORD_LOG2 3 +#define PR_BYTES_PER_DWORD_LOG2 3 + +#elif defined(__powerpc__) #undef IS_LITTLE_ENDIAN #define IS_BIG_ENDIAN 1 diff -uNr mozilla.orig/nsprpub/pr/include/md/_linux.h mozilla/nsprpub/pr/include/md/_linux.h --- mozilla.orig/nsprpub/pr/include/md/_linux.h 2004-03-08 21:18:20.000000000 -0600 +++ mozilla/nsprpub/pr/include/md/_linux.h 2005-04-16 13:03:27.000000000 -0500 @@ -43,7 +43,9 @@ #define PR_LINKER_ARCH "linux" #define _PR_SI_SYSNAME "LINUX" -#ifdef __powerpc__ +#ifdef __powerpc64__ +#define _PR_SI_ARCHITECTURE "ppc64" +#elif defined(__powerpc__) #define _PR_SI_ARCHITECTURE "ppc" #elif defined(__alpha) #define _PR_SI_ARCHITECTURE "alpha"