]> Savannah Git Hosting - gnulib.git/commit
getprogname: port to systems with __argv (mingw, msvc)
authorJim Meyering <meyering@fb.com>
Wed, 7 Sep 2016 14:57:47 +0000 (07:57 -0700)
committerJim Meyering <meyering@fb.com>
Wed, 7 Sep 2016 15:29:36 +0000 (08:29 -0700)
commit320679aaa13016445f7ba5aba5c7a5a96541d630
tree020e33c6dec4d2ef94e66dfb4e2f07c8198b4990
parent4c32543a4f05706ca3a8c8d583a5fb35d0e58828
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
ChangeLog
lib/getprogname.c
lib/getprogname.h
modules/getprogname
modules/getprogname-tests [new file with mode: 0644]
tests/test-getprogname.c [new file with mode: 0644]