This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: a gettext patch for static linking


Ulrich Drepper writes:

> You cannot simply change the API and ABI of the libc.  Change the
> libintl interface since this cannot have any negative impacts.

OK, then please take the following patch.


2000-09-18  Bruno Haible  <haible@clisp.cons.org>

	* intl/dcigettext.c: Outside libc, use local variable names that don't
	clash with those in libc.
	* intl/bindtextdom.c: Likewise.
	* intl/textdomain.c: Likewise.

*** intl/dcigettext.c.bak	Fri Sep  1 22:16:59 2000
--- intl/dcigettext.c	Thu Sep 14 20:39:28 2000
***************
*** 119,124 ****
--- 119,134 ----
      ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2)
  #endif
  
+ /* The internal variables in the standalone libintl.a must have different
+    names than the internal variables in GNU libc, otherwise programs
+    using libintl.a cannot be linked statically.  */
+ #if !defined _LIBC
+ # define _nl_default_default_domain _nl_default_default_domain__
+ # define _nl_current_default_domain _nl_current_default_domain__
+ # define _nl_default_dirname _nl_default_dirname__
+ # define _nl_domain_bindings _nl_domain_bindings__
+ #endif
+ 
  /* @@ end of prolog @@ */
  
  #ifdef _LIBC
*** intl/bindtextdom.c.bak	Wed May 10 15:14:35 2000
--- intl/bindtextdom.c	Thu Sep 14 20:39:12 2000
***************
*** 57,62 ****
--- 57,70 ----
  # define __libc_rwlock_unlock(NAME)
  #endif
  
+ /* The internal variables in the standalone libintl.a must have different
+    names than the internal variables in GNU libc, otherwise programs
+    using libintl.a cannot be linked statically.  */
+ #if !defined _LIBC
+ # define _nl_default_dirname _nl_default_dirname__
+ # define _nl_domain_bindings _nl_domain_bindings__
+ #endif
+ 
  /* @@ end of prolog @@ */
  
  /* Contains the default location of the message catalogs.  */
*** intl/textdomain.c.bak	Fri Apr 28 12:38:31 2000
--- intl/textdomain.c	Thu Sep 14 20:34:08 2000
***************
*** 51,56 ****
--- 51,64 ----
  # define __libc_rwlock_unlock(NAME)
  #endif
  
+ /* The internal variables in the standalone libintl.a must have different
+    names than the internal variables in GNU libc, otherwise programs
+    using libintl.a cannot be linked statically.  */
+ #if !defined _LIBC
+ # define _nl_default_default_domain _nl_default_default_domain__
+ # define _nl_current_default_domain _nl_current_default_domain__
+ #endif
+ 
  /* @@ end of prolog @@ */
  
  /* Name of the default text domain.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]