🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.lib.bug
Article #314

patch for libg++-2.2 on NeXT 3.0 w/ gcc-2.3.1

#314
From: Thomas Neumann
Date: Wed, 04 Nov 1992 13:52
96 lines
3676 bytes
The following patch is necessary to compile libg++-2.2 using
gcc-2.3.1 on a NeXT running NeXTSTEP 3.0.

To apply this patch do the following:

	(1) unpack an _unmodified_ version of libg++-2.2
	(2) cd to the directory _above_ the libg++-2.2 distribution
	    directory
	(3) Apply the patch:
		patch -p0 < {THIS_FILE}
	(4) cd to the libg++ distribution directory
	(5) ./configure m68k-next-mach
	(6) make
	(7) make install

NOTE: If you do not plan to debug libg++ you may want to edit the
toplevel Makefile between steps (5) and (6) and set CFLAGS to -pipe -O
instead of -g .

The problems solved by this patch:

	(1) Add missing cast to (union wait *) in procbuf.C
	(2) Modify gen-params: stdarg.h is needed on NeXT 3.0
	(3) Do not compile strtod() in dtoa.C: NeXT has it already,
	    leaving it in will cause multiple defintion errors.

enjoy !


diff -r -C2 libg++-2.2-dist/libg++/iostream/dtoa.C libg++-2.2/libg++/iostream/dtoa.C
*** libg++-2.2-dist/libg++/iostream/dtoa.C	Fri Jun 26 20:24:05 1992
--- libg++-2.2/libg++/iostream/dtoa.C	Wed Nov  4 13:37:16 1992
***************
*** 1,3 ****
--- 1,4 ----
  #include <ioprivate.h>
+ 
  #ifdef USE_DTOA
  /****************************************************************
***************
*** 272,276 ****
--- 273,279 ----
  #define Kmax 15
  
+ #if !(defined(NeXT) && defined(m68k))
  extern "C" double strtod(const char *s00, char **se);
+ #endif
  extern "C" char *dtoa(double d, int mode, int ndigits,
                          int *decpt, int *sign, char **rve);
***************
*** 1119,1122 ****
--- 1122,1127 ----
  #endif
  
+ #if !(defined(NeXT) && defined(m68k))
+ 
   double
  strtod
***************
*** 1639,1642 ****
--- 1644,1649 ----
          return sign ? -rv : rv;
          }
+ #endif /* NeXT && m68k */
+ 
  
   static int
diff -r -C2 libg++-2.2-dist/libg++/iostream/procbuf.C libg++-2.2/libg++/iostream/procbuf.C
*** libg++-2.2-dist/libg++/iostream/procbuf.C	Sat Jun 20 07:39:38 1992
--- libg++-2.2/libg++/iostream/procbuf.C	Wed Nov  4 07:22:17 1992
***************
*** 89,93 ****
      void_func hupsave = (void_func)signal(SIGHUP, SIG_IGN);
  #endif
!     while ((wait_pid = wait(&wstatus)) != _pid && wait_pid != -1) { }
  #ifdef USE_SIGMASK
      (void) sigsetmask(mask);
--- 89,93 ----
      void_func hupsave = (void_func)signal(SIGHUP, SIG_IGN);
  #endif
!     while ((wait_pid = wait((union wait *)&wstatus)) != _pid && wait_pid != -1) { }
  #ifdef USE_SIGMASK
      (void) sigsetmask(mask);
diff -r -C2 libg++-2.2-dist/libg++/utils/gen-params libg++-2.2/libg++/utils/gen-params
*** libg++-2.2-dist/libg++/utils/gen-params	Fri Jun 26 20:29:41 1992
--- libg++-2.2/libg++/utils/gen-params	Wed Nov  4 12:48:50 1992
***************
*** 220,223 ****
--- 220,226 ----
  #include <stdarg.h>
  long foo(X_va_list ap) { return va_arg(ap, long); }
+ #if defined(NeXT) && defined(m68k)
+ blurfl /* cause compilation to fail -- we NEED stdarg.h on NeXT/68k */
+ #endif /* NeXT && m68k */
  long bar(int i, ...)
  { va_list ap; long j; va_start(ap, i); j = foo(ap); va_end(ap); return j; }
Technical Details
Message-ID: <TOM.92Nov4145218@smart.bo.open.de>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!smart.bo.open.DE!tom

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.lib.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!smart.bo.open.DE!tom
From: tom@smart.bo.open.DE (Thomas Neumann)
Subject: patch for libg++-2.2 on NeXT 3.0 w/ gcc-2.3.1
Message-ID: <TOM.92Nov4145218@smart.bo.open.de>
Sender: gnulists@ai.mit.edu
Organization: News at smart
Distribution: gnu
Date: Wed, 4 Nov 1992 13:52:18 GMT
Approved: bug-lib-g++@prep.ai.mit.edu
Lines: 97