Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions misc/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ extern int fdatasync(int fildes);
# define xsetprogname(pn)
extern const char *__progname;
# define xgetprogname(pn) __progname
#elif defined(_AIX)
char *aix_progname = NULL;
#define xsetprogname(pn) \
{ if (aix_progname == NULL) { \
if ((aix_progname = strrchr(pn, '/')) != NULL) aix_progname++; \
else aix_progname = pn; \
} \
}
#define xgetprogname() aix_progname
#else
# error "Did not find any sutable implementation of xsetprogname/xgetprogname"
#endif
Expand Down