summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2017-04-06 11:14:13 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-04-06 15:42:03 -0700
commitfbd6c988447f5793e08019e59f4789db892af698 (patch)
tree1702a4e1c7e770644d153622848542829d06e6c3 /m4
parent2dcee3a7916d833622476ddd464a549db9907f1b (diff)
downloadgnulib-fbd6c988447f5793e08019e59f4789db892af698.tar.gz
getopt: clean up getopt.c and getopt1.c file headers
In getopt.c, there is no need to include wchar.h at all, and it is safe nowadays to assume that stdlib.h does declare getenv (several other gnulib modules make this assumption). In getopt1.c, the #ifdef _LIBC block at the top can be simplified by using "" inclusions consistently, and there is no actual need to include stdlib.h (except in the #ifdef TEST block, where it should be unconditional), nor to provide a backup definition of NULL at all. * lib/getopt1.c: Simplify #ifdeffage at top of file. Move inclusion of stdlib.h to #ifdef TEST block and make unconditional. Do not define NULL. * lib/getopt.c: Don't include wchar.h. No need to declare getenv. * m4/getopt.m4 (gl_PREREQ_GETENV): Delete. * modules/getopt-gnu, modules/getopt-posix: Don't call gl_PREREQ_GETENV.
Diffstat (limited to 'm4')
-rw-r--r--m4/getopt.m46
1 files changed, 0 insertions, 6 deletions
diff --git a/m4/getopt.m4 b/m4/getopt.m4
index 7a94626355..f23d27b414 100644
--- a/m4/getopt.m4
+++ b/m4/getopt.m4
@@ -360,9 +360,3 @@ AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
should be used.])
AC_SUBST([GETOPT_H])
])
-
-# Prerequisites of lib/getopt*.
-AC_DEFUN([gl_PREREQ_GETOPT],
-[
- AC_CHECK_DECLS_ONCE([getenv])
-])