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]

Re: Thread support for HPUX 11 (pa, ia64)


> If I don't define it in ansi mode under C, you cannot include
> <pthread.h> in any file compiled under -ansi -pthread.  This is 
> a bug in the HPUX system headers, but unconditionally defining
> _HPUX_SOURCE when -pthread is given seems to me the simplest
> fix.
> 
> (If you're curious, the bug is that sigset_t is not declared, but
> pthread.h tries to use it anyway.)

Do you have the latest hpux header patch?  It looks to me as if your
define of _POSIX_C_SOURCE should result in the define of
_INCLUDE_POSIX_SOURCE.  This should cause sigset_t to be declared in
sys/newsig.h:

#ifdef _INCLUDE_POSIX_SOURCE

#  ifdef _INCLUDE_HPUX_SOURCE
     typedef struct __sigset_t {
	  unsigned int sigset[8];
     } sigset_t;
#  else /* not _INCLUDE_HPUX_SOURCE */
     typedef struct __sigset_t {
	  unsigned int __sigset[8];
     } sigset_t;
#  endif /* _INCLUDE_HPUX_SOURCE */

#endif /* _INCLUDE_POSIX_SOURCE */

Dave


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