aboutsummaryrefslogtreecommitdiff
path: root/posix/getopt.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-07-18 00:19:18 +0000
committerUlrich Drepper <drepper@redhat.com>1999-07-18 00:19:18 +0000
commit428383e84f04663dde479fe5deb4310227e3e7e6 (patch)
treea9b89c301ff470bf136a282f3c03df74dd8b8526 /posix/getopt.h
parentd957279cfb6845616ef6e5be23d4a79b2f94d578 (diff)
downloadglibc-428383e84f04663dde479fe5deb4310227e3e7e6.zip
glibc-428383e84f04663dde479fe5deb4310227e3e7e6.tar.gz
glibc-428383e84f04663dde479fe5deb4310227e3e7e6.tar.bz2
Update.
1999-07-17 Zack Weinberg <zack@rabi.columbia.edu> * include/libc-symbol.h: Clean up definitions of weak_alias, strong_alias, symbol_version, etc. etc. * posix/getopt.h: Use ctype.h to get features.h included, and don't include it at all if __GNU_LIBRARY__ is already defined.
Diffstat (limited to 'posix/getopt.h')
-rw-r--r--posix/getopt.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/posix/getopt.h b/posix/getopt.h
index aec5d92..12b7ad5 100644
--- a/posix/getopt.h
+++ b/posix/getopt.h
@@ -23,10 +23,16 @@
# define _GETOPT_H 1
#endif
-/* We include this here since on system susing GNU libc we need some
- macros defined. <stdio.h> is probably the most portable header
- file and it does what we need. */
-#include <stdio.h>
+/* If __GNU_LIBRARY__ is not already defined, either we are being used
+ standalone, or this is the first header included in the source file.
+ If we are being used with glibc, we need to include <features.h>, but
+ that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
+ not defined, include <ctype.h>, which will pull in <features.h> for us
+ if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
+ doesn't flood the namespace with stuff the way some other headers do.) */
+#if !defined __GNU_LIBRARY__
+# include <ctype.h>
+#endif
#ifdef __cplusplus
extern "C" {