home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / gnu / g / lib / bug / 580 next >
Encoding:
Text File  |  1992-11-07  |  3.5 KB  |  110 lines

  1. Newsgroups: gnu.g++.lib.bug
  2. Path: 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
  3. From: tom@smart.bo.open.DE (Thomas Neumann)
  4. Subject: patch for libg++-2.2 on NeXT 3.0 w/ gcc-2.3.1
  5. Message-ID: <TOM.92Nov4145218@smart.bo.open.de>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: News at smart
  8. Distribution: gnu
  9. Date: Wed, 4 Nov 1992 13:52:18 GMT
  10. Approved: bug-lib-g++@prep.ai.mit.edu
  11. Lines: 97
  12.  
  13. The following patch is necessary to compile libg++-2.2 using
  14. gcc-2.3.1 on a NeXT running NeXTSTEP 3.0.
  15.  
  16. To apply this patch do the following:
  17.  
  18.     (1) unpack an _unmodified_ version of libg++-2.2
  19.     (2) cd to the directory _above_ the libg++-2.2 distribution
  20.         directory
  21.     (3) Apply the patch:
  22.         patch -p0 < {THIS_FILE}
  23.     (4) cd to the libg++ distribution directory
  24.     (5) ./configure m68k-next-mach
  25.     (6) make
  26.     (7) make install
  27.  
  28. NOTE: If you do not plan to debug libg++ you may want to edit the
  29. toplevel Makefile between steps (5) and (6) and set CFLAGS to -pipe -O
  30. instead of -g .
  31.  
  32. The problems solved by this patch:
  33.  
  34.     (1) Add missing cast to (union wait *) in procbuf.C
  35.     (2) Modify gen-params: stdarg.h is needed on NeXT 3.0
  36.     (3) Do not compile strtod() in dtoa.C: NeXT has it already,
  37.         leaving it in will cause multiple defintion errors.
  38.  
  39. enjoy !
  40.  
  41.  
  42. diff -r -C2 libg++-2.2-dist/libg++/iostream/dtoa.C libg++-2.2/libg++/iostream/dtoa.C
  43. *** libg++-2.2-dist/libg++/iostream/dtoa.C    Fri Jun 26 20:24:05 1992
  44. --- libg++-2.2/libg++/iostream/dtoa.C    Wed Nov  4 13:37:16 1992
  45. ***************
  46. *** 1,3 ****
  47. --- 1,4 ----
  48.   #include <ioprivate.h>
  49.   #ifdef USE_DTOA
  50.   /****************************************************************
  51. ***************
  52. *** 272,276 ****
  53. --- 273,279 ----
  54.   #define Kmax 15
  55.   
  56. + #if !(defined(NeXT) && defined(m68k))
  57.   extern "C" double strtod(const char *s00, char **se);
  58. + #endif
  59.   extern "C" char *dtoa(double d, int mode, int ndigits,
  60.                           int *decpt, int *sign, char **rve);
  61. ***************
  62. *** 1119,1122 ****
  63. --- 1122,1127 ----
  64.   #endif
  65.   
  66. + #if !(defined(NeXT) && defined(m68k))
  67.    double
  68.   strtod
  69. ***************
  70. *** 1639,1642 ****
  71. --- 1644,1649 ----
  72.           return sign ? -rv : rv;
  73.           }
  74. + #endif /* NeXT && m68k */
  75.   
  76.    static int
  77. diff -r -C2 libg++-2.2-dist/libg++/iostream/procbuf.C libg++-2.2/libg++/iostream/procbuf.C
  78. *** libg++-2.2-dist/libg++/iostream/procbuf.C    Sat Jun 20 07:39:38 1992
  79. --- libg++-2.2/libg++/iostream/procbuf.C    Wed Nov  4 07:22:17 1992
  80. ***************
  81. *** 89,93 ****
  82.       void_func hupsave = (void_func)signal(SIGHUP, SIG_IGN);
  83.   #endif
  84. !     while ((wait_pid = wait(&wstatus)) != _pid && wait_pid != -1) { }
  85.   #ifdef USE_SIGMASK
  86.       (void) sigsetmask(mask);
  87. --- 89,93 ----
  88.       void_func hupsave = (void_func)signal(SIGHUP, SIG_IGN);
  89.   #endif
  90. !     while ((wait_pid = wait((union wait *)&wstatus)) != _pid && wait_pid != -1) { }
  91.   #ifdef USE_SIGMASK
  92.       (void) sigsetmask(mask);
  93. diff -r -C2 libg++-2.2-dist/libg++/utils/gen-params libg++-2.2/libg++/utils/gen-params
  94. *** libg++-2.2-dist/libg++/utils/gen-params    Fri Jun 26 20:29:41 1992
  95. --- libg++-2.2/libg++/utils/gen-params    Wed Nov  4 12:48:50 1992
  96. ***************
  97. *** 220,223 ****
  98. --- 220,226 ----
  99.   #include <stdarg.h>
  100.   long foo(X_va_list ap) { return va_arg(ap, long); }
  101. + #if defined(NeXT) && defined(m68k)
  102. + blurfl /* cause compilation to fail -- we NEED stdarg.h on NeXT/68k */
  103. + #endif /* NeXT && m68k */
  104.   long bar(int i, ...)
  105.   { va_list ap; long j; va_start(ap, i); j = foo(ap); va_end(ap); return j; }
  106.  
  107.