|
4 | 4 | * |
5 | 5 | * Portions Copyright (c) 2002-2005, PostgreSQL Global Development Group |
6 | 6 | * |
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 $ |
8 | 8 | * |
9 | 9 | *----------------------------------------------------------------------- |
10 | 10 | */ |
@@ -106,15 +106,17 @@ pg_perm_setlocale(int category, const char *locale) |
106 | 106 | * We must ignore attempts to set to "", which means "keep using the |
107 | 107 | * old environment value". |
108 | 108 | */ |
109 | | -if (category!=LC_MESSAGES) |
110 | | -result=setlocale(category,locale); |
111 | | -else |
| 109 | +#ifdefLC_MESSAGES |
| 110 | +if (category==LC_MESSAGES) |
112 | 111 | { |
113 | 112 | result= (char*)locale; |
114 | 113 | if (locale==NULL||locale[0]=='\0') |
115 | 114 | returnresult; |
116 | 115 | } |
| 116 | +else |
117 | 117 | #endif |
| 118 | +result=setlocale(category,locale); |
| 119 | +#endif/* WIN32 */ |
118 | 120 |
|
119 | 121 | if (result==NULL) |
120 | 122 | returnresult;/* fall out immediately on failure */ |
|