gcc/ginclude/stddef.h fix for BSD/OS

Shigeya Suzuki shigeya@foretune.co.jp
Sat Apr 4 23:13:00 GMT 1998


Okay, Now I found why this has happend. 

On egcs side, the define(__bsdi__) is no effect. But BSDI Don't define
any of such staff, I kept this change since there are no harm.

Now, one change I need following solve my problem. the _ANSI_H_ and
_MACHINE_ANSI_H_ thing is inconsistent. see below.

This change may affect other platform -- but I belive this is
necessary change. Someone should checn other platform.

With this change, I could rebuilt whole tree without problem.

Shigeya Suzuki

------------------------------

Index: stddef.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/ginclude/stddef.h,v
retrieving revision 1.2
diff -c -r1.2 stddef.h
*** stddef.h	1997/12/12 06:36:09	1.2
--- stddef.h	1998/04/05 07:12:01
***************
*** 24,30 ****
  
  /* On 4.3bsd-net2, make sure ansi.h is included, so we have
     one less case to deal with in the following.  */
! #if defined (__BSD_NET2__) || defined (____386BSD____) || defined (__FreeBSD__) || defined(__NetBSD__)
  #include <machine/ansi.h>
  #endif
  
--- 24,30 ----
  
  /* On 4.3bsd-net2, make sure ansi.h is included, so we have
     one less case to deal with in the following.  */
! #if defined (__BSD_NET2__) || defined (____386BSD____) || defined (__FreeBSD__) || defined(__NetBSD__) || defined(__bsdi__)
  #include <machine/ansi.h>
  #endif
  
***************
*** 284,290 ****
  
  /*  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
      are already defined.  */
! #ifdef _ANSI_H_
  /*  The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_
      are probably typos and should be removed before 2.8 is released.  */
  #ifdef _GCC_PTRDIFF_T_
--- 284,290 ----
  
  /*  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
      are already defined.  */
! #if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_)
  /*  The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_
      are probably typos and should be removed before 2.8 is released.  */
  #ifdef _GCC_PTRDIFF_T_
***************
*** 312,318 ****
  #undef _WCHAR_T_
  #undef _BSD_WCHAR_T_
  #endif
! #endif /* _ANSI_H_ */
  
  #endif /* __sys_stdtypes_h */
  
--- 312,318 ----
  #undef _WCHAR_T_
  #undef _BSD_WCHAR_T_
  #endif
! #endif /* _ANSI_H_  || _MACHINE_ANSI_H_ */
  
  #endif /* __sys_stdtypes_h */
  






More information about the Gcc-bugs mailing list