This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Still more #ifs in stddef.h


Continuing in the grand tradition of BSD derivatives :-), Jaguar needs
a couple more tests in ginclude/stddef.h in order for GCC to include
system headers and still be able to bootstrap.  While I could just
declare these part of Darwin 6.0 (Jaguar) support and check them in
I'd like to get at least one pair of eyes, preferably BSD-knowledgeable,
to tell me if this is going to crumble other systems in some new and
twisted way...  Thanks to Andreas Tobler for figuring out the rune_t one!

Stan

2002-07-31  Stan Shebs  <shebs@apple.com>
       Andreas Tobler  <toa@pop.agri.ch>

   * ginclude/stddef.h (_BSD_SIZE_T_DEFINED_): Define if not defined,
   plays nice with Darwin headers.
   (_BSD_RUNE_T_DEFINED_): Likewise.

Index: stddef.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ginclude/stddef.h,v
retrieving revision 1.14
diff -p -r1.14 stddef.h
*** stddef.h    9 Jan 2002 04:56:25 -0000    1.14
--- stddef.h    1 Aug 2002 04:41:35 -0000
*************** typedef __PTRDIFF_TYPE__ ptrdiff_t;
*** 175,180 ****
--- 175,181 ----
 #ifndef _BSD_SIZE_T_
 #ifndef _SIZE_T_DEFINED_
 #ifndef _SIZE_T_DEFINED
+ #ifndef _BSD_SIZE_T_DEFINED_    /* Darwin */
 #ifndef ___int_size_t_h
 #ifndef _GCC_SIZE_T
 #ifndef _SIZET_
*************** typedef __PTRDIFF_TYPE__ ptrdiff_t;
*** 190,195 ****
--- 191,197 ----
 #define _BSD_SIZE_T_
 #define _SIZE_T_DEFINED_
 #define _SIZE_T_DEFINED
+ #define _BSD_SIZE_T_DEFINED_    /* Darwin */
 #define ___int_size_t_h
 #define _GCC_SIZE_T
 #define _SIZET_
*************** typedef long ssize_t;
*** 207,212 ****
--- 209,215 ----
 #endif /* _SIZET_ */
 #endif /* _GCC_SIZE_T */
 #endif /* ___int_size_t_h */
+ #endif /* _BSD_SIZE_T_DEFINED_ */
 #endif /* _SIZE_T_DEFINED */
 #endif /* _SIZE_T_DEFINED_ */
 #endif /* _BSD_SIZE_T_ */
*************** typedef long ssize_t;
*** 239,244 ****
--- 242,248 ----
 #ifndef _WCHAR_T_
 #ifndef _BSD_WCHAR_T_
 #ifndef _BSD_WCHAR_T_DEFINED_    /* Darwin */
+ #ifndef _BSD_RUNE_T_DEFINED_    /* Darwin */
 #ifndef _WCHAR_T_DEFINED_
 #ifndef _WCHAR_T_DEFINED
 #ifndef _WCHAR_T_H
*************** typedef long ssize_t;
*** 276,281 ****
--- 280,286 ----
 #if !defined (_ANSI_SOURCE) && !defined (_POSIX_SOURCE)
 typedef _BSD_RUNE_T_ rune_t;
 #define _BSD_WCHAR_T_DEFINED_
+ #define _BSD_RUNE_T_DEFINED_    /* Darwin */
 #if defined (__FreeBSD__)
 /* Why is this file so hard to maintain properly?  In constrast to
    the comment above regarding BSD/386 1.1, on FreeBSD for as long
*************** typedef __WCHAR_TYPE__ wchar_t;
*** 299,304 ****
--- 304,310 ----
 #endif
 #endif
 #endif
+ #endif /* _BSD_RUNE_T_DEFINED_ */
 #endif
 #endif
 #endif



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]