This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libcpp/gcc patch] fix libcpp textdomain, set textdomain interms of PACKAGE name


Zack Weinberg writes:
> Matthias Klose <doko@cs.tu-berlin.de> writes:
> 
> > libcpp uses "gcc" for it's text domain, not "libcpp". The patch 
> > get's the name from the Makefile, where the macro PACKAGE is used to
> > determine the name. Do the same thing for the gcc textdomain as well.
> >
> > Ok to checkin?
> 
> Do not introduce new single-file -D switches into the Makefile.  Use
> AC_DEFINEs instead.

Updated patch follows. libcpp using automake already has the
definition of PACKAGE.

libcpp:
2004-07-23  Matthias Klose  <doko@debian.org> 
 
        init.c (init_library): Use PACKAGE for the text domain. 
 
gcc: 
2004-07-23  Matthias Klose  <doko@debian.org> 
 
        intl.c(gcc_init_libintl): Use PACKAGE for the text domain. 
        configure.ac: Add AC_DEFINE_UNQUOTED for PACKAGE. 
	config.h: Regenerate.
        configure: Likewise. 

Index: gcc/intl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/intl.c,v
retrieving revision 1.10
diff -u -r1.10 intl.c
--- gcc/intl.c	24 May 2004 19:28:20 -0000	1.10
+++ gcc/intl.c	23 Jul 2004 05:59:09 -0000
@@ -51,8 +51,8 @@
   setlocale (LC_ALL, "");
 #endif
 
-  (void) bindtextdomain ("gcc", LOCALEDIR);
-  (void) textdomain ("gcc");
+  (void) bindtextdomain (PACKAGE, LOCALEDIR);
+  (void) textdomain (PACKAGE);
 
   /* Opening quotation mark.  */
   open_quote = _("`");
Index: gcc/configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.ac,v
retrieving revision 2.49
diff -u -r2.49 configure.ac
--- gcc/configure.ac	13 Jul 2004 06:57:11 -0000	2.49
+++ gcc/configure.ac	23 Jul 2004 05:58:10 -0000
@@ -1392,6 +1392,7 @@
 # Internationalization
 PACKAGE=gcc
 VERSION="$gcc_version"
+AC_DEFINE_UNQUOTED(PACKAGE, $PACKAGE, [Name of package.])
 AC_SUBST(PACKAGE)
 AC_SUBST(VERSION)
 
Index: libcpp/init.c
===================================================================
RCS file: /cvs/gcc/gcc/libcpp/init.c,v
retrieving revision 1.3
diff -u -r1.3 init.c
--- libcpp/init.c	4 Jul 2004 12:57:46 -0000	1.3
+++ libcpp/init.c	23 Jul 2004 05:58:26 -0000
@@ -121,7 +121,7 @@
       init_trigraph_map ();
 
 #ifdef ENABLE_NLS
-       (void) bindtextdomain ("gcc", LOCALEDIR);
+       (void) bindtextdomain (PACKAGE, LOCALEDIR);
 #endif
     }
 }


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