Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1c49561

Browse files
committed
Update "pg_regress --no-locale" for Darwin and Windows.
Commit894459e revealed this option tobe broken for NLS builds on Darwin, but "make -C contrib/unaccent check"and the buildfarm client rely on it. Fix that configuration byredefining the option to imply LANG=C on Darwin. In passing, use LANG=Cinstead of LANG=en on Windows; since only postmaster startup uses thatvalue, testers are unlikely to notice the change. Back-patch to 9.0,like the predecessor commit.
1 parent450530f commit1c49561

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

‎src/test/regress/pg_regress.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -798,9 +798,17 @@ initialize_environment(void)
798798
unsetenv("LC_NUMERIC");
799799
unsetenv("LC_TIME");
800800
unsetenv("LANG");
801-
/* On Windows the default locale cannot be English, so force it */
802-
#if defined(WIN32)|| defined(__CYGWIN__)
803-
putenv("LANG=en");
801+
802+
/*
803+
* Most platforms have adopted the POSIX locale as their
804+
* implementation-defined default locale. Exceptions include native
805+
* Windows, Darwin with --enable-nls, and Cygwin with --enable-nls.
806+
* (Use of --enable-nls matters because libintl replaces setlocale().)
807+
* Also, PostgreSQL does not support Darwin with locale environment
808+
* variables unset; see PostmasterMain().
809+
*/
810+
#if defined(WIN32)|| defined(__CYGWIN__)|| defined(__darwin__)
811+
putenv("LANG=C");
804812
#endif
805813
}
806814

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp