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

Commit3a8ec88

Browse files
committed
Silence compiler warnings in new win32 locale code
when building on mingw.ITAGAKI Takahiro
1 parent5fe3da9 commit3a8ec88

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
staticcharlc_numeric_envbuf[LC_ENV_BUFSIZE];
9393
staticcharlc_time_envbuf[LC_ENV_BUFSIZE];
9494

95-
#ifdefWIN32
95+
#if defined(WIN32)&& defined(LC_MESSAGES)
9696
staticchar*IsoLocaleName(constchar*);/* MSVC specific */
9797
#endif
9898

@@ -158,7 +158,7 @@ pg_perm_setlocale(int category, const char *locale)
158158
#ifdefWIN32
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-
#ifdefWIN32
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
returnNULL;/* 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)

[8]ページ先頭

©2009-2025 Movatter.jp