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

Commit5273f21

Browse files
committed
Undefine setlocale() macro on Win32
New versions of libintl redefine setlocale() to a macrowhich causes problems when the backend and libintl arelinked against different versions of the runtime, whichis often the case in msvc builds.Hiroshi Inoue, slightly updated comment by me
1 parent56b21b7 commit5273f21

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎src/include/port.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,15 @@ extern unsigned char pg_tolower(unsigned char ch);
176176
#ifdefprintf
177177
#undef printf
178178
#endif
179+
/*
180+
* Versions of libintl >= 0.18? try to replace setlocale() with a macro
181+
* to their own versions. Remove the macro, if it exists, because it
182+
* ends up calling the wrong version when the backend and libintl use
183+
* different versions of msvcrt.
184+
*/
185+
#if defined(setlocale)&& defined(WIN32)
186+
#undef setlocale
187+
#endif
179188

180189
externintpg_vsnprintf(char*str,size_tcount,constchar*fmt,va_listargs);
181190
externint

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp