[git commit] obstack.c: use libintl.h

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Fri Jun 15 12:00:23 UTC 2012


commit: http://git.uclibc.org/uClibc/commit/?id=532c68d561128b390b5436f2962c2f47aa8bc5f0
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

remove gettext workarounds and use libintl.h's _(x)
use strong_alias instead of weak_alias
change how strong_alias and libc_hidden_def are disabled

Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 libc/misc/gnu/obstack.c |   18 +++++-------------
 1 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/libc/misc/gnu/obstack.c b/libc/misc/gnu/obstack.c
index 2391463..c7e21b1 100644
--- a/libc/misc/gnu/obstack.c
+++ b/libc/misc/gnu/obstack.c
@@ -30,11 +30,6 @@
 #else
 # define HAVE_INTTYPES_H 1
 # define HAVE_STDINT_H 1
-# define SHLIB_COMPAT(x,y,z) 0
-# undef libc_hidden_def
-# define libc_hidden_def(x)
-# undef strong_alias
-# define strong_alias(x,y)
 #endif
 #else
 # include "obstack.h"
@@ -112,19 +107,19 @@ enum
    `print_and_abort'.  */
 static void print_and_abort (void);
 static void (*__obstack_alloc_failed_handler) (void) = print_and_abort;
-weak_alias(__obstack_alloc_failed_handler,obstack_alloc_failed_handler)
+strong_alias(__obstack_alloc_failed_handler,obstack_alloc_failed_handler)
 
 /* Exit value used when `print_and_abort' is used.  */
 # include <stdlib.h>
 # ifdef _LIBC
 static int __obstack_exit_failure = EXIT_FAILURE;
-weak_alias(__obstack_exit_failure,obstack_exit_failure)
+strong_alias(__obstack_exit_failure,obstack_exit_failure)
 # else
 #  include "exitfail.h"
 #  define __obstack_exit_failure exit_failure
 # endif
 
-# ifdef _LIBC
+# if 0
 #  if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
 /* A looong time ago (before 1994, anyway; we're not sure) this global variable
    was used by non-GNU-C macros to avoid multiple evaluation.  The GNU C
@@ -328,7 +323,7 @@ _obstack_newchunk (struct obstack *h, int length)
   /* The new chunk certainly contains no empty object yet.  */
   h->maybe_empty_object = 0;
 }
-# ifdef _LIBC
+# if 0
 libc_hidden_def (_obstack_newchunk)
 # endif
 
@@ -393,7 +388,7 @@ obstack_free (struct obstack *h, void *obj)
     abort ();
 }
 
-# ifdef _LIBC
+# if 0
 /* Older versions of libc used a function _obstack_free intended to be
    called by non-GCC compilers.  */
 strong_alias (obstack_free, _obstack_free)
@@ -418,9 +413,6 @@ _obstack_memory_used (struct obstack *h)
 # else
 #  include "gettext.h"
 # endif
-/* NLS: Disable gettext in obstack for now: */
-# undef _
-# define _(Str) (Str)
 # ifndef _
 #  define _(msgid) gettext (msgid)
 # endif


More information about the uClibc-cvs mailing list