summaryrefslogtreecommitdiff
path: root/m4/getprogname.m4
Commit message (Collapse)AuthorAgeFilesLines
* getprogname: Avoid using HAVE_* macros in *.in.h files.Bruno Haible2023-04-131-1/+7
| | | | | | | | | | | * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_PROGRAM_INVOCATION_NAME. * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Require gl_STDLIB_H_DEFAULTS and gl_USE_SYSTEM_EXTENSIONS. Set HAVE_DECL_PROGRAM_INVOCATION_NAME. * modules/stdlib (Makefile.am): Substitute HAVE_DECL_PROGRAM_INVOCATION_NAME. * lib/stdlib.in.h (getprogname): Test HAVE_DECL_PROGRAM_INVOCATION_NAME as an Autoconf variable.
* Resolve conflicts for functions introduced in Android API level 21.Bruno Haible2023-01-221-1/+4
| | | | | | | | | | | | | | | | | | | | | * lib/stdlib.in.h (_Exit): Consider REPLACE__EXIT. Disable _GL_CXXALIASWARN invocation on non-glibc systems. (getprogname): Consider REPLACE_GETPROGNAME. Disable _GL_CXXALIASWARN invocation on non-glibc systems. (posix_openpt): Consider REPLACE_POSIX_OPENPT. Disable _GL_CXXALIASWARN invocation on non-glibc systems. * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE__EXIT, REPLACE_GETPROGNAME, REPLACE_POSIX_OPENPT. * modules/stdlib (Makefile.am): Substitute REPLACE__EXIT, REPLACE_GETPROGNAME, REPLACE_POSIX_OPENPT. * m4/_Exit.m4 (gl_FUNC__EXIT): Conditionally set REPLACE__EXIT. * modules/_Exit (configure.ac): Consider REPLACE__EXIT. * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Conditionally set REPLACE_GETPROGNAME. * modules/getprogname (configure.ac): Consider REPLACE_GETPROGNAME. * m4/posix_openpt.m4 (gl_FUNC_POSIX_OPENPT): Conditionally set REPLACE_POSIX_OPENPT. * modules/posix_openpt (configure.ac): Consider REPLACE_POSIX_OPENPT.
* getprogname: Move declaration from "getprogname.h" to <stdlib.h>.Bruno Haible2023-01-211-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | * lib/stdlib.in.h (getprogname): New declaration. * lib/getprogname.h: Add deprecation warning. (getprogname): Remove declaration. * lib/getprogname.c: Include <stdlib.h> instead of getprogname.h. * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether getprogname is declared. (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize GNULIB_GETPROGNAME. (gl_STDLIB_H_DEFAULTS): Initialize HAVE_GETPROGNAME. * m4/getprogname.m4 (gl_PREREQ_GETPROGNAME): New macro, extracted from gl_FUNC_GETPROGNAME. Set HAVE_GETPROGNAME. (gl_FUNC_GETPROGNAME): Remove code that was moved to gl_PREREQ_GETPROGNAME. * modules/stdlib (Makefile.am): Substitute GNULIB_GETPROGNAME and HAVE_GETPROGNAME. * modules/getprogname (Depends-on): Add stdlib. (configure.ac): Define a module indicator. Invoke gl_PREREQ_GETPROGNAME. (Makefile.am): Don't compile getprogname.c if not needed. (Include): List <stdlib.h> instead of getprogname.h. * tests/test-getprogname.c: Include <stdlib.h> instead of getprogname.h. * NEWS: Mention the change. * lib/argmatch.c: Don't include getprogname.h. * lib/c-stack.c: Likewise. * lib/error.c: Likewise. * lib/git-merge-changelog.c: Likewise.
* Fix warnings for functions introduced in Android API level 21.Bruno Haible2023-01-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * m4/_Exit.m4 (gl_FUNC__EXIT): Test for _Exit using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/c-strtod.m4 (gl_C_STRTOLD): Test for strtold_l using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Test for c32rtomb like gl_CHECK_FUNCS_ANDROID does. * m4/dprintf.m4 (gl_FUNC_DPRINTF): Test for dprintf using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Likewise. * m4/dup3.m4 (gl_FUNC_DUP3): Test for dup3 using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Test for duplocale using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/execvpe.m4 (gl_FUNC_EXECVPE): Test for execvpe using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/fts.m4 (gl_FUNC_FTS_CORE): Test for fts_open using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNC. * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Test for getprogname using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE): Test for uselocale using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/iswblank.m4 (gl_FUNC_ISWBLANK): Test for iswblank using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Test for tcdrain using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/linkat.m4 (gl_FUNC_LINKAT): Test for linkat using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/localename.m4 (gl_LOCALENAME): Test for newlocale, duplocale, freelocale using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/mbrtoc32.m4 (gl_CHECK_FUNC_MBRTOC32): Test for mbrtoc32 like gl_CHECK_FUNCS_ANDROID does. * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Test for mbsnrtowcs using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/mbtowc.m4 (gl_FUNC_MBTOWC): Test for mbtowc using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Test for mknodat using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/mountlist.m4 (gl_MOUNTLIST): Test for setmntent, endmntent using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/posix_openpt.m4 (gl_FUNC_POSIX_OPENPT): Test for posix_openpt using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/pty.m4 (gl_FUNC_OPENPTY): Test for posix_openpt using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/random.m4 (gl_FUNC_RANDOM): Test for initstate, setstate using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/stpcpy.m4 (gl_FUNC_STPCPY): Test for stpcpy using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Test for stpncpy using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Test for symlinkat using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/truncate.m4 (gl_FUNC_TRUNCATE): Test for truncate using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/tsearch.m4 (gl_FUNC_TSEARCH): Test for twalk using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/vdprintf.m4 (gl_FUNC_VDPRINTF): Test for vdprintf using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise. * m4/wcsnrtombs.m4 (gl_FUNC_WCSNRTOMBS): Test for wcsnrtombs using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/readlinkat.m4 (gl_FUNC_READLINKAT): Test for readlinkat using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/fchmodat.m4 (gl_PREREQ_FCHMODAT): Likewise. * modules/careadlinkat (configure.ac): Likewise. * modules/ftoastr (configure.ac): Test for strtof using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * modules/duplocale-tests (configure.ac): Test for duplocale using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * modules/hard-locale-tests (configure.ac): Likewise. * modules/locale-tests (configure.ac): Test for newlocale using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * modules/localename-tests (configure.ac): Likewise. * modules/tsearch-tests (configure.ac): Test for initstate using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * modules/unistr/u8-stpcpy (configure.ac): Test for stpcpy using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/tcgetattr.m4: New file, extracted from m4/getpass.m4. * m4/getpass.m4 (gl_PREREQ_GETPASS): Remove code that tests for tcgetattr. Invoke gl_HAVE_TCGETATTR instead. * modules/getpass (Files): Add tcgetattr.m4. * modules/getpass-gnu (Files): Add tcgetattr.m4. * modules/term-style-control (Files): Add tcgetattr.m4. (configure.ac): Remove code that tests for tcgetattr. Invoke gl_HAVE_TCGETATTR instead.
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* getprogname: correct the test for a __progname variableJim Meyering2016-10-011-5/+30
| | | | | | | | | | | * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Use AC_CACHE_CHECK and AC_LINK_IFELSE to check for a global __progname. If found, define HAVE_VAR___PROGNAME. * lib/getprogname.c (getprogname): Reflect the new name of the preprocessor symbol: s/HAVE_DECL___PROGNAME/HAVE_VAR___PROGNAME/ Assaf Gordon reported that the erroneous prior check caused link failure on AIX 7 in https://lists.gnu.org/archive/html/grep-devel/2016-10/msg00001.html
* getprogname: port to OpenBSD 5.1Jim Meyering2016-09-281-1/+6
| | | | | | | | | | * lib/getprogname.c (__progname) [HAVE_DECL___PROGNAME]: Declare. (getprogname) [HAVE_DECL___PROGNAME]: Return __progname or "?". * modules/getprogname (configure.ac): Move most of this code... * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): ... to this function, increment serial number, and add a test for __progname. https://bugs.gnu.org/24562 Reported by Nelson H. F. Beebe.
* getprogname: port to Solaris 10Paul Eggert2016-09-061-2/+2
| | | | | | * lib/getprogname.c: Include stdlib.h, for getexecname decl. (getprogname) [HAVE_GETEXECNAME]: Use that, for Solaris 10. * m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Check for getexecname.
* getprogname: new modulePino Toscano2016-09-051-0/+13
This provides a LGPL module for getting the name of the current program, using the same API found on *BSD systems. * lib/getprogname.c, lib/getprogname.h, m4/getprogname.m4: * modules/getprogname: New files. * MODULES.html.sh (Misc): Add getprogname. * NEWS: Document the deprecation of the 'progname' module.