Subject: Re: Patches to gcc-2.5.8 for NetBSD-current ...
To: None <current-users@sun-lamp.cs.berkeley.edu, cagney@highland.oz.au>
From: Mark P. Gooderum <mark@aggregate.com>
List: current-users
Date: 06/06/1994 13:25:12
I needed some slightly more extenstive patches to gstddef.h when building
on a newer current that has the _BSD_<type>_T_ instead of the _<type>_T_
define names in <machine/ansi.h>.

-Mark
----- Cut here -----
*** gstddef.h.orig	Mon Dec  6 19:02:10 1993
--- gstddef.h	Mon Jun  6 13:11:48 1994
***************
*** 2,8 ****
  #ifndef _STDDEF_H_
  #ifndef _ANSI_STDDEF_H
  #ifndef __STDDEF_H__
- 
  /* Any one of these symbols __need_* means that GNU libc
     wants us just to define one data type.  So don't define
     the symbols that indicate this file's entire job has been done.  */
--- 2,7 ----
***************
*** 22,52 ****
  
  /* 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____)
  #include <machine/ansi.h>
  #endif
  
  /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
      defined if the corresponding type is *not* defined.  */
  #ifdef _ANSI_H_
  #ifndef _SIZE_T_
  #define _SIZE_T
  #endif
  #ifndef _PTRDIFF_T_
  #define _PTRDIFF_T
  #endif
  #ifndef _WCHAR_T_
  #define _WCHAR_T
  #endif
  /* Undef _FOO_T_ if we are supposed to define foo_t.  */
  #if defined (__need_ptrdiff_t) || defined (_STDDEF_H_)
  #undef _PTRDIFF_T_
  #endif
  #if defined (__need_size_t) || defined (_STDDEF_H_)
  #undef _SIZE_T_
  #endif
  #if defined (__need_wchar_t) || defined (_STDDEF_H_)
  #undef _WCHAR_T_
  #endif
  #endif /* _ANSI_H_ */
  
--- 21,64 ----
  
  /* 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 (__NetBSD__)
  #include <machine/ansi.h>
+ #ifndef _ANSI_H_
+ #define _ANSI_H_ /* for NetBSD-current */
+ #endif
  #endif
  
+ 
  /* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
      defined if the corresponding type is *not* defined.  */
  #ifdef _ANSI_H_
  #ifndef _SIZE_T_
+ #ifndef _BSD_SIZE_T_
  #define _SIZE_T
  #endif
+ #endif
  #ifndef _PTRDIFF_T_
+ #ifndef _BSD_PTRDIFF_T_
  #define _PTRDIFF_T
  #endif
+ #endif
  #ifndef _WCHAR_T_
+ #ifndef _BSD_WCHAR_T_
  #define _WCHAR_T
  #endif
+ #endif
  /* Undef _FOO_T_ if we are supposed to define foo_t.  */
  #if defined (__need_ptrdiff_t) || defined (_STDDEF_H_)
  #undef _PTRDIFF_T_
+ #undef _BSD_PTRDIFF_T_
  #endif
  #if defined (__need_size_t) || defined (_STDDEF_H_)
  #undef _SIZE_T_
+ #undef _BSD_SIZE_T_
  #endif
  #if defined (__need_wchar_t) || defined (_STDDEF_H_)
  #undef _WCHAR_T_
+ #undef _BSD_WCHAR_T_
  #endif
  #endif /* _ANSI_H_ */
  
***************
*** 72,77 ****
--- 84,90 ----
  #ifndef _T_PTRDIFF
  #ifndef __PTRDIFF_T
  #ifndef _PTRDIFF_T_
+ #ifndef _BSD_PTRDIFF_T_
  #ifndef ___int_ptrdiff_t_h
  #ifndef _GCC_PTRDIFF_T
  #define _PTRDIFF_T
***************
*** 79,84 ****
--- 92,98 ----
  #define _T_PTRDIFF
  #define __PTRDIFF_T
  #define _PTRDIFF_T_
+ #define _BSD_PTRDIFF_T_
  #define ___int_ptrdiff_t_h
  #define _GCC_PTRDIFF_T
  #ifndef __PTRDIFF_TYPE__
***************
*** 87,92 ****
--- 101,107 ----
  typedef __PTRDIFF_TYPE__ ptrdiff_t;
  #endif /* _GCC_PTRDIFF_T */
  #endif /* ___int_ptrdiff_t_h */
+ #endif /* _BSD_PTRDIFF_T_ */
  #endif /* _PTRDIFF_T_ */
  #endif /* __PTRDIFF_T */
  #endif /* _T_PTRDIFF */
***************
*** 109,114 ****
--- 124,130 ----
  #ifndef _T_SIZE
  #ifndef __SIZE_T
  #ifndef _SIZE_T_
+ #ifndef _BSD_SIZE_T_
  #ifndef ___int_size_t_h
  #ifndef _GCC_SIZE_T
  #ifndef _SIZET_
***************
*** 119,124 ****
--- 135,141 ----
  #define _T_SIZE
  #define __SIZE_T
  #define _SIZE_T_
+ #define _BSD_SIZE_T_
  #define ___int_size_t_h
  #define _GCC_SIZE_T
  #define _SIZET_
***************
*** 133,138 ****
--- 150,156 ----
  #endif /* _SIZET_ */
  #endif /* _GCC_SIZE_T */
  #endif /* ___int_size_t_h */
+ #endif /* _BSD_SIZE_T_ */
  #endif /* _SIZE_T_ */
  #endif /* __SIZE_T */
  #endif /* _T_SIZE */
***************
*** 156,161 ****
--- 174,180 ----
  #ifndef _T_WCHAR
  #ifndef __WCHAR_T
  #ifndef _WCHAR_T_
+ #ifndef _BSD_WCHAR_T_
  #ifndef _WCHAR_T_H
  #ifndef ___int_wchar_t_h
  #ifndef __INT_WCHAR_T_H
***************
*** 165,170 ****
--- 184,190 ----
  #define _T_WCHAR
  #define __WCHAR_T
  #define _WCHAR_T_
+ #define _BSD_WCHAR_T_
  #define _WCHAR_T_H
  #define ___int_wchar_t_h
  #define __INT_WCHAR_T_H
***************
*** 189,194 ****
--- 209,215 ----
  #endif
  #endif
  #endif
+ #endif
  #undef  __need_wchar_t
  #endif /* _STDDEF_H or __need_wchar_t.  */
  
***************
*** 197,208 ****
--- 218,232 ----
  #ifdef _ANSI_H_
  #ifdef _GCC_PTRDIFF_T_
  #undef _PTRDIFF_T_
+ #undef _BSD_PTRDIFF_T_
  #endif
  #ifdef _GCC_SIZE_T_
  #undef _SIZE_T_
+ #undef _BSD_SIZE_T_
  #endif
  #ifdef _GCC_WCHAR_T_
  #undef _WCHAR_T_
+ #undef _BSD_WCHAR_T_
  #endif
  #endif /* _ANSI_H_ */
  


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