# DP: Set gettext's domain and textdomain to the versioned package name. Index: b/src/gcc/intl.c =================================================================== --- a/src/gcc/intl.c +++ b/src/gcc/intl.c @@ -56,8 +56,8 @@ setlocale (LC_ALL, ""); #endif - (void) bindtextdomain ("gcc", LOCALEDIR); - (void) textdomain ("gcc"); + (void) bindtextdomain ("gcc-4.7", LOCALEDIR); + (void) textdomain ("gcc-4.7"); /* Opening quotation mark. */ open_quote = _("`"); Index: b/src/gcc/Makefile.in =================================================================== --- a/src/gcc/Makefile.in +++ b/src/gcc/Makefile.in @@ -5246,8 +5246,8 @@ dir=$(localedir)/$$lang/LC_MESSAGES; \ echo $(mkinstalldirs) $(DESTDIR)$$dir; \ $(mkinstalldirs) $(DESTDIR)$$dir || exit 1; \ - echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \ - $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \ + echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc-4.7.mo; \ + $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc-4.7.mo; \ done # Rule for regenerating the message template (gcc.pot). Index: b/src/libcpp/init.c =================================================================== --- a/src/libcpp/init.c +++ b/src/libcpp/init.c @@ -142,7 +142,7 @@ init_trigraph_map (); #ifdef ENABLE_NLS - (void) bindtextdomain (PACKAGE, LOCALEDIR); + (void) bindtextdomain (PACKAGE PACKAGE_SUFFIX, LOCALEDIR); #endif } } Index: b/src/libcpp/system.h =================================================================== --- a/src/libcpp/system.h +++ b/src/libcpp/system.h @@ -281,7 +281,7 @@ #endif #ifndef _ -# define _(msgid) dgettext (PACKAGE, msgid) +# define _(msgid) dgettext (PACKAGE PACKAGE_SUFFIX, msgid) #endif #ifndef N_ Index: b/src/libcpp/Makefile.in =================================================================== --- a/src/libcpp/Makefile.in +++ b/src/libcpp/Makefile.in @@ -49,6 +49,7 @@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ PACKAGE = @PACKAGE@ +PACKAGE_SUFFIX = -4.7 RANLIB = @RANLIB@ SHELL = @SHELL@ USED_CATALOGS = @USED_CATALOGS@ @@ -71,10 +72,11 @@ INCLUDES = -I$(srcdir) -I. -I$(srcdir)/../include @INCINTL@ \ -I$(srcdir)/include +DEBCPPFLAGS += -DPACKAGE_SUFFIX=\"$(strip $(PACKAGE_SUFFIX))\" -ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS) +ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS) $(DEBCPPFLAGS) ALL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(NOEXCEPTION_FLAGS) $(INCLUDES) \ - $(CPPFLAGS) + $(CPPFLAGS) $(DEBCPPFLAGS) # The name of the compiler to use. ENABLE_BUILD_WITH_CXX = @ENABLE_BUILD_WITH_CXX@ @@ -170,8 +172,8 @@ else continue; \ fi; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ - echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \ - $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \ + echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(PACKAGE_SUFFIX).mo; \ + $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(PACKAGE_SUFFIX).mo; \ done mostlyclean: