From 428383e84f04663dde479fe5deb4310227e3e7e6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 18 Jul 1999 00:19:18 +0000 Subject: Update. 1999-07-17 Zack Weinberg * 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. --- posix/getopt.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'posix/getopt.h') diff --git a/posix/getopt.h b/posix/getopt.h index aec5d92a3d..12b7ad568e 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. is probably the most portable header - file and it does what we need. */ -#include +/* 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 , but + that does not exist if we are standalone. So: if __GNU_LIBRARY__ is + not defined, include , which will pull in 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 +#endif #ifdef __cplusplus extern "C" { -- cgit v1.2.3