Commit 218b4e8d authored by Peter Eisentraut's avatar Peter Eisentraut

Append major version number and for libraries soname major version number

to the gettext domain name, to simplify parallel installations.

Also, rename set_text_domain() to pg_bindtextdomain(), because that is what
it does.
parent 55368223
...@@ -656,6 +656,7 @@ build_alias ...@@ -656,6 +656,7 @@ build_alias
host_alias host_alias
target_alias target_alias
configure_args configure_args
PG_MAJORVERSION
build build
build_cpu build_cpu
build_vendor build_vendor
...@@ -1910,6 +1911,13 @@ cat >>confdefs.h <<_ACEOF ...@@ -1910,6 +1911,13 @@ cat >>confdefs.h <<_ACEOF
#define PG_VERSION "$PACKAGE_VERSION" #define PG_VERSION "$PACKAGE_VERSION"
_ACEOF _ACEOF
PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
cat >>confdefs.h <<_ACEOF
#define PG_MAJORVERSION "$PG_MAJORVERSION"
_ACEOF
# Make sure we can run config.sub. # Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
...@@ -27183,6 +27191,7 @@ build_alias!$build_alias$ac_delim ...@@ -27183,6 +27191,7 @@ build_alias!$build_alias$ac_delim
host_alias!$host_alias$ac_delim host_alias!$host_alias$ac_delim
target_alias!$target_alias$ac_delim target_alias!$target_alias$ac_delim
configure_args!$configure_args$ac_delim configure_args!$configure_args$ac_delim
PG_MAJORVERSION!$PG_MAJORVERSION$ac_delim
build!$build$ac_delim build!$build$ac_delim
build_cpu!$build_cpu$ac_delim build_cpu!$build_cpu$ac_delim
build_vendor!$build_vendor$ac_delim build_vendor!$build_vendor$ac_delim
...@@ -27241,7 +27250,6 @@ EGREP!$EGREP$ac_delim ...@@ -27241,7 +27250,6 @@ EGREP!$EGREP$ac_delim
ELF_SYS!$ELF_SYS$ac_delim ELF_SYS!$ELF_SYS$ac_delim
LDFLAGS_SL!$LDFLAGS_SL$ac_delim LDFLAGS_SL!$LDFLAGS_SL$ac_delim
LD!$LD$ac_delim LD!$LD$ac_delim
with_gnu_ld!$with_gnu_ld$ac_delim
_ACEOF _ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
...@@ -27283,6 +27291,7 @@ _ACEOF ...@@ -27283,6 +27291,7 @@ _ACEOF
ac_delim='%!_!# ' ac_delim='%!_!# '
for ac_last_try in false false false false false :; do for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF cat >conf$$subs.sed <<_ACEOF
with_gnu_ld!$with_gnu_ld$ac_delim
ld_R_works!$ld_R_works$ac_delim ld_R_works!$ld_R_works$ac_delim
RANLIB!$RANLIB$ac_delim RANLIB!$RANLIB$ac_delim
STRIP!$STRIP$ac_delim STRIP!$STRIP$ac_delim
...@@ -27343,7 +27352,7 @@ vpath_build!$vpath_build$ac_delim ...@@ -27343,7 +27352,7 @@ vpath_build!$vpath_build$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF _ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 58; then if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 59; then
break break
elif $ac_last_try; then elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
......
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
dnl $PostgreSQL: pgsql/configure.in,v 1.576 2008/12/07 08:36:21 petere Exp $ dnl $PostgreSQL: pgsql/configure.in,v 1.577 2008/12/11 07:34:07 petere Exp $
dnl dnl
dnl Developers, please strive to achieve this order: dnl Developers, please strive to achieve this order:
dnl dnl
...@@ -30,6 +30,9 @@ AC_PREFIX_DEFAULT(/usr/local/pgsql) ...@@ -30,6 +30,9 @@ AC_PREFIX_DEFAULT(/usr/local/pgsql)
AC_SUBST(configure_args, [$ac_configure_args]) AC_SUBST(configure_args, [$ac_configure_args])
AC_DEFINE_UNQUOTED(PG_VERSION, "$PACKAGE_VERSION", [PostgreSQL version as a string]) AC_DEFINE_UNQUOTED(PG_VERSION, "$PACKAGE_VERSION", [PostgreSQL version as a string])
[PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`]
AC_SUBST(PG_MAJORVERSION)
AC_DEFINE_UNQUOTED(PG_MAJORVERSION, "$PG_MAJORVERSION", [PostgreSQL major version as a string])
AC_CANONICAL_HOST AC_CANONICAL_HOST
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# PostgreSQL documentation makefile # PostgreSQL documentation makefile
# #
# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.113 2008/11/26 11:26:54 petere Exp $ # $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.114 2008/12/11 07:34:07 petere Exp $
# #
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
...@@ -126,7 +126,7 @@ HTML.index: ...@@ -126,7 +126,7 @@ HTML.index:
version.sgml: $(top_builddir)/src/Makefile.global version.sgml: $(top_builddir)/src/Makefile.global
{ \ { \
echo "<!entity version \"$(VERSION)\">"; \ echo "<!entity version \"$(VERSION)\">"; \
echo "<!entity majorversion \"`expr $(VERSION) : '\([0-9][0-9]*\.[0-9][0-9]*\)'`\">"; \ echo "<!entity majorversion \"$(MAJORVERSION)\">"; \
} >$@ } >$@
features-supported.sgml: $(top_srcdir)/src/backend/catalog/sql_feature_packages.txt $(top_srcdir)/src/backend/catalog/sql_features.txt features-supported.sgml: $(top_srcdir)/src/backend/catalog/sql_feature_packages.txt $(top_srcdir)/src/backend/catalog/sql_features.txt
......
# -*-makefile-*- # -*-makefile-*-
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.248 2008/12/07 08:36:22 petere Exp $ # $PostgreSQL: pgsql/src/Makefile.global.in,v 1.249 2008/12/11 07:34:07 petere Exp $
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets, # All PostgreSQL makefiles include this file and use the variables it sets,
...@@ -30,6 +30,7 @@ all: ...@@ -30,6 +30,7 @@ all:
# PostgreSQL version number # PostgreSQL version number
VERSION = @PACKAGE_VERSION@ VERSION = @PACKAGE_VERSION@
MAJORVERSION = @PG_MAJORVERSION@
# Support for VPATH builds # Support for VPATH builds
vpath_build = @vpath_build@ vpath_build = @vpath_build@
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# Copyright (c) 1998, Regents of the University of California # Copyright (c) 1998, Regents of the University of California
# #
# IDENTIFICATION # IDENTIFICATION
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.118 2008/11/24 11:59:37 petere Exp $ # $PostgreSQL: pgsql/src/Makefile.shlib,v 1.119 2008/12/11 07:34:07 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -115,6 +115,10 @@ endif ...@@ -115,6 +115,10 @@ endif
# Try to keep the sections in some kind of order, folks... # Try to keep the sections in some kind of order, folks...
override CFLAGS += $(CFLAGS_SL) override CFLAGS += $(CFLAGS_SL)
ifdef SO_MAJOR_VERSION
# libraries ought to use this to refer to versioned gettext domain names
override CPPFLAGS += -DSO_MAJOR_VERSION=$(SO_MAJOR_VERSION)
endif
ifeq ($(PORTNAME), aix) ifeq ($(PORTNAME), aix)
ifdef SO_MAJOR_VERSION ifdef SO_MAJOR_VERSION
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/main/main.c,v 1.110 2008/01/01 19:45:49 momjian Exp $ * $PostgreSQL: pgsql/src/backend/main/main.c,v 1.111 2008/12/11 07:34:07 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -87,7 +87,7 @@ main(int argc, char *argv[]) ...@@ -87,7 +87,7 @@ main(int argc, char *argv[])
* error messages to be localized. * error messages to be localized.
*/ */
set_pglocale_pgservice(argv[0], "postgres"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("postgres"));
#ifdef WIN32 #ifdef WIN32
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/init/miscinit.c,v 1.168 2008/10/09 17:24:05 alvherre Exp $ * $PostgreSQL: pgsql/src/backend/utils/init/miscinit.c,v 1.169 2008/12/11 07:34:07 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1214,7 +1214,7 @@ process_local_preload_libraries(void) ...@@ -1214,7 +1214,7 @@ process_local_preload_libraries(void)
} }
void void
set_text_domain(const char *domain) pg_bindtextdomain(const char *domain)
{ {
#ifdef ENABLE_NLS #ifdef ENABLE_NLS
if (my_exec_path[0] != '\0') if (my_exec_path[0] != '\0')
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* Portions taken from FreeBSD. * Portions taken from FreeBSD.
* *
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.164 2008/11/14 02:09:51 tgl Exp $ * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.165 2008/12/11 07:34:07 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -2511,7 +2511,7 @@ main(int argc, char *argv[]) ...@@ -2511,7 +2511,7 @@ main(int argc, char *argv[])
}; };
progname = get_progname(argv[0]); progname = get_progname(argv[0]);
set_pglocale_pgservice(argv[0], "initdb"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("initdb"));
if (argc > 1) if (argc > 1)
{ {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* *
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.28 2008/03/27 03:57:33 tgl Exp $ * $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.29 2008/12/11 07:34:07 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -465,7 +465,7 @@ main(int argc, char **argv) ...@@ -465,7 +465,7 @@ main(int argc, char **argv)
int j; int j;
int ret; int ret;
set_pglocale_pgservice(argv[0], "pg_config"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_config"));
progname = get_progname(argv[0]); progname = get_progname(argv[0]);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001; * copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001;
* licence: BSD * licence: BSD
* *
* $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.41 2008/09/24 08:59:42 mha Exp $ * $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.42 2008/12/11 07:34:08 petere Exp $
*/ */
#include "postgres_fe.h" #include "postgres_fe.h"
...@@ -76,7 +76,7 @@ main(int argc, char *argv[]) ...@@ -76,7 +76,7 @@ main(int argc, char *argv[])
const char *strftime_fmt = "%c"; const char *strftime_fmt = "%c";
const char *progname; const char *progname;
set_pglocale_pgservice(argv[0], "pg_controldata"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_controldata"));
progname = get_progname(argv[0]); progname = get_progname(argv[0]);
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.104 2008/09/30 12:51:07 tgl Exp $ * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.105 2008/12/11 07:34:08 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1648,7 +1648,7 @@ main(int argc, char **argv) ...@@ -1648,7 +1648,7 @@ main(int argc, char **argv)
#endif #endif
progname = get_progname(argv[0]); progname = get_progname(argv[0]);
set_pglocale_pgservice(argv[0], "pg_ctl"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_ctl"));
/* /*
* save argv[0] so do_start() can look for the postmaster if necessary. we * save argv[0] so do_start() can look for the postmaster if necessary. we
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* by PostgreSQL * by PostgreSQL
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.506 2008/12/04 17:51:27 petere Exp $ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.507 2008/12/11 07:34:08 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -274,7 +274,7 @@ main(int argc, char **argv) ...@@ -274,7 +274,7 @@ main(int argc, char **argv)
{NULL, 0, NULL, 0} {NULL, 0, NULL, 0}
}; };
set_pglocale_pgservice(argv[0], "pg_dump"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_dump"));
g_verbose = false; g_verbose = false;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* *
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.108 2008/11/21 20:14:27 mha Exp $ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.109 2008/12/11 07:34:08 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -127,7 +127,7 @@ main(int argc, char *argv[]) ...@@ -127,7 +127,7 @@ main(int argc, char *argv[])
int optindex; int optindex;
set_pglocale_pgservice(argv[0], "pg_dump"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_dump"));
progname = get_progname(argv[0]); progname = get_progname(argv[0]);
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_restore.c,v 1.88 2008/04/13 03:49:22 tgl Exp $ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_restore.c,v 1.89 2008/12/11 07:34:08 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -119,7 +119,7 @@ main(int argc, char **argv) ...@@ -119,7 +119,7 @@ main(int argc, char **argv)
{NULL, 0, NULL, 0} {NULL, 0, NULL, 0}
}; };
set_pglocale_pgservice(argv[0], "pg_dump"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_dump"));
opts = NewRestoreOptions(); opts = NewRestoreOptions();
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.69 2008/11/14 21:45:07 tgl Exp $ * $PostgreSQL: pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.70 2008/12/11 07:34:08 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -96,7 +96,7 @@ main(int argc, char *argv[]) ...@@ -96,7 +96,7 @@ main(int argc, char *argv[])
int fd; int fd;
char path[MAXPGPATH]; char path[MAXPGPATH];
set_pglocale_pgservice(argv[0], "pg_resetxlog"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_resetxlog"));
progname = get_progname(argv[0]); progname = get_progname(argv[0]);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright (c) 2000-2008, PostgreSQL Global Development Group * Copyright (c) 2000-2008, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.151 2008/07/20 06:08:38 momjian Exp $ * $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.152 2008/12/11 07:34:08 petere Exp $
*/ */
#include "postgres_fe.h" #include "postgres_fe.h"
...@@ -96,7 +96,7 @@ main(int argc, char *argv[]) ...@@ -96,7 +96,7 @@ main(int argc, char *argv[])
char *password_prompt = NULL; char *password_prompt = NULL;
bool new_pass; bool new_pass;
set_pglocale_pgservice(argv[0], "psql"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("psql"));
if (argc > 1) if (argc > 1)
{ {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* Portions Copyright (c) 2002-2008, PostgreSQL Global Development Group * Portions Copyright (c) 2002-2008, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/bin/scripts/clusterdb.c,v 1.21 2008/11/24 08:46:04 petere Exp $ * $PostgreSQL: pgsql/src/bin/scripts/clusterdb.c,v 1.22 2008/12/11 07:34:08 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -58,7 +58,7 @@ main(int argc, char *argv[]) ...@@ -58,7 +58,7 @@ main(int argc, char *argv[])
bool verbose = false; bool verbose = false;
progname = get_progname(argv[0]); progname = get_progname(argv[0]);
set_pglocale_pgservice(argv[0], "pgscripts"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pgscripts"));
handle_help_version_opts(argc, argv, "clusterdb", help); handle_help_version_opts(argc, argv, "clusterdb", help);
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/bin/scripts/createdb.c,v 1.28 2008/11/10 16:25:41 alvherre Exp $ * $PostgreSQL: pgsql/src/bin/scripts/createdb.c,v 1.29 2008/12/11 07:34:08 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -63,7 +63,7 @@ main(int argc, char *argv[]) ...@@ -63,7 +63,7 @@ main(int argc, char *argv[])
PGresult *result; PGresult *result;
progname = get_progname(argv[0]); progname = get_progname(argv[0]);
set_pglocale_pgservice(argv[0], "pgscripts"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pgscripts"));
handle_help_version_opts(argc, argv, "createdb", help); handle_help_version_opts(argc, argv, "createdb", help);
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/bin/scripts/createlang.c,v 1.30 2008/07/14 22:00:04 momjian Exp $ * $PostgreSQL: pgsql/src/bin/scripts/createlang.c,v 1.31 2008/12/11 07:34:08 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -52,7 +52,7 @@ main(int argc, char *argv[]) ...@@ -52,7 +52,7 @@ main(int argc, char *argv[])
PGresult *result; PGresult *result;
progname = get_progname(argv[0]); progname = get_progname(argv[0]);
set_pglocale_pgservice(argv[0], "pgscripts"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pgscripts"));
handle_help_version_opts(argc, argv, "createlang", help); handle_help_version_opts(argc, argv, "createlang", help);
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/bin/scripts/createuser.c,v 1.38 2008/01/01 19:45:56 momjian Exp $ * $PostgreSQL: pgsql/src/bin/scripts/createuser.c,v 1.39 2008/12/11 07:34:08 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -81,7 +81,7 @@ main(int argc, char *argv[]) ...@@ -81,7 +81,7 @@ main(int argc, char *argv[])
PGresult *result; PGresult *result;
progname = get_progname(argv[0]); progname = get_progname(argv[0]);
set_pglocale_pgservice(argv[0], "pgscripts"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pgscripts"));
handle_help_version_opts(argc, argv, "createuser", help); handle_help_version_opts(argc, argv, "createuser", help);
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/bin/scripts/dropdb.c,v 1.22 2008/01/01 19:45:56 momjian Exp $ * $PostgreSQL: pgsql/src/bin/scripts/dropdb.c,v 1.23 2008/12/11 07:34:08 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -50,7 +50,7 @@ main(int argc, char *argv[]) ...@@ -50,7 +50,7 @@ main(int argc, char *argv[])
PGresult *result; PGresult *result;
progname = get_progname(argv[0]); progname = get_progname(argv[0]);
set_pglocale_pgservice(argv[0], "pgscripts"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pgscripts"));
handle_help_version_opts(argc, argv, "dropdb", help); handle_help_version_opts(argc, argv, "dropdb", help);
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/bin/scripts/droplang.c,v 1.27 2008/07/14 22:00:04 momjian Exp $ * $PostgreSQL: pgsql/src/bin/scripts/droplang.c,v 1.28 2008/12/11 07:34:08 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -63,7 +63,7 @@ main(int argc, char *argv[]) ...@@ -63,7 +63,7 @@ main(int argc, char *argv[])
PGresult *result; PGresult *result;
progname = get_progname(argv[0]); progname = get_progname(argv[0]);
set_pglocale_pgservice(argv[0], "pgscripts"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pgscripts"));
handle_help_version_opts(argc, argv, "droplang", help); handle_help_version_opts(argc, argv, "droplang", help);
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/bin/scripts/dropuser.c,v 1.23 2008/01/01 19:45:56 momjian Exp $ * $PostgreSQL: pgsql/src/bin/scripts/dropuser.c,v 1.24 2008/12/11 07:34:08 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -50,7 +50,7 @@ main(int argc, char *argv[]) ...@@ -50,7 +50,7 @@ main(int argc, char *argv[])
PGresult *result; PGresult *result;
progname = get_progname(argv[0]); progname = get_progname(argv[0]);
set_pglocale_pgservice(argv[0], "pgscripts"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pgscripts"));
handle_help_version_opts(argc, argv, "dropuser", help); handle_help_version_opts(argc, argv, "dropuser", help);
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/bin/scripts/reindexdb.c,v 1.13 2008/01/01 19:45:56 momjian Exp $ * $PostgreSQL: pgsql/src/bin/scripts/reindexdb.c,v 1.14 2008/12/11 07:34:08 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -64,7 +64,7 @@ main(int argc, char *argv[]) ...@@ -64,7 +64,7 @@ main(int argc, char *argv[])
const char *index = NULL; const char *index = NULL;
progname = get_progname(argv[0]); progname = get_progname(argv[0]);
set_pglocale_pgservice(argv[0], "pgscripts"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pgscripts"));
handle_help_version_opts(argc, argv, "reindexdb", help); handle_help_version_opts(argc, argv, "reindexdb", help);
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/bin/scripts/vacuumdb.c,v 1.20 2008/01/01 19:45:56 momjian Exp $ * $PostgreSQL: pgsql/src/bin/scripts/vacuumdb.c,v 1.21 2008/12/11 07:34:08 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -64,7 +64,7 @@ main(int argc, char *argv[]) ...@@ -64,7 +64,7 @@ main(int argc, char *argv[])
bool verbose = false; bool verbose = false;
progname = get_progname(argv[0]); progname = get_progname(argv[0]);
set_pglocale_pgservice(argv[0], "pgscripts"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pgscripts"));
handle_help_version_opts(argc, argv, "vacuumdb", help); handle_help_version_opts(argc, argv, "vacuumdb", help);
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/c.h,v 1.230 2008/10/09 22:23:46 tgl Exp $ * $PostgreSQL: pgsql/src/include/c.h,v 1.231 2008/12/11 07:34:08 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -715,6 +715,32 @@ typedef NameData *Name; ...@@ -715,6 +715,32 @@ typedef NameData *Name;
#define STATUS_WAITING (2) #define STATUS_WAITING (2)
/* gettext domain name mangling */
/*
* To better support parallel installations of major PostgeSQL
* versions as well as parallel installations of major library soname
* versions, we mangle the gettext domain name by appending those
* version numbers. The coding rule ought to be that whereever the
* domain name is mentioned as a literal, it must be wrapped into
* PG_TEXTDOMAIN(). The macros below do not work on non-literals; but
* that is somewhat intentional because it avoids having to worry
* about multiple states of premangling and postmangling as the values
* are being passed around.
*
* Make sure this matches the installation rules in nls-global.mk.
*/
/* need a second indirection because we want to stringize the macro value, not the name */
#define CppAsString2(x) CppAsString(x)
#ifdef SO_MAJOR_VERSION
# define PG_TEXTDOMAIN(domain) (domain CppAsString2(SO_MAJOR_VERSION) "-" PG_MAJORVERSION)
#else
# define PG_TEXTDOMAIN(domain) (domain "-" PG_MAJORVERSION)
#endif
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* Section 8: system-specific hacks * Section 8: system-specific hacks
* *
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.205 2008/11/11 02:42:32 tgl Exp $ * $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.206 2008/12/11 07:34:08 petere Exp $
* *
* NOTES * NOTES
* some of the information in this file should be moved to other files. * some of the information in this file should be moved to other files.
...@@ -343,7 +343,7 @@ extern void RecordSharedMemoryInLockFile(unsigned long id1, ...@@ -343,7 +343,7 @@ extern void RecordSharedMemoryInLockFile(unsigned long id1,
extern void ValidatePgVersion(const char *path); extern void ValidatePgVersion(const char *path);
extern void process_shared_preload_libraries(void); extern void process_shared_preload_libraries(void);
extern void process_local_preload_libraries(void); extern void process_local_preload_libraries(void);
extern void set_text_domain(const char *domain); extern void pg_bindtextdomain(const char *domain);
/* in access/transam/xlog.c */ /* in access/transam/xlog.c */
extern bool BackupInProgress(void); extern bool BackupInProgress(void);
......
...@@ -642,6 +642,9 @@ ...@@ -642,6 +642,9 @@
(--with-krb-srvnam=NAME) */ (--with-krb-srvnam=NAME) */
#undef PG_KRB_SRVNAM #undef PG_KRB_SRVNAM
/* PostgreSQL major version as a string */
#undef PG_MAJORVERSION
/* PostgreSQL version as a string */ /* PostgreSQL version as a string */
#undef PG_VERSION #undef PG_VERSION
......
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.43 2008/11/01 19:53:35 meskes Exp $ */ /* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.44 2008/12/11 07:34:09 petere Exp $ */
#define POSTGRES_ECPG_INTERNAL #define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h" #include "postgres_fe.h"
...@@ -474,7 +474,7 @@ ecpg_gettext(const char *msgid) ...@@ -474,7 +474,7 @@ ecpg_gettext(const char *msgid)
ldir = getenv("PGLOCALEDIR"); ldir = getenv("PGLOCALEDIR");
if (!ldir) if (!ldir)
ldir = LOCALEDIR; ldir = LOCALEDIR;
bindtextdomain("ecpg", ldir); bindtextdomain(PG_TEXTDOMAIN("ecpg"), ldir);
#ifdef WIN32 #ifdef WIN32
SetLastError(save_errno); SetLastError(save_errno);
#else #else
...@@ -482,7 +482,7 @@ ecpg_gettext(const char *msgid) ...@@ -482,7 +482,7 @@ ecpg_gettext(const char *msgid)
#endif #endif
} }
return dgettext("ecpg", msgid); return dgettext(PG_TEXTDOMAIN("ecpg"), msgid);
} }
#endif /* ENABLE_NLS */ #endif /* ENABLE_NLS */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.105 2008/05/16 15:20:04 petere Exp $ */ /* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.106 2008/12/11 07:34:09 petere Exp $ */
/* New main for ecpg, the PostgreSQL embedded SQL precompiler. */ /* New main for ecpg, the PostgreSQL embedded SQL precompiler. */
/* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */ /* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */
...@@ -138,7 +138,7 @@ main(int argc, char *const argv[]) ...@@ -138,7 +138,7 @@ main(int argc, char *const argv[])
char my_exec_path[MAXPGPATH]; char my_exec_path[MAXPGPATH];
char include_path[MAXPGPATH]; char include_path[MAXPGPATH];
set_pglocale_pgservice(argv[0], "ecpg"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("ecpg"));
progname = get_progname(argv[0]); progname = get_progname(argv[0]);
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.136 2008/10/27 09:42:31 mha Exp $ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.137 2008/12/11 07:34:09 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1166,7 +1166,7 @@ libpq_gettext(const char *msgid) ...@@ -1166,7 +1166,7 @@ libpq_gettext(const char *msgid)
ldir = getenv("PGLOCALEDIR"); ldir = getenv("PGLOCALEDIR");
if (!ldir) if (!ldir)
ldir = LOCALEDIR; ldir = LOCALEDIR;
bindtextdomain("libpq", ldir); bindtextdomain(PG_TEXTDOMAIN("libpq"), ldir);
#ifdef WIN32 #ifdef WIN32
SetLastError(save_errno); SetLastError(save_errno);
#else #else
...@@ -1174,7 +1174,7 @@ libpq_gettext(const char *msgid) ...@@ -1174,7 +1174,7 @@ libpq_gettext(const char *msgid)
#endif #endif
} }
return dgettext("libpq", msgid); return dgettext(PG_TEXTDOMAIN("libpq"), msgid);
} }
#endif /* ENABLE_NLS */ #endif /* ENABLE_NLS */
# $PostgreSQL: pgsql/src/nls-global.mk,v 1.14 2008/05/17 21:27:12 momjian Exp $ # $PostgreSQL: pgsql/src/nls-global.mk,v 1.15 2008/12/11 07:34:07 petere Exp $
# Common rules for Native Language Support (NLS) # Common rules for Native Language Support (NLS)
# #
...@@ -62,10 +62,11 @@ else # not XGETTEXT ...@@ -62,10 +62,11 @@ else # not XGETTEXT
endif # not XGETTEXT endif # not XGETTEXT
# catalog name extentions must match behavior of PG_TEXTDOMAIN() in c.h
install-po: all-po installdirs-po install-po: all-po installdirs-po
ifneq (,$(LANGUAGES)) ifneq (,$(LANGUAGES))
for lang in $(LANGUAGES); do \ for lang in $(LANGUAGES); do \
$(INSTALL_DATA) po/$$lang.mo '$(DESTDIR)$(localedir)'/$$lang/LC_MESSAGES/$(CATALOG_NAME).mo || exit 1; \ $(INSTALL_DATA) po/$$lang.mo '$(DESTDIR)$(localedir)'/$$lang/LC_MESSAGES/$(CATALOG_NAME)$(SO_MAJOR_VERSION)-$(MAJORVERSION).mo || exit 1; \
done done
endif endif
...@@ -73,7 +74,7 @@ installdirs-po: ...@@ -73,7 +74,7 @@ installdirs-po:
$(mkinstalldirs) $(foreach lang, $(LANGUAGES), '$(DESTDIR)$(localedir)'/$(lang)/LC_MESSAGES) $(mkinstalldirs) $(foreach lang, $(LANGUAGES), '$(DESTDIR)$(localedir)'/$(lang)/LC_MESSAGES)
uninstall-po: uninstall-po:
rm -f $(foreach lang, $(LANGUAGES), '$(DESTDIR)$(localedir)'/$(lang)/LC_MESSAGES/$(CATALOG_NAME).mo) rm -f $(foreach lang, $(LANGUAGES), '$(DESTDIR)$(localedir)'/$(lang)/LC_MESSAGES/$(CATALOG_NAME)$(SO_MAJOR_VERSION)-$(MAJORVERSION).mo)
clean-po: clean-po:
......
/********************************************************************** /**********************************************************************
* plperl.c - perl as a procedural language for PostgreSQL * plperl.c - perl as a procedural language for PostgreSQL
* *
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.142 2008/11/19 01:10:24 tgl Exp $ * $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.143 2008/12/11 07:34:09 petere Exp $
* *
**********************************************************************/ **********************************************************************/
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
/* define our text domain for translations */ /* define our text domain for translations */
#undef TEXTDOMAIN #undef TEXTDOMAIN
#define TEXTDOMAIN "plperl" #define TEXTDOMAIN PG_TEXTDOMAIN("plperl")
/* perl stuff */ /* perl stuff */
#include "plperl.h" #include "plperl.h"
...@@ -190,7 +190,7 @@ _PG_init(void) ...@@ -190,7 +190,7 @@ _PG_init(void)
if (inited) if (inited)
return; return;
set_text_domain(TEXTDOMAIN); pg_bindtextdomain(TEXTDOMAIN);
DefineCustomBoolVariable("plperl.use_strict", DefineCustomBoolVariable("plperl.use_strict",
gettext_noop("If true, will compile trusted and untrusted perl code in strict mode"), gettext_noop("If true, will compile trusted and untrusted perl code in strict mode"),
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_handler.c,v 1.41 2008/10/09 17:24:05 alvherre Exp $ * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_handler.c,v 1.42 2008/12/11 07:34:09 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -42,7 +42,7 @@ _PG_init(void) ...@@ -42,7 +42,7 @@ _PG_init(void)
if (inited) if (inited)
return; return;
set_text_domain(TEXTDOMAIN); pg_bindtextdomain(TEXTDOMAIN);
plpgsql_HashTableInit(); plpgsql_HashTableInit();
RegisterXactCallback(plpgsql_xact_cb, NULL); RegisterXactCallback(plpgsql_xact_cb, NULL);
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/pl/plpgsql/src/plpgsql.h,v 1.105 2008/11/05 00:07:54 tgl Exp $ * $PostgreSQL: pgsql/src/pl/plpgsql/src/plpgsql.h,v 1.106 2008/12/11 07:34:09 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
/* define our text domain for translations */ /* define our text domain for translations */
#undef TEXTDOMAIN #undef TEXTDOMAIN
#define TEXTDOMAIN "plpgsql" #define TEXTDOMAIN PG_TEXTDOMAIN("plpgsql")
/* ---------- /* ----------
* Compiler's namestack item types * Compiler's namestack item types
......
/********************************************************************** /**********************************************************************
* plpython.c - python as a procedural language for PostgreSQL * plpython.c - python as a procedural language for PostgreSQL
* *
* $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.116 2008/11/04 15:16:48 tgl Exp $ * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.117 2008/12/11 07:34:09 petere Exp $
* *
********************************************************************* *********************************************************************
*/ */
...@@ -66,7 +66,7 @@ typedef int Py_ssize_t; ...@@ -66,7 +66,7 @@ typedef int Py_ssize_t;
/* define our text domain for translations */ /* define our text domain for translations */
#undef TEXTDOMAIN #undef TEXTDOMAIN
#define TEXTDOMAIN "plpython" #define TEXTDOMAIN PG_TEXTDOMAIN("plpython")
#include <compile.h> #include <compile.h>
#include <eval.h> #include <eval.h>
...@@ -2750,7 +2750,7 @@ _PG_init(void) ...@@ -2750,7 +2750,7 @@ _PG_init(void)
if (inited) if (inited)
return; return;
set_text_domain(TEXTDOMAIN); pg_bindtextdomain(TEXTDOMAIN);
Py_Initialize(); Py_Initialize();
PLy_init_interp(); PLy_init_interp();
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* pltcl.c - PostgreSQL support for Tcl as * pltcl.c - PostgreSQL support for Tcl as
* procedural language (PL) * procedural language (PL)
* *
* $PostgreSQL: pgsql/src/pl/tcl/pltcl.c,v 1.123 2008/10/11 00:09:33 alvherre Exp $ * $PostgreSQL: pgsql/src/pl/tcl/pltcl.c,v 1.124 2008/12/11 07:34:09 petere Exp $
* *
**********************************************************************/ **********************************************************************/
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
/* define our text domain for translations */ /* define our text domain for translations */
#undef TEXTDOMAIN #undef TEXTDOMAIN
#define TEXTDOMAIN "pltcl" #define TEXTDOMAIN PG_TEXTDOMAIN("pltcl")
#if defined(UNICODE_CONVERSION) && HAVE_TCL_VERSION(8,1) #if defined(UNICODE_CONVERSION) && HAVE_TCL_VERSION(8,1)
...@@ -268,7 +268,7 @@ _PG_init(void) ...@@ -268,7 +268,7 @@ _PG_init(void)
if (pltcl_pm_init_done) if (pltcl_pm_init_done)
return; return;
set_text_domain(TEXTDOMAIN); pg_bindtextdomain(TEXTDOMAIN);
#ifdef WIN32 #ifdef WIN32
/* Required on win32 to prevent error loading init.tcl */ /* Required on win32 to prevent error loading init.tcl */
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/port/exec.c,v 1.60 2008/04/16 22:16:00 adunstan Exp $ * $PostgreSQL: pgsql/src/port/exec.c,v 1.61 2008/12/11 07:34:09 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -630,7 +630,7 @@ set_pglocale_pgservice(const char *argv0, const char *app) ...@@ -630,7 +630,7 @@ set_pglocale_pgservice(const char *argv0, const char *app)
* PGLOCALEDIR */ * PGLOCALEDIR */
/* don't set LC_ALL in the backend */ /* don't set LC_ALL in the backend */
if (strcmp(app, "postgres") != 0) if (strcmp(app, PG_TEXTDOMAIN("postgres")) != 0)
setlocale(LC_ALL, ""); setlocale(LC_ALL, "");
if (find_my_exec(argv0, my_exec_path) < 0) if (find_my_exec(argv0, my_exec_path) < 0)
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.54 2008/11/28 12:45:34 petere Exp $ * $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.55 2008/12/11 07:34:09 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1894,7 +1894,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc ...@@ -1894,7 +1894,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
}; };
progname = get_progname(argv[0]); progname = get_progname(argv[0]);
set_pglocale_pgservice(argv[0], "pg_regress"); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_regress"));
#ifndef HAVE_UNIX_SOCKETS #ifndef HAVE_UNIX_SOCKETS
/* no unix domain sockets available, so change default */ /* no unix domain sockets available, so change default */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment