summaryrefslogtreecommitdiff
path: root/lib/getprogname.h
Commit message (Collapse)AuthorAgeFilesLines
* getprogname: Move declaration from "getprogname.h" to <stdlib.h>.Bruno Haible2023-01-211-16/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* 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
|
* all: prefer https: URLsPaul Eggert2017-09-131-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: Fix test failure on Cygwin. Comments.Bruno Haible2016-10-191-0/+2
| | | | | | | * lib/getprogname.h: Add comments. * lib/getprogname.c: Add comments. Fix #elif indentation. * tests/test-getprogname.c (main): On Cygwin, expect a result without ".exe" suffix.
* getprogname: port to systems with __argv (mingw, msvc)Jim Meyering2016-09-071-1/+1
| | | | | | | | | | | | * lib/getprogname.c (getprogname): Include "dirname.h" and use last_component: more general than open coding it with hard-coded "/". * lib/getprogname.h (getprogname): Prefer "char const *" consistently. * modules/getprogname (Depends-on): Add dirname-lgpl. (configure.ac): Check for __argv in <stdlib.h>. * modules/getprogname-tests: New file. * tests/test-getprogname.c: New file. Suggested by Gisle Vanem in https://lists.gnu.org/archive/html/bug-gnulib/2016-09/msg00014.html
* getprogname.h: declare with _GL_ATTRIBUTE_PURE, when requiredJim Meyering2016-09-051-1/+5
| | | | | | * lib/getprogname.h (getprogname) [HAVE_DECL_PROGRAM_INVOCATION_NAME]: Declare with _GL_ATTRIBUTE_PURE, to avoid warning from gcc's -Wsuggest-attribute=pure
* getprogname: new modulePino Toscano2016-09-051-0/+34
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.