summaryrefslogtreecommitdiff
path: root/modules/getopt-gnu
Commit message (Collapse)AuthorAgeFilesLines
* getopt-gnu: Add comments.Bruno Haible2017-04-191-0/+3
| | | | | * m4/getopt.m4 (gl_FUNC_GETOPT_GNU): Add comments. * modules/getopt-gnu (configure.ac): Likewise.
* getopt-gnu: omit some duplicate codePaul Eggert2017-04-061-7/+0
| | | | | | | | * m4/getopt.m4 (gl_FUNC_GETOPT_GNU): Don’t require gl_FUNC_GETOPT_POSIX, as the configure.ac code generated by gnulib-tool already does this. * modules/getopt-gnu (configure.ac): Omit code duplicated from getopt-posix, which we depend on.
* getopt: clean up getopt.c and getopt1.c file headersZack Weinberg2017-04-061-1/+0
| | | | | | | | | | | | | | | | | | | 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.
* Split tests for getopt-posix and getopt-gnu.Bruno Haible2016-12-181-1/+0
| | | | | | | | | | | | | * tests/test-getopt-posix.c: New file. * tests/test-getopt-gnu.c: New file, with code from test-getopt.c. * tests/test-getopt-main.h: Renamed from tests/test-getopt.c. Remove stuff moved to test-getopt-gnu.c. Test TEST_GETOPT_GNU instead of GNULIB_TEST_GETOPT_GNU. * modules/getopt-posix-tests (Files): Add test-getopt-posix.c, test-getopt-main.h. Remove test-getopt.c, test-getopt_long.h. (Makefile.am): Test test-getopt-posix instead of test-getopt. * modules/getopt-gnu-tests: New file. * modules/getopt-gnu (configure.ac): Don't define GNULIB_TEST_GETOPT_GNU.
* Fix conflict between two instantiations of module 'unistd'.Bruno Haible2011-11-261-0/+3
| | | | | | | | | | | | | | * gnulib-tool (func_emit_autoconf_snippet): Substitute ${include_guard_prefix} also in the autoconf snippet. * m4/getopt.m4 (gl_FUNC_GETOPT_POSIX): Don't set GNULIB_UNISTD_H_GETOPT. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Don't initialize GNULIB_UNISTD_H_GETOPT. * modules/getopt-posix (configure.ac): Set the GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT variable. * modules/getopt-gnu (configure.ac): Likewise. * modules/unistd (Makefile.am): Change the substitution value of GNULIB_UNISTD_H_GETOPT to depend on the include guard prefix. Reported by Simon Josefsson.
* getopt-gnu: suppress core dumps from detection codePádraig Brady2011-07-191-0/+1
| | | | | | | | | | * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Use the nocrash module to suppress core dumps that may well occur on glibc systems. These core dumps might not be cleaned up automatically, or could trigger some system core dump handling logic. * modules/getopt-gnu: Depend on nocrash. Signed-off-by: Pádraig Brady <P@draigBrady.com>
* getopt: Move AC_LIBOBJ invocations to module description.Bruno Haible2011-06-161-0/+5
| | | | | | | | | * m4/getopt.m4 (gl_REPLACE_GETOPT): Remove macro. (gl_FUNC_GETOPT): Inline it here. Move AC_LIBOBJ and gl_PREREQ_GETOPT invocations from here... * modules/getopt-gnu (configure.ac): ... to here. * modules/getopt-posix (configure.ac): ... and here. (Depends-on): Update condition.
* getopt-gnu: relax license from LGPLv3+ to LGPLv2+Jim Meyering2011-03-031-1/+1
| | | | | * modules/getopt-gnu (License): Relax to LGPLv2+, for augeas, on request from Matthew Booth.
* Distinguish two kinds of module indicators.Bruno Haible2010-03-281-1/+1
|
* New modules 'getopt-posix', 'getopt-gnu'.Bruno Haible2009-08-131-0/+23