diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-03-10 18:59:00 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-03-10 18:59:00 +0100 |
commit | 4b3f4aa77a3265f3b7547a576a1a0411b6a6fb8c (patch) | |
tree | 7cf143447a7169a6ca61d65ef99c61853e2e6dce /lib/errors | |
parent | fa566ecd90a09926967275d54cd43222a01595a1 (diff) |
Rename [set]progname() to mlib_[set]progname()
This namespacing was done because of a potential conflict with the
setprogname() function available in <stdlib.h> as part of BSD systems.
Diffstat (limited to 'lib/errors')
-rw-r--r-- | lib/errors/mlib_setprogname.c (renamed from lib/errors/setprogname.c) | 2 | ||||
-rw-r--r-- | lib/errors/vwarn.c | 2 | ||||
-rw-r--r-- | lib/errors/vwarnx.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/errors/setprogname.c b/lib/errors/mlib_setprogname.c index ab2de3e..bfc77b0 100644 --- a/lib/errors/setprogname.c +++ b/lib/errors/mlib_setprogname.c @@ -5,7 +5,7 @@ const char *__mlib_errors_progname; void -setprogname(const char *s) +mlib_setprogname(const char *s) { const char *p = strrchr(s, '/'); __mlib_errors_progname = p ? p + 1 : s; diff --git a/lib/errors/vwarn.c b/lib/errors/vwarn.c index bc6bd16..99b2c9b 100644 --- a/lib/errors/vwarn.c +++ b/lib/errors/vwarn.c @@ -9,7 +9,7 @@ void vwarn(const char *fmt, va_list ap) { int save = errno; - fprintf(stderr, "%s: ", progname()); + fprintf(stderr, "%s: ", mlib_progname()); vfprintf(stderr, fmt, ap); fprintf(stderr, ": %s\n", strerror(save)); } diff --git a/lib/errors/vwarnx.c b/lib/errors/vwarnx.c index 72d8fa7..58a7bc6 100644 --- a/lib/errors/vwarnx.c +++ b/lib/errors/vwarnx.c @@ -6,7 +6,7 @@ void vwarnx(const char *fmt, va_list ap) { - fprintf(stderr, "%s: ", progname()); + fprintf(stderr, "%s: ", mlib_progname()); vfprintf(stderr, fmt, ap); fputc('\n', stderr); } |