diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2013-01-08 12:32:05 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2013-01-09 14:59:28 -0800 |
commit | 90f065e873a354b9b2a55707ebbba64b5748b47d (patch) | |
tree | 1d29b5b4b05faed655c553abaedc92542c787b9f /lib/pthread.in.h | |
parent | bb3630b9f1d07a953ad5d2cfd28fb266dc6f95e1 (diff) | |
download | gnulib-90f065e873a354b9b2a55707ebbba64b5748b47d.tar.gz |
stdlib: port to Solaris 2.6
Also, the code worked on Solaris 7 through 9 only by accident.
Problem reported by Tom G. Christensen in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-01/msg00059.html>.
* lib/stdlib.in.h: If __need_system_stdlib_h is defined,
simply include the system stdlib.h.
* lib/getopt.in.h (__need_system_stdlib_h):
* lib/pthread.in.h (__need_system_stdlib_h):
* lib/unistd.in.h (__need_system_stdlib_h) [!__GLIBC__]:
Define when including <stdlib.h>, to avoid problems at least for
the pthread case on Solaris 2.6 and 7. These .h files can get by
with the system stdlib.h.
Diffstat (limited to 'lib/pthread.in.h')
-rw-r--r-- | lib/pthread.in.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/pthread.in.h b/lib/pthread.in.h index 1a4f1fc587..7fcfb0b3b6 100644 --- a/lib/pthread.in.h +++ b/lib/pthread.in.h @@ -32,8 +32,11 @@ #ifndef _@GUARD_PREFIX@_PTHREAD_H_ #define _@GUARD_PREFIX@_PTHREAD_H_ -#include <errno.h> +#define __need_system_stdlib_h #include <stdlib.h> +#undef __need_system_stdlib_h + +#include <errno.h> #include <sched.h> #include <sys/types.h> #include <time.h> |