Skip to content

Commit 3a8ec88

Browse files
committed
Silence compiler warnings in new win32 locale code
when building on mingw. ITAGAKI Takahiro
1 parent 5fe3da9 commit 3a8ec88

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/backend/utils/adt/pg_locale.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Portions Copyright (c) 2002-2009, PostgreSQL Global Development Group
66
*
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 $
88
*
99
*-----------------------------------------------------------------------
1010
*/
@@ -92,7 +92,7 @@ static char lc_monetary_envbuf[LC_ENV_BUFSIZE];
9292
static char lc_numeric_envbuf[LC_ENV_BUFSIZE];
9393
static char lc_time_envbuf[LC_ENV_BUFSIZE];
9494

95-
#ifdef WIN32
95+
#if defined(WIN32) && defined(LC_MESSAGES)
9696
static char *IsoLocaleName(const char *); /* MSVC specific */
9797
#endif
9898

@@ -158,7 +158,7 @@ pg_perm_setlocale(int category, const char *locale)
158158
#ifdef WIN32
159159
result = IsoLocaleName(locale);
160160
if (result == NULL)
161-
result = locale;
161+
result = (char *) locale;
162162
#endif /* WIN32 */
163163
break;
164164
#endif /* LC_MESSAGES */
@@ -601,7 +601,7 @@ cache_locale_time(void)
601601
}
602602

603603

604-
#ifdef WIN32
604+
#if defined(WIN32) && defined(LC_MESSAGES)
605605
/*
606606
* Convert Windows locale name to the ISO formatted one
607607
* if possible.
@@ -647,5 +647,5 @@ char *IsoLocaleName(const char *winlocname)
647647
return NULL; /* Not supported on this version of msvc/mingw */
648648
#endif /* _MSC_VER >= 1400 */
649649
}
650-
#endif /* WIN32 */
650+
#endif /* WIN32 && LC_MESSAGES */
651651

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy