]> Savannah Git Hosting - gnulib.git/commit
getprogname: Move declaration from "getprogname.h" to <stdlib.h>.
authorBruno Haible <bruno@clisp.org>
Sat, 21 Jan 2023 08:43:50 +0000 (09:43 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 21 Jan 2023 08:55:18 +0000 (09:55 +0100)
commitd48f431981e1aa4c5c80b15f58a380c9201f2d63
tree1d07e9d597c8f2570b32516b97acf356a1892b88
parent3d6a114e3e16595e19a221d04f6db10bfd7e759d
getprogname: Move declaration from "getprogname.h" to <stdlib.h>.

* 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.
14 files changed:
ChangeLog
NEWS
lib/argmatch.c
lib/c-stack.c
lib/error.c
lib/getprogname.c
lib/getprogname.h
lib/git-merge-changelog.c
lib/stdlib.in.h
m4/getprogname.m4
m4/stdlib_h.m4
modules/getprogname
modules/stdlib
tests/test-getprogname.c