Browse Source

libc: hide obstack relocations

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer 11 years ago
parent
commit
975bca165c
3 changed files with 7 additions and 11 deletions
  1. 1 0
      include/obstack.h
  2. 1 0
      include/stdio.h
  3. 5 11
      libc/misc/gnu/obprintf.c

+ 1 - 0
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,

+ 1 - 0
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.  */
 
 

+ 5 - 11
libc/misc/gnu/obprintf.c

@@ -4,15 +4,10 @@
 
 #include <stdio.h>
 #include <stdarg.h>
-
-#ifdef _LIBC
-# include <obstack.h>
-#else
-# include "obstack.h"
-#endif
+#include <obstack.h>
 
 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)