mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-08 17:22:05 +03:00
getprogname: port to systems with __argv (mingw, msvc)
* 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
This commit is contained in:
13
modules/getprogname-tests
Normal file
13
modules/getprogname-tests
Normal file
@@ -0,0 +1,13 @@
|
||||
Files:
|
||||
tests/test-getprogname.c
|
||||
|
||||
Depends-on:
|
||||
assert-h
|
||||
string
|
||||
|
||||
configure.ac:
|
||||
|
||||
Makefile.am:
|
||||
TESTS += test-getprogname
|
||||
check_PROGRAMS += test-getprogname
|
||||
test_getprogname_LDADD = $(LDADD)
|
Reference in New Issue
Block a user