Thread support for HPUX 11 (pa, ia64)
John David Anglin
dave@hiauly3.hia.nrc.ca
Sat Aug 23 15:53:00 GMT 2003
> 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
More information about the Gcc-patches
mailing list