summaryrefslogtreecommitdiff
path: root/libc/misc
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-03-18 21:29:02 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:27 +0200
commit23f8c147daab81fa277953696102357bbdd6d941 (patch)
treef96d1d58d9250e466f1bfefba140aa3b7a1379eb /libc/misc
parent8bb1bab7542944a3ce1b9c92fcb2ec6731806ae4 (diff)
err.c, err.h: no need for hidden functions
Since we reuse the functions in the same file, provide static __X() and use strong_alias to provide the visible functions. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/misc')
-rw-r--r--libc/misc/error/err.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/libc/misc/error/err.c b/libc/misc/error/err.c
index 9ddb59624..76f66f39e 100644
--- a/libc/misc/error/err.c
+++ b/libc/misc/error/err.c
@@ -50,68 +50,68 @@ static void vwarn_work(const char *format, va_list args, int showerr)
__STDIO_AUTO_THREADUNLOCK(stderr);
}
-void vwarn(const char *format, va_list args)
+static void __vwarn(const char *format, va_list args)
{
vwarn_work(format, args, 1);
}
-libc_hidden_def(vwarn)
+strong_alias(__vwarn,vwarn)
void warn(const char *format, ...)
{
va_list args;
va_start(args, format);
- vwarn(format, args);
+ __vwarn(format, args);
va_end(args);
}
-void vwarnx(const char *format, va_list args)
+static void __vwarnx(const char *format, va_list args)
{
vwarn_work(format, args, 0);
}
-libc_hidden_def(vwarnx)
+strong_alias(__vwarnx,vwarnx)
void warnx(const char *format, ...)
{
va_list args;
va_start(args, format);
- vwarnx(format, args);
+ __vwarnx(format, args);
va_end(args);
}
-void verr(int status, const char *format, va_list args)
+static void __verr(int status, const char *format, va_list args)
{
- vwarn(format, args);
+ __vwarn(format, args);
exit(status);
}
-libc_hidden_def(verr)
+strong_alias(__verr,verr)
-void attribute_noreturn err(int status, const char *format, ...)
+void err(int status, const char *format, ...)
{
va_list args;
va_start(args, format);
- verr(status, format, args);
+ __verr(status, format, args);
/* This should get optimized away. We'll leave it now for safety. */
/* The loop is added only to keep gcc happy. */
while(1)
va_end(args);
}
-void verrx(int status, const char *format, va_list args)
+static void __verrx(int status, const char *format, va_list args)
{
- vwarnx(format, args);
+ __vwarnx(format, args);
exit(status);
}
-libc_hidden_def(verrx)
+strong_alias(__verrx,verrx)
-void attribute_noreturn errx(int status, const char *format, ...)
+void errx(int status, const char *format, ...)
{
va_list args;
va_start(args, format);
- verrx(status, format, args);
+ __verrx(status, format, args);
/* This should get optimized away. We'll leave it now for safety. */
/* The loop is added only to keep gcc happy. */
while(1)