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

Commitfd924b2

Browse files
committed
Don't assume that LC_MESSAGES is always available on WIN32. Per Magnus.
1 parent499f4d5 commitfd924b2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎src/backend/utils/adt/pg_locale.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Portions Copyright (c) 2002-2005, PostgreSQL Global Development Group
66
*
7-
* $PostgreSQL: pgsql/src/backend/utils/adt/pg_locale.c,v 1.33 2005/12/28 23:22:51 tgl Exp $
7+
* $PostgreSQL: pgsql/src/backend/utils/adt/pg_locale.c,v 1.34 2006/01/02 20:25:45 tgl Exp $
88
*
99
*-----------------------------------------------------------------------
1010
*/
@@ -106,15 +106,17 @@ pg_perm_setlocale(int category, const char *locale)
106106
* We must ignore attempts to set to "", which means "keep using the
107107
* old environment value".
108108
*/
109-
if (category!=LC_MESSAGES)
110-
result=setlocale(category,locale);
111-
else
109+
#ifdefLC_MESSAGES
110+
if (category==LC_MESSAGES)
112111
{
113112
result= (char*)locale;
114113
if (locale==NULL||locale[0]=='\0')
115114
returnresult;
116115
}
116+
else
117117
#endif
118+
result=setlocale(category,locale);
119+
#endif/* WIN32 */
118120

119121
if (result==NULL)
120122
returnresult;/* fall out immediately on failure */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp