bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Patch] BFD library should call bindtextdomain()


From: TAKAI Kousuke
Subject: [Patch] BFD library should call bindtextdomain()
Date: Thu, 08 Aug 2002 03:11:19 +0900
User-agent: T-gnus/6.15.6 (based on Oort Gnus v0.06) (revision 02) EMIKO/1.14.1 (Choanoflagellata) SLIM/1.14.8 (小 池栄子) APEL/10.3 Emacs/21.2 (sparc-sun-solaris2.6) MULE/5.0 (賢木)

Hello,

I found a minor (non-fatal) problem in binutils that the BFD library
fails to find its message catalogs (bfd.mo) even when utility programs
such as objdump could find their own catalogs.  As far as I know, this
problem will happen on all versions of libbfd up to 2.13.

This seems to be because "bfd" domain is never bound to the directory
for message catalogs anywhere.  The following patch, which is
generated against binutils 2.13, will correct this problem.

Sorry for my poor English.

P.S. Because I am not in this mailing list, please send a copy to me
     if you reply this mail.

-- 
 TAKAI Kousuke <address@hidden>
  Dept. of Communications and Computer Engineering,
  Graduate School of Infomatics, Kyoto University, Japan

2002-08-08  TAKAI Kousuke  <address@hidden>

        * Makefile.am (localedir): New variable.
        (INCLUDES): Define LOCALEDIR to "$(localedir)".

        * init.c (bfd_init): Call bindtextdomain for the BFD library
        itself.

diff -urN binutils-2.13.orig/bfd/Makefile.am binutils-2.13/bfd/Makefile.am
--- binutils-2.13.orig/bfd/Makefile.am  2002-07-01 17:31:52.000000000 +0900
+++ binutils-2.13/bfd/Makefile.am       2002-08-08 01:04:13.676840000 +0900
@@ -540,7 +540,10 @@
 BFD_MACHINES = @bfd_machines@
 TDEFAULTS = @tdefaults@
 
-INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) 
$(CSWITCHES) -I$(srcdir)/../intl -I../intl
+# This definition should be equivalent to localedir in po/Makefile.
+localedir = $(prefix)/@DATADIRNAME@/locale
+
+INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) 
$(CSWITCHES) -I$(srcdir)/../intl -I../intl -DLOCALEDIR='"$(localedir)"'
 
 # C source files that correspond to .o's.
 SOURCE_CFILES = \
diff -urN binutils-2.13.orig/bfd/init.c binutils-2.13/bfd/init.c
--- binutils-2.13.orig/bfd/init.c       2001-03-09 06:04:01.000000000 +0900
+++ binutils-2.13/bfd/init.c    2002-08-08 00:47:20.634460000 +0900
@@ -42,10 +42,8 @@
        initialize magical internal data structures.
 */
 
-/* Actually, there is currently nothing for this function to do.
-   However, someday it may be needed, so keep it around.  */
-
 void
 bfd_init ()
 {
+  bindtextdomain (PACKAGE, LOCALEDIR);
 }
[end of patch]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]