Re: pgsql: Arrange to set the LC_XXX environment variables to match our

Started by Magnus Haganderover 20 years ago5 messagescomitters
Jump to latest
#1Magnus Hagander
magnus@hagander.net

This patch appears to have killed win32 builds that *don't* have NLS
enabled:

gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
-Wdeclaration-after-
statement -Wendif-labels -fno-strict-aliasing -g
-I../../../../src/include -I./s
rc/include/port/win32 -DEXEC_BACKEND -I/f/krb5/inc/krb5
"-I../../../../src/incl
ude/port/win32" -DBUILDING_DLL -c -o pg_locale.o pg_locale.c
pg_locale.c: In function `pg_perm_setlocale':
pg_locale.c:109: error: `LC_MESSAGES' undeclared (first use in this
function)
pg_locale.c:109: error: (Each undeclared identifier is reported only
once
pg_locale.c:109: error: for each function it appears in.)
make: *** [pg_locale.o] Error 1

With NLS enabled, it builds.

Which brings a point - with NLS being so troublesome on win32, perhaps
one of the machines building on the buildfarm could be reconfigured to
not build with NLS?

//Magnus

Show quoted text

-----Original Message-----
From: pgsql-committers-owner@postgresql.org
[mailto:pgsql-committers-owner@postgresql.org] On Behalf Of Tom Lane
Sent: Thursday, December 29, 2005 12:23 AM
To: pgsql-committers@postgresql.org
Subject: pgsql: Arrange to set the LC_XXX environment
variables to match our

Log Message:
-----------
Arrange to set the LC_XXX environment variables to match our
locale setup. This protects against undesired changes in
locale behavior if someone carelessly does setlocale(LC_ALL,
"") (and we know who you are, perl guys).

Modified Files:
--------------
pgsql/src/backend/access/transam:
xlog.c (r1.223 -> r1.224)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/
access/transam/xlog.c.diff?r1=1.223&r2=1.224)
pgsql/src/backend/main:
main.c (r1.97 -> r1.98)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/
main/main.c.diff?r1=1.97&r2=1.98)
pgsql/src/backend/utils/adt:
pg_locale.c (r1.32 -> r1.33)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/
utils/adt/pg_locale.c.diff?r1=1.32&r2=1.33)
pgsql/src/include/utils:
pg_locale.h (r1.20 -> r1.21)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/
utils/pg_locale.h.diff?r1=1.20&r2=1.21)

---------------------------(end of
broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org
so that your
message can get through to the mailing list cleanly

#2Dave Page
dpage@pgadmin.org
In reply to: Magnus Hagander (#1)
Re: pgsql: Arrange to set the LC_XXX environment

On 31/12/05 14:35, "Magnus Hagander" <mha@sollentuna.net> wrote:

Which brings a point - with NLS being so troublesome on win32, perhaps
one of the machines building on the buildfarm could be reconfigured to
not build with NLS?

Not a bad idea. I'd suggest it's not Snake though, as that box is kept in
sync compiler/config/dependency-wise with the machine that the distributions
are built on.

Regards, Dave.

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Magnus Hagander (#1)

"Magnus Hagander" <mha@sollentuna.net> writes:

This patch appears to have killed win32 builds that *don't* have NLS
enabled:

pg_locale.c:109: error: `LC_MESSAGES' undeclared (first use in this
function)

Silly me for assuming all WIN32 platforms are alike ;-)

What's the appropriate behavior in this case --- just treat it as a
no-op, as we do on Unix when LC_MESSAGES isn't defined?

regards, tom lane

#4Magnus Hagander
magnus@hagander.net
In reply to: Tom Lane (#3)

This patch appears to have killed win32 builds that *don't* have NLS
enabled:

pg_locale.c:109: error: `LC_MESSAGES' undeclared (first use in this
function)

Silly me for assuming all WIN32 platforms are alike ;-)

Yes, indeed!
(LC_MESSAGES comes from libintl. Windows never supports it.)

What's the appropriate behavior in this case --- just treat
it as a no-op, as we do on Unix when LC_MESSAGES isn't defined?

Yes, I think that's correct.

//Magnus

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Magnus Hagander (#4)

"Magnus Hagander" <mha@sollentuna.net> writes:

This patch appears to have killed win32 builds that *don't* have NLS
enabled:

What's the appropriate behavior in this case --- just treat
it as a no-op, as we do on Unix when LC_MESSAGES isn't defined?

Yes, I think that's correct.

OK, patch committed.

regards, tom lane