This is the mail archive of the gcc-bugs@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]

Re: New failing tests for g++


>>>>> Robert Lipe <robertl@dgii.com> writes:

>> I hate it if I have to follow up my own email, but the bug in
>> pthread.h vanishes as well if you don't compile with -ansi. Read
>> /usr/include/features.h for details.

> Based on that clue, I was able to add 'Special g++ Options:" lines
> to the two tests and make them work.    That is apparently the cause
> of many of the failures on my RH5 box.   Is adding this line to all
> the failing tests (to nuke the "special options") really the best way
> to do this?

No.  The problem is in the glibc headers.  Here's the workaround I use:

Index: libstdc++/stl/stl_config.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/libstdc++/stl/stl_config.h,v
retrieving revision 1.5
diff -c -p -r1.5 stl_config.h
*** libstdc++/stl/stl_config.h	1998/02/20 11:13:42	1.5
--- libstdc++/stl/stl_config.h	1998/06/10 07:49:36
***************
*** 114,121 ****
  #     define __STL_EXPLICIT_FUNCTION_TMPL_ARGS
  #     define __STL_MEMBER_TEMPLATES
  #   endif
! #   if !defined(_NOTHREADS) && __GLIBC__ >= 2
  #     define __STL_PTHREADS
  #   endif
  #   ifdef __EXCEPTIONS
  #     define __STL_USE_EXCEPTIONS
--- 114,127 ----
  #     define __STL_EXPLICIT_FUNCTION_TMPL_ARGS
  #     define __STL_MEMBER_TEMPLATES
  #   endif
!     /* glibc pre 2.0 is very buggy. We have to disable thread for it.
!        It should be upgraded to glibc 2.0 or later. */
! #   if !defined(_NOTHREADS) && __GLIBC__ >= 2 && defined(_G_USING_THUNKS)
  #     define __STL_PTHREADS
+ #     ifdef __STRICT_ANSI__
+         /* Work around a bug in the glibc pthread.h.  */
+ #       define sigset_t __sigset_t
+ #     endif
  #   endif
  #   ifdef __EXCEPTIONS
  #     define __STL_USE_EXCEPTIONS


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