From 975bca165c3e10e74c05c0384fd58f45a7025a3c Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 14 Jun 2013 14:27:06 +0200 Subject: libc: hide obstack relocations Signed-off-by: Bernhard Reutner-Fischer --- include/obstack.h | 1 + include/stdio.h | 1 + libc/misc/gnu/obprintf.c | 16 +++++----------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/include/obstack.h b/include/obstack.h index 076df7d22..8ef0b7a45 100644 --- a/include/obstack.h +++ b/include/obstack.h @@ -179,6 +179,7 @@ struct obstack /* control current object in current chunk */ /* Declare the external functions we use; they are in obstack.c. */ extern void _obstack_newchunk (struct obstack *, int); +libc_hidden_proto(_obstack_newchunk) extern int _obstack_begin (struct obstack *, int, int, void *(*) (long), void (*) (void *)); extern int _obstack_begin_1 (struct obstack *, int, int, diff --git a/include/stdio.h b/include/stdio.h index 831aa1c36..75c146482 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -865,6 +865,7 @@ extern int obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __format, __gnuc_va_list __args) __THROW __attribute__ ((__format__ (__printf__, 2, 0))); +libc_hidden_proto(obstack_vprintf) #endif /* USE_GNU && UCLIBC_HAS_OBSTACK. */ diff --git a/libc/misc/gnu/obprintf.c b/libc/misc/gnu/obprintf.c index 70c058fe5..3f8eda832 100644 --- a/libc/misc/gnu/obprintf.c +++ b/libc/misc/gnu/obprintf.c @@ -4,15 +4,10 @@ #include #include - -#ifdef _LIBC -# include -#else -# include "obstack.h" -#endif +#include int -_obstack_vprintf (struct obstack *obstack, const char *format, va_list args) +obstack_vprintf (struct obstack *obstack, const char *format, va_list args) { int n; char *s; @@ -20,16 +15,15 @@ _obstack_vprintf (struct obstack *obstack, const char *format, va_list args) obstack_grow(obstack, s, n); return n; } -weak_alias (_obstack_vprintf, obstack_vprintf) +libc_hidden_def(obstack_vprintf) int -_obstack_printf (struct obstack *obstack, const char *format, ...) +obstack_printf (struct obstack *obstack, const char *format, ...) { int n; va_list ap; va_start (ap, format); - n = _obstack_vprintf (obstack, format, ap); + n = obstack_vprintf (obstack, format, ap); va_end (ap); return n; } -weak_alias (_obstack_printf, obstack_printf) -- cgit v1.2.3