This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[libcpp/gcc patch] fix libcpp textdomain, set textdomain in terms of PACKAGE name
- From: Matthias Klose <doko at cs dot tu-berlin dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 21 Jul 2004 23:29:08 +0200
- Subject: [libcpp/gcc patch] fix libcpp textdomain, set textdomain in terms of PACKAGE name
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?
libcpp:
2004-07-21 Matthias Klose <doko@debian.org>
init.c (init_library): Use PACKAGE for the text domain.
Makefile.am (AM_CPPFLAGS): Add PACKAGE definition.
Makefile.in: Regenerate.
gcc:
2004-07-21 Matthias Klose <doko@debian.org>
intl.c(): Use PACKAGE for the text domain.
Makefile.in(intl.o): Pass PACKAGE definition.
Set gettext's domain and textdomain to the versioned package name.
--- libcpp/init.c~ 2004-07-04 18:19:01.000000000 +0200
+++ libcpp/init.c 2004-07-21 23:05:52.000000000 +0200
@@ -121,7 +121,7 @@
init_trigraph_map ();
#ifdef ENABLE_NLS
- (void) bindtextdomain ("gcc", LOCALEDIR);
+ (void) bindtextdomain (PACKAGE, LOCALEDIR);
#endif
}
}
--- libcpp/Makefile.am~ 2004-06-09 11:07:11.000000000 +0200
+++ libcpp/Makefile.am 2004-07-21 23:11:44.000000000 +0200
@@ -1,7 +1,8 @@
localedir = $(datadir)/locale
ACLOCAL_AMFLAGS = -I ../config
AM_CPPFLAGS = -I$(srcdir)/../include -I$(srcdir) @INCINTL@ \
- -I$(srcdir)/include -DLOCALEDIR="\"$(localedir)\""
+ -I$(srcdir)/include -DLOCALEDIR="\"$(localedir)\"" \
+ -DPACKAGE="\"$(PACKAGE)\""
noinst_LIBRARIES = libcpp.a
libcpp_a_SOURCES = \
libcpp_a_SOURCES = \
--- gcc/Makefile.in~ 2004-07-21 22:42:58.000000000 +0200
+++ gcc/Makefile.in 2004-07-21 22:43:37.000000000 +0200
@@ -2617,6 +2617,7 @@
intl.o: intl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) intl.h Makefile
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DLOCALEDIR=\"$(localedir)\" \
+ -DPACKAGE=\"$(PACKAGE)\" \
-c $(srcdir)/intl.c $(OUTPUT_OPTION)
#
--- gcc/intl.c~ 2004-07-21 22:51:38.000000000 +0200
+++ gcc/intl.c 2004-07-21 22:52:19.000000000 +0200
@@ -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 = _("`");