[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mozilla-patches
Subject:    Partial Patch for Mozilla on AIX 4.2
From:       Wan-Teh Chang <wtc () netscape ! com>
Date:       1998-06-16 23:45:49
[Download RAW message or body]

Attached is a patch file that you can apply to the Mozilla source
code to build on AIX 4.2.  However, the output of the build doesn't run.

The reason is that Mozilla needs to use a modified ("rtl enabled")
version of libc.a, but I haven't figured out how to do that.
The rtl-enabled libc.a is produced by the mozilla/nsprpub module
in the directory mozilla/dist/AIX4.2_DBG.OBJ/lib.

Wan-Teh

["diff.mozilla" (text/plain)]

Index: mozilla/cmd/xfe/Makefile
===================================================================
RCS file: /m/pub/mozilla/cmd/xfe/Makefile,v
retrieving revision 3.18
diff -c -r3.18 Makefile
*** Makefile	1998/06/10 00:34:04	3.18
--- Makefile	1998/06/16 19:25:20
***************
*** 202,208 ****
  XFE_WIDGETS_LIB		= $(DIST)/lib/libXfeWidgets.a
  XFE_WIDGETS_BM_LIB	= $(DIST)/lib/libXfeBm.a
  
! ifeq ($(OS_ARCH),AIX)
  NSPR_LIB	= 
  else
  NSPR_LIB	= $(DIST)/lib/libplds21.a $(DIST)/lib/libplc21.a $(DIST)/lib/libmsgc21.a \
                $(DIST)/lib/libnspr21.a
--- 202,208 ----
  XFE_WIDGETS_LIB		= $(DIST)/lib/libXfeWidgets.a
  XFE_WIDGETS_BM_LIB	= $(DIST)/lib/libXfeBm.a
  
! ifeq ($(OS_ARCH)$(OS_RELEASE),AIX4.1)
  NSPR_LIB	= 
  else
  NSPR_LIB	= $(DIST)/lib/libplds21.a $(DIST)/lib/libplc21.a $(DIST)/lib/libmsgc21.a \
                $(DIST)/lib/libnspr21.a
***************
*** 503,509 ****
  # Only IRIX 5.x uses this.
  EXTRA_POST_LINK_CMD	= echo
  
! EXPORT_LDFLAGS	= $(BASIC_LIBS) $(EXPORT_LIB) $(BASIC_LIBS_2) $(OTHER_LIBS) \
$(NSPR_LIB)  EXPORT_DEPLIBS	= $(BASIC_LIBS) $(EXPORT_LIB) $(BASIC_LIBS_2) $(NSPR_LIB)
  
  DSO_EX_LIBS	= $(EXPORT_LDFLAGS:$(DIST)/lib/lib%.a=-l%)
--- 503,509 ----
  # Only IRIX 5.x uses this.
  EXTRA_POST_LINK_CMD	= echo
  
! EXPORT_LDFLAGS	= $(BASIC_LIBS) $(EXPORT_LIB) $(BASIC_LIBS_2) $(NSPR_LIB) \
$(OTHER_LIBS)  EXPORT_DEPLIBS	= $(BASIC_LIBS) $(EXPORT_LIB) $(BASIC_LIBS_2) \
$(NSPR_LIB)  
  DSO_EX_LIBS	= $(EXPORT_LDFLAGS:$(DIST)/lib/lib%.a=-l%)
***************
*** 516,524 ****
  ########################################
  # IBM Machines
  ifeq ($(OS_ARCH),AIX)
! CCLD		= svxlC -+
  #LDFLAGS		= -bGhooksyslibs -bGlibpathexec -bGnoproc
! LDFLAGS		=  -bGnoproc
  OTHER_LIBS	= $(MOTIFLIB) -lXt -lXmu -lX11 $(OS_LIBS)
  US_LDFLAGS	+= $(AIX_NSPR_LINK)
  EXPORT_LDFLAGS	+= $(AIX_NSPR_LINK)
--- 516,524 ----
  ########################################
  # IBM Machines
  ifeq ($(OS_ARCH),AIX)
! CCLD		= xlC
  #LDFLAGS		= -bGhooksyslibs -bGlibpathexec -bGnoproc
! #LDFLAGS		=  -bGnoproc
  OTHER_LIBS	= $(MOTIFLIB) -lXt -lXmu -lX11 $(OS_LIBS)
  US_LDFLAGS	+= $(AIX_NSPR_LINK)
  EXPORT_LDFLAGS	+= $(AIX_NSPR_LINK)
Index: mozilla/cmd/xfe/mozilla.c
===================================================================
RCS file: /m/pub/mozilla/cmd/xfe/mozilla.c,v
retrieving revision 3.10
diff -c -r3.10 mozilla.c
*** mozilla.c	1998/06/07 09:02:20	3.10
--- mozilla.c	1998/06/16 19:25:20
***************
*** 1897,1903 ****
  	strcat (buf, "BSD/386");
  #elif defined(__osf__)
  	strcat (buf, "OSF1");
! #elif defined(AIXV3)
  	strcat (buf, "AIX");
  #elif defined(_HPUX_SOURCE)
  	strcat (buf, "HP-UX");
--- 1897,1903 ----
  	strcat (buf, "BSD/386");
  #elif defined(__osf__)
  	strcat (buf, "OSF1");
! #elif defined(AIX)
  	strcat (buf, "AIX");
  #elif defined(_HPUX_SOURCE)
  	strcat (buf, "HP-UX");
Index: mozilla/cmd/xfe/XfeWidgets/Xfe/Pane.c
===================================================================
RCS file: /m/pub/mozilla/cmd/xfe/XfeWidgets/Xfe/Pane.c,v
retrieving revision 3.3
diff -c -r3.3 Pane.c
*** Pane.c	1998/06/04 08:50:26	3.3
--- Pane.c	1998/06/16 19:25:21
***************
*** 1630,1636 ****
  		width -= _XfeWidth(right);
  	}
  
! #ifdef 0
  	/* Child */
  	if (child == sp->child_two)
  		printf("child_two(new y pos = %d\n",y);
--- 1630,1636 ----
  		width -= _XfeWidth(right);
  	}
  
! #if 0
  	/* Child */
  	if (child == sp->child_two)
  		printf("child_two(new y pos = %d\n",y);
Index: mozilla/cmd/xfe/src/DragDrop.cpp
===================================================================
RCS file: /m/pub/mozilla/cmd/xfe/src/DragDrop.cpp,v
retrieving revision 3.2
diff -c -r3.2 DragDrop.cpp
*** DragDrop.cpp	1998/05/14 20:32:03	3.2
--- DragDrop.cpp	1998/06/16 19:25:21
***************
*** 47,53 ****
  #include "DragDrop.h"
  #include <Xm/DisplayP.h>
  
! #if defined(SOLARIS)||defined(AIX)||defined(UNIXWARE)
  extern "C" int gethostname(char *, int);
  #endif
  
--- 47,53 ----
  #include "DragDrop.h"
  #include <Xm/DisplayP.h>
  
! #if defined(SOLARIS)||defined(AIXV3)||defined(UNIXWARE)
  extern "C" int gethostname(char *, int);
  #endif
  
Index: mozilla/config/AIX.mk
===================================================================
RCS file: /m/pub/mozilla/config/AIX.mk,v
retrieving revision 3.1
diff -c -r3.1 AIX.mk
*** AIX.mk	1998/03/28 03:27:24	3.1
--- AIX.mk	1998/06/16 19:25:21
***************
*** 79,88 ****
  AIX_NSPR_DIST_LINK	= -L$(DIST)/bin -lnspr_shr \
-blibpath:.:../dist/$(OBJDIR)/bin:../../dist/$(OBJDIR)/bin:../../../dist/$(OBJDIR)/bin:/usr/lib:/lib
  endif
  ifneq (,$(filter 4.2 4.3,$(OS_RELEASE)))
! PORT_FLAGS		+= -DHW_THREADS -DUSE_PTHREADS -DPOSIX7
  OS_LIBS			+= -ldl 
  MKSHLIB			= $(LD) $(DSO_LDOPTS)
! DSO_LDOPTS		= -brtl -bM:SRE -bnoentry -bexpall
  ifeq ($(OS_RELEASE),4.2)
  PLATFORM_FLAGS		+= -DAIX4_2
  endif
--- 79,88 ----
  AIX_NSPR_DIST_LINK	= -L$(DIST)/bin -lnspr_shr \
-blibpath:.:../dist/$(OBJDIR)/bin:../../dist/$(OBJDIR)/bin:../../../dist/$(OBJDIR)/bin:/usr/lib:/lib
  endif
  ifneq (,$(filter 4.2 4.3,$(OS_RELEASE)))
! PORT_FLAGS		+= -DSW_THREADS
  OS_LIBS			+= -ldl 
  MKSHLIB			= $(LD) $(DSO_LDOPTS)
! DSO_LDOPTS		= -brtl -bM:SRE -bnoentry -bexpall -berok
  ifeq ($(OS_RELEASE),4.2)
  PLATFORM_FLAGS		+= -DAIX4_2
  endif
***************
*** 96,102 ****
  ######################################################################
  
  CC			= cc
! CCC			= xlC -+
  BSDECHO			= $(DIST)/bin/bsdecho
  RANLIB			= /usr/ccs/bin/ranlib
  WHOAMI			= /bin/whoami
--- 96,102 ----
  ######################################################################
  
  CC			= cc
! CCC			= xlC
  BSDECHO			= $(DIST)/bin/bsdecho
  RANLIB			= /usr/ccs/bin/ranlib
  WHOAMI			= /bin/whoami
Index: mozilla/include/mcom_db.h
===================================================================
RCS file: /m/pub/mozilla/include/mcom_db.h,v
retrieving revision 3.2
diff -c -r3.2 mcom_db.h
*** mcom_db.h	1998/04/14 00:24:56	3.2
--- mcom_db.h	1998/06/16 19:25:21
***************
*** 431,437 ****
  #define LITTLE_ENDIAN   1234            /* LSB first: i386, vax, all NT risc */
  #endif
  
! #if defined(AIXV3)
  /* BYTE_ORDER, LITTLE_ENDIAN, BIG_ENDIAN are all defined here */
  #include <sys/machine.h>
  #endif
--- 431,437 ----
  #define LITTLE_ENDIAN   1234            /* LSB first: i386, vax, all NT risc */
  #endif
  
! #if defined(AIX)
  /* BYTE_ORDER, LITTLE_ENDIAN, BIG_ENDIAN are all defined here */
  #include <sys/machine.h>
  #endif
Index: mozilla/include/msgcom.h
===================================================================
RCS file: /m/pub/mozilla/include/msgcom.h,v
retrieving revision 3.1
diff -c -r3.1 msgcom.h
*** msgcom.h	1998/03/28 03:28:03	3.1
--- msgcom.h	1998/06/16 19:25:21
***************
*** 2011,2017 ****
  {	MSG_Drag_Not_Allowed	= 0x00000000
  ,	MSG_Require_Copy		= 0x00000001
  ,	MSG_Require_Move		= 0x00000002
! ,	MSG_Default_Drag		= 0xFFFFFFFF
  } MSG_DragEffect;
  
  /* Status calls.
--- 2011,2017 ----
  {	MSG_Drag_Not_Allowed	= 0x00000000
  ,	MSG_Require_Copy		= 0x00000001
  ,	MSG_Require_Move		= 0x00000002
! ,	MSG_Default_Drag		= -1
  } MSG_DragEffect;
  
  /* Status calls.
Index: mozilla/js/ref/prtime.c
===================================================================
RCS file: /m/pub/mozilla/js/ref/prtime.c,v
retrieving revision 1.4
diff -c -r1.4 prtime.c
*** prtime.c	1998/05/01 07:06:11	1.4
--- prtime.c	1998/06/16 19:25:21
***************
*** 361,367 ****
      int64  maxtimet;
      struct tm tm;
      PRTime prtm;
! #if defined( XP_PC ) || defined( FREEBSD ) || defined ( HPUX9 ) || defined ( SNI )
      struct tm *ptm;
  #endif
  
--- 361,367 ----
      int64  maxtimet;
      struct tm tm;
      PRTime prtm;
! #if defined( XP_PC ) || defined( FREEBSD ) || defined ( HPUX9 ) || defined ( SNI ) \
|| (defined(AIX) && !defined(_THREAD_SAFE))  struct tm *ptm;
  #endif
  
***************
*** 379,385 ****
      }
      LL_L2UI(local,time);
      PR_basetime(time,&prtm);
! #if defined( XP_PC ) || defined( FREEBSD ) || defined ( HPUX9 ) || defined ( SNI )
      ptm = localtime(&local);
      if (!ptm)
  	return LL_ZERO;
--- 379,385 ----
      }
      LL_L2UI(local,time);
      PR_basetime(time,&prtm);
! #if defined( XP_PC ) || defined( FREEBSD ) || defined ( HPUX9 ) || defined ( SNI ) \
|| (defined(AIX) && !defined(_THREAD_SAFE))  ptm = localtime(&local);
      if (!ptm)
  	return LL_ZERO;
Index: mozilla/js/src/prmjtime.c
===================================================================
RCS file: /m/pub/mozilla/js/src/prmjtime.c,v
retrieving revision 3.8
diff -c -r3.8 prmjtime.c
*** prmjtime.c	1998/05/21 22:41:18	3.8
--- prmjtime.c	1998/06/16 19:25:22
***************
*** 289,295 ****
      PRInt64  maxtimet;
      struct tm tm;
      PRMJTime prtm;
! #if defined( XP_PC ) || defined( FREEBSD ) || defined ( HPUX9 ) || defined ( SNI )
      struct tm *ptm;
  #endif
  
--- 289,295 ----
      PRInt64  maxtimet;
      struct tm tm;
      PRMJTime prtm;
! #if defined( XP_PC ) || defined( FREEBSD ) || defined ( HPUX9 ) || defined ( SNI ) \
|| (defined(AIX) && !defined(_THREAD_SAFE))  struct tm *ptm;
  #endif
  
***************
*** 308,314 ****
      }
      LL_L2UI(local,time);
      PRMJ_basetime(time,&prtm);
! #if defined( XP_PC ) || defined( FREEBSD ) || defined ( HPUX9 ) || defined ( SNI )
      ptm = localtime(&local);
      if(!ptm){
        return LL_ZERO;
--- 308,314 ----
      }
      LL_L2UI(local,time);
      PRMJ_basetime(time,&prtm);
! #if defined( XP_PC ) || defined( FREEBSD ) || defined ( HPUX9 ) || defined ( SNI ) \
|| (defined(AIX) && !defined(_THREAD_SAFE))  ptm = localtime(&local);
      if(!ptm){
        return LL_ZERO;
Index: mozilla/modules/libpref/src/prefapi.c
===================================================================
RCS file: /m/pub/mozilla/modules/libpref/src/prefapi.c,v
retrieving revision 3.1
diff -c -r3.1 prefapi.c
*** prefapi.c	1998/03/28 03:35:10	3.1
--- prefapi.c	1998/06/16 19:25:22
***************
*** 121,127 ****
  	}
  
      if (flag == HT_FREE_ENTRY) {
! 		XP_FREEIF((void *)he->key);
          XP_FREE(he);
  	}
  }
--- 121,130 ----
  	}
  
      if (flag == HT_FREE_ENTRY) {
!         if (he->key) {
!             XP_FREE((void *)he->key); /* cast away the 'const' */
!             he->key = NULL;
!         }
          XP_FREE(he);
  	}
  }
Index: mozilla/modules/rdf/src/glue.h
===================================================================
RCS file: /m/pub/mozilla/modules/rdf/src/glue.h,v
retrieving revision 3.3
diff -c -r3.3 glue.h
*** glue.h	1998/05/02 01:28:02	3.3
--- glue.h	1998/06/16 19:25:22
***************
*** 33,39 ****
  #endif
  
  #ifdef XP_UNIX
! #include <sys/fcntl.h>
  #elif defined(XP_MAC)
  #include <fcntl.h>
  #endif
--- 33,39 ----
  #endif
  
  #ifdef XP_UNIX
! #include <fcntl.h>
  #elif defined(XP_MAC)
  #include <fcntl.h>
  #endif
Index: mozilla/modules/xml/glue/xmlglue.h
===================================================================
RCS file: /m/pub/mozilla/modules/xml/glue/xmlglue.h,v
retrieving revision 1.6
diff -c -r1.6 xmlglue.h
*** xmlglue.h	1998/05/28 20:10:18	1.6
--- xmlglue.h	1998/06/16 19:25:23
***************
*** 41,47 ****
  #endif
  
  #ifdef XP_UNIX
! #include <sys/fcntl.h>
  #elif defined(XP_MAC)
  #include <fcntl.h>
  #endif
--- 41,47 ----
  #endif
  
  #ifdef XP_UNIX
! #include <fcntl.h>
  #elif defined(XP_MAC)
  #include <fcntl.h>
  #endif
Index: mozilla/network/main/mkconect.c
===================================================================
RCS file: /m/pub/mozilla/network/main/mkconect.c,v
retrieving revision 1.6
diff -c -r1.6 mkconect.c
*** mkconect.c	1998/06/04 06:51:04	1.6
--- mkconect.c	1998/06/16 19:25:23
***************
*** 81,87 ****
  
  #include <resolv.h>
  
! #if !defined(__osf__) && !defined(AIXV3) && !defined(_HPUX_SOURCE) && \
!defined(__386BSD__) && !defined(__linux) && !defined(SCO_SV)  #include <sys/filio.h>
  #endif
  
--- 81,87 ----
  
  #include <resolv.h>
  
! #if !defined(__osf__) && !defined(AIX) && !defined(_HPUX_SOURCE) && \
!defined(__386BSD__) && !defined(__linux) && !defined(SCO_SV)  #include <sys/filio.h>
  #endif
  
Index: mozilla/network/main/mksockrw.c
===================================================================
RCS file: /m/pub/mozilla/network/main/mksockrw.c,v
retrieving revision 1.3
diff -c -r1.3 mksockrw.c
*** mksockrw.c	1998/05/28 00:17:23	1.3
--- mksockrw.c	1998/06/16 19:25:23
***************
*** 47,53 ****
  
  #include <resolv.h>
  
! #if !defined(__osf__) && !defined(AIXV3) && !defined(_HPUX_SOURCE) && \
!defined(__386BSD__) && !defined(__linux) && !defined(SCO_SV)  #include <sys/filio.h>
  #endif
  
--- 47,53 ----
  
  #include <resolv.h>
  
! #if !defined(__osf__) && !defined(AIX) && !defined(_HPUX_SOURCE) && \
!defined(__386BSD__) && !defined(__linux) && !defined(SCO_SV)  #include <sys/filio.h>
  #endif
  
Index: mozilla/network/protocol/ftp/mkftp.c
===================================================================
RCS file: /m/pub/mozilla/network/protocol/ftp/mkftp.c,v
retrieving revision 1.9
diff -c -r1.9 mkftp.c
*** mkftp.c	1998/06/11 23:36:55	1.9
--- mkftp.c	1998/06/16 19:25:23
***************
*** 60,66 ****
  #endif /* XP_OS2 */
  
  #ifdef XP_UNIX
! #if !defined(__osf__) && !defined(AIXV3) && !defined(_HPUX_SOURCE) && \
!defined(__386BSD__) && !defined(__linux) && !defined(SCO_SV)  #include <sys/filio.h>
  #endif
  #endif /* XP_UNIX */ 
--- 60,66 ----
  #endif /* XP_OS2 */
  
  #ifdef XP_UNIX
! #if !defined(__osf__) && !defined(AIX) && !defined(_HPUX_SOURCE) && \
!defined(__386BSD__) && !defined(__linux) && !defined(SCO_SV)  #include <sys/filio.h>
  #endif
  #endif /* XP_UNIX */ 
Index: mozilla/xpcom/src/nsRepository.cpp
===================================================================
RCS file: /m/pub/mozilla/xpcom/src/nsRepository.cpp,v
retrieving revision 3.4
diff -c -r3.4 nsRepository.cpp
*** nsRepository.cpp	1998/06/02 19:54:52	3.4
--- nsRepository.cpp	1998/06/16 19:25:24
***************
*** 25,32 ****
  #include "prlink.h"
  #include "nsRepository.h"
  #ifdef USE_NSREG
! #define XP_BEGIN_PROTOS extern "C" {
! #define XP_END_PROTOS };
  #include "NSReg.h"
  #endif
  
--- 25,31 ----
  #include "prlink.h"
  #include "nsRepository.h"
  #ifdef USE_NSREG
! #include "xp_core.h"
  #include "NSReg.h"
  #endif
  



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic