1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-08 17:22:05 +03:00

getprogname: port to OpenBSD 5.1

* 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.
This commit is contained in:
Jim Meyering
2016-09-28 11:09:03 -07:00
parent 85854baba3
commit 9a8bf3b56c
4 changed files with 26 additions and 5 deletions

View File

@@ -12,10 +12,6 @@ extensions
configure.ac:
gl_FUNC_GETPROGNAME
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
AC_CHECK_DECLS([__argv], [], [], [#include <stdlib.h>])
Makefile.am:
lib_SOURCES += getprogname.h getprogname.c