libstdc++ build failure on darwin5.2

Stan Shebs shebs@apple.com
Sun Jan 6 09:59:00 GMT 2002


Andreas Tobler wrote:
> 
> Stan Shebs wrote:
> >
> > Andreas Tobler wrote:
> > >
> > > /usr/include/string.h:63: syntax error before `;' token
> >
> > I'm seeing this one too.  Not the first time we've been outsmarted
> > by Darwin's yet-another-random-BSD with _BSD_*_T macros.  As before,
> > we'll have to slog through #ifdef/#ifndef/#ifnoncomputablefunction
> > to see what's causing it this time...
> 
> Seems so. Arghh.

Try this patch - it got me through libstdc++ build, it's running
tests now.  If it works with those and other twisted code I have,
then I'll submit it.

Stan

Index: stddef.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ginclude/stddef.h,v
retrieving revision 1.13
diff -c -3 -p -r1.13 stddef.h
*** stddef.h    2001/09/11 08:52:39     1.13
--- stddef.h    2002/01/06 17:53:57
*************** 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_
  #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_  /* for 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_ */



More information about the Libstdc++ mailing list