|
4 | 4 | * |
5 | 5 | * Portions Copyright (c) 2002-2009, PostgreSQL Global Development Group |
6 | 6 | * |
7 | | - * $PostgreSQL: pgsql/src/backend/utils/adt/pg_locale.c,v 1.47 2009/01/21 12:45:06 mha Exp $ |
| 7 | + * $PostgreSQL: pgsql/src/backend/utils/adt/pg_locale.c,v 1.48 2009/01/27 12:45:09 mha Exp $ |
8 | 8 | * |
9 | 9 | *----------------------------------------------------------------------- |
10 | 10 | */ |
@@ -92,7 +92,7 @@ static char lc_monetary_envbuf[LC_ENV_BUFSIZE]; |
92 | 92 | staticcharlc_numeric_envbuf[LC_ENV_BUFSIZE]; |
93 | 93 | staticcharlc_time_envbuf[LC_ENV_BUFSIZE]; |
94 | 94 |
|
95 | | -#ifdefWIN32 |
| 95 | +#if defined(WIN32)&& defined(LC_MESSAGES) |
96 | 96 | staticchar*IsoLocaleName(constchar*);/* MSVC specific */ |
97 | 97 | #endif |
98 | 98 |
|
@@ -158,7 +158,7 @@ pg_perm_setlocale(int category, const char *locale) |
158 | 158 | #ifdefWIN32 |
159 | 159 | result=IsoLocaleName(locale); |
160 | 160 | if (result==NULL) |
161 | | -result=locale; |
| 161 | +result=(char*)locale; |
162 | 162 | #endif/* WIN32 */ |
163 | 163 | break; |
164 | 164 | #endif/* LC_MESSAGES */ |
@@ -601,7 +601,7 @@ cache_locale_time(void) |
601 | 601 | } |
602 | 602 |
|
603 | 603 |
|
604 | | -#ifdefWIN32 |
| 604 | +#if defined(WIN32)&& defined(LC_MESSAGES) |
605 | 605 | /* |
606 | 606 | *Convert Windows locale name to the ISO formatted one |
607 | 607 | *if possible. |
@@ -647,5 +647,5 @@ char *IsoLocaleName(const char *winlocname) |
647 | 647 | returnNULL;/* Not supported on this version of msvc/mingw */ |
648 | 648 | #endif/* _MSC_VER >= 1400 */ |
649 | 649 | } |
650 | | -#endif/* WIN32 */ |
| 650 | +#endif/* WIN32&& LC_MESSAGES*/ |
651 | 651 |
|