home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / gnu / gcc / bug / 2787 < prev    next >
Encoding:
Text File  |  1992-11-17  |  5.2 KB  |  161 lines

  1. Newsgroups: gnu.gcc.bug
  2. Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!agate!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!informatik.uni-kl.DE!friedl
  3. From: friedl@informatik.uni-kl.DE (Ralf Friedl)
  4. Subject: GCC 2.3.1 on 4.3bsd-net2
  5. Message-ID: <9211171527.aa07356@superieur.informatik.uni-kl.de>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Tue, 17 Nov 1992 14:27:46 GMT
  10. Approved: bug-gcc@prep.ai.mit.edu
  11. Lines: 148
  12.  
  13. I'm using a sytem based on 4.3bsd-net2, running on i386.
  14. I made the following changes to compile gcc 2.3.1:
  15.  
  16. The file limitx.h, defines the symbol _LIMITS_H_, and includes
  17. syslimits.h.  syslimits.h includes the system's limits.h. But the
  18. system's limits.h checks the symbol _LIMITS_H_, and is therefor not
  19. included. A fix is to define _LIMITS_H_ after including syslimits.h.
  20. This affects all systems that use _LIMITS_H_ in limits.h. This change
  21. is not included in the following diffs.
  22.  
  23. In gstddef.h, gstdarg.h and gvarargs.h,
  24.        #include <ansi.h>
  25. must be chaned to
  26.        #include <machine/ansi.h>
  27.  
  28. The definition of size_t, ptrdiff_t and wchar_t in gstddef.h must be
  29. changed. To make sure that the types of the builtin function
  30. declarations and those in the header files are the same, the file
  31. machine/ansi.h can be changed so that it uses the compiler defined
  32. types if compiled with GCC 2 :
  33. >From machine/ansi.h:
  34.     #if __GNUC__ >= 2
  35.     #define    _PTRDIFF_T_    __PTRDIFF_TYPE__    /* ptr1 - ptr2 */
  36.     #define    _SIZE_T_    __SIZE_TYPE__        /* sizeof() */
  37.     #define    _WCHAR_T_    __WCHAR_TYPE__        /* wchar_t */
  38.     #else
  39.     #define    _PTRDIFF_T_    int            /* ptr1 - ptr2 */
  40.     #define    _SIZE_T_    unsigned int        /* sizeof() */
  41.     #define    _WCHAR_T_    unsigned short        /* wchar_t */
  42.     #endif
  43.  
  44. The generated symbols need underscores.
  45.  
  46.  
  47. diff -ur /usr/src/oldgnu/gcc-2.3.1/config/i386bsd.h /usr/src/gnu/gcc-2.3.1/config/i386bsd.h
  48. --- /usr/src/oldgnu/gcc-2.3.1/config/i386bsd.h    Thu Oct 29 00:01:32 1992
  49. +++ /usr/src/gnu/gcc-2.3.1/config/i386bsd.h    Sun Nov  8 01:04:20 1992
  50. @@ -1,4 +1,6 @@
  51.  /* Configuration for an i386 running 386BSD as the target machine.  */
  52. +#define    YES_UNDERSCORES
  53. +
  54.  #include "i386mach.h"
  55.  
  56.  #undef CPP_PREDEFINES
  57. @@ -6,3 +8,5 @@
  58.  
  59.  /* Specify extra dir to search for include files.  */
  60.  #undef SYSTEM_INCLUDE_DIR
  61. +
  62. +#undef SIZE_TYPE
  63. diff -ur /usr/src/oldgnu/gcc-2.3.1/gstdarg.h /usr/src/gnu/gcc-2.3.1/gstdarg.h
  64. --- /usr/src/oldgnu/gcc-2.3.1/gstdarg.h    Fri Oct 30 10:42:31 1992
  65. +++ /usr/src/gnu/gcc-2.3.1/gstdarg.h    Sat Nov  7 19:59:10 1992
  66. @@ -108,7 +108,7 @@
  67.  /* On 4.3bsd-net2, make sure ansi.h is included, so we have
  68.     one less case to deal with in the following.  */
  69.  #if defined (__BSD_NET2__) || defined (____386BSD____)
  70. -#include <ansi.h>
  71. +#include <machine/ansi.h>
  72.  #endif
  73.  
  74.  /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which remain
  75. diff -ur /usr/src/oldgnu/gcc-2.3.1/gstddef.h /usr/src/gnu/gcc-2.3.1/gstddef.h
  76. --- /usr/src/oldgnu/gcc-2.3.1/gstddef.h    Thu Oct 29 22:14:12 1992
  77. +++ /usr/src/gnu/gcc-2.3.1/gstddef.h    Sat Nov  7 19:05:27 1992
  78. @@ -13,32 +13,36 @@
  79.  #define _ANSI_STDDEF_H
  80.  #endif
  81.  
  82. -#ifndef __sys_stdtypes_h
  83. -/* This avoids lossage on SunOS but only if stdtypes.h comes first.
  84. -   There's no way to win with the other order!  Sun lossage.  */
  85. -
  86.  /* On 4.3bsd-net2, make sure ansi.h is included, so we have
  87.     one less case to deal with in the following.  */
  88.  #if defined (__BSD_NET2__) || defined (____386BSD____)
  89. -#include <ansi.h>
  90. -#endif
  91. +#include <machine/ansi.h>
  92.  
  93.  /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
  94.      defined if the corresponding type is *not* defined.  */
  95. -#ifdef _ANSI_H_
  96. -#ifndef _SIZE_T_
  97. +#ifdef    _SIZE_T_
  98. +typedef    _SIZE_T_    size_t;
  99. +#undef    _SIZE_T_
  100. +#endif
  101.  #define _SIZE_T
  102. +
  103. +#ifdef    _PTRDIFF_T_
  104. +typedef    _PTRDIFF_T_    ptrdiff_t;
  105. +#undef    _PTRDIFF_T_
  106.  #endif
  107. -#ifndef _PTRDIFF_T_
  108.  #define _PTRDIFF_T
  109. +
  110. +#ifdef    _WCHAR_T_
  111. +typedef    _WCHAR_T_    wchar_t;
  112. +#undef    _WCHAR_T_
  113.  #endif
  114. -#ifndef _WCHAR_T_
  115.  #define _WCHAR_T
  116. -#endif
  117. -#undef _SIZE_T_
  118. -#undef _PTRDIFF_T_
  119. -#undef _WCHAR_T_
  120. -#endif /* _ANSI_H_ */
  121. +
  122. +#endif /* defined (__BSD_NET2__) || defined (____386BSD____) */
  123. +
  124. +#ifndef __sys_stdtypes_h
  125. +/* This avoids lossage on SunOS but only if stdtypes.h comes first.
  126. +   There's no way to win with the other order!  Sun lossage.  */
  127.  
  128.  /* In case nobody has defined these types, but we aren't running under
  129.     GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE__TYPE__, and
  130. @@ -166,11 +170,13 @@
  131.      are already defined.  We need not worry about the case of wanting just
  132.      one of these types, not on 4.3bsd-net2, because only the GNU libc
  133.      header files do that.  */
  134. +/* These are undef'd already 
  135.  #ifdef _ANSI_H_
  136.  #undef _PTRDIFF_T_
  137.  #undef _SIZE_T_
  138.  #undef _WCHAR_T_
  139.  #endif
  140. +*/
  141.  
  142.  #endif /* __sys_stdtypes_h */
  143.  
  144. diff -ur /usr/src/oldgnu/gcc-2.3.1/gvarargs.h /usr/src/gnu/gcc-2.3.1/gvarargs.h
  145. --- /usr/src/oldgnu/gcc-2.3.1/gvarargs.h    Fri Oct 30 10:33:19 1992
  146. +++ /usr/src/gnu/gcc-2.3.1/gvarargs.h    Fri Nov  6 23:31:27 1992
  147. @@ -122,7 +122,7 @@
  148.  /* On 4.3bsd-net2, make sure ansi.h is included, so we have
  149.     one less case to deal with in the following.  */
  150.  #if defined (__BSD_NET2__) || defined (____386BSD____)
  151. -#include <ansi.h>
  152. +#include <machine/ansi.h>
  153.  #endif
  154.  
  155.  /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which remain
  156.  
  157. ----
  158. Ralf Friedl
  159. friedl@informatik.uni-kl.de
  160.  
  161.