macosx/bsd: Use getprogname() where available

This commit is contained in:
Margaret Lewicka
2015-02-09 11:06:18 +00:00
committed by Richard W.M. Jones
parent 8940b03658
commit 28462caacc
2 changed files with 3 additions and 0 deletions

View File

@@ -315,6 +315,7 @@ AC_CHECK_FUNCS([\
be32toh \
fsync \
futimens \
getprogname \
getxattr \
htonl \
htons \

View File

@@ -133,6 +133,8 @@ extern void guestfs___cleanup_pclose (void *ptr);
*/
#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME == 1
# define guestfs___program_name program_invocation_short_name
#elif HAVE_GETPROGNAME
# define guestfs___program_name getprogname()
#else
# define guestfs___program_name "libguestfs"
#endif