summaryrefslogtreecommitdiff
path: root/lib/getopt1.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/getopt1.c')
-rw-r--r--lib/getopt1.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/lib/getopt1.c b/lib/getopt1.c
index 988983f3e0..b967d24f57 100644
--- a/lib/getopt1.c
+++ b/lib/getopt1.c
@@ -16,25 +16,12 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifdef _LIBC
-# include <getopt.h>
-#else
-# include <config.h>
-# include "getopt.h"
+#ifndef _LIBC
+#include "config.h"
#endif
-#include "getopt_int.h"
-
-#include <stdio.h>
-/* This needs to come after some library #include
- to get __GNU_LIBRARY__ defined. */
-#ifdef __GNU_LIBRARY__
-#include <stdlib.h>
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
+#include "getopt.h"
+#include "getopt_int.h"
int
getopt_long (int argc, char *__getopt_argv_const *argv, const char *options,
@@ -80,6 +67,7 @@ _getopt_long_only_r (int argc, char **argv, const char *options,
#ifdef TEST
#include <stdio.h>
+#include <stdlib.h>
int
main (int argc, char **argv)