summaryrefslogtreecommitdiff
path: root/lib/getopt.in.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-01-08 12:32:05 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2013-01-09 14:59:28 -0800
commit90f065e873a354b9b2a55707ebbba64b5748b47d (patch)
tree1d29b5b4b05faed655c553abaedc92542c787b9f /lib/getopt.in.h
parentbb3630b9f1d07a953ad5d2cfd28fb266dc6f95e1 (diff)
downloadgnulib-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/getopt.in.h')
-rw-r--r--lib/getopt.in.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/getopt.in.h b/lib/getopt.in.h
index 490994f860..d9c7d8144a 100644
--- a/lib/getopt.in.h
+++ b/lib/getopt.in.h
@@ -49,7 +49,9 @@
linkers. */
#if defined __GETOPT_PREFIX && !defined __need_getopt
# if !@HAVE_GETOPT_H@
+# define __need_system_stdlib_h
# include <stdlib.h>
+# undef __need_system_stdlib_h
# include <stdio.h>
# include <unistd.h>
# endif