summaryrefslogtreecommitdiff
path: root/tests/test-getprogname.c
Commit message (Collapse)AuthorAgeFilesLines
* getprogname: Move declaration from "getprogname.h" to <stdlib.h>.Bruno Haible2023-01-211-1/+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
|
* license: fix GPLv3 texts to use a comma instead of semicolon.Bernhard Voelker2022-01-051-1/+1
| | | | | | | | | See: https://www.gnu.org/licenses/gpl-3.0.html#howto Run: $ git grep -l 'Foundation; either version 3' \ | xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/' * All files using GPLv3: Adjust via the above command.
* 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: port to HP-UXJohn David Anglin2016-10-261-1/+5
| | | | | | | See Bug#24805. * lib/getprogname.c (getprogname) [__hpux]: Port. * tests/test-getprogname.c (STREQ) [__hpux]: Special-case for HP-UX limitations on program name length.
* getprogname tests: Avoid failure in packages that use libtool.Bruno Haible2016-10-191-0/+7
| | | | | * tests/test-getprogname.c (main): Strip "lt-" prefix. Based on a patch by Jim Meyering.
* getprogname: Fix test failure on Cygwin. Comments.Bruno Haible2016-10-191-0/+16
| | | | | | | * 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-tests: work also when EXEEXT is nonemptyJim Meyering2016-09-081-1/+1
| | | | | | * modules/getprogname-tests (Makefile.am): Define EXEEXT. * tests/test-getprogname.c (main): Use it. Suggested by Gisle Vanem.
* getprogname: port to systems with __argv (mingw, msvc)Jim Meyering2016-09-071-0/+31
* 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