mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-11-27 07:21:09 +08:00
Undefine setlocale() macro on Win32
New versions of libintl redefine setlocale() to a macro which causes problems when the backend and libintl are linked against different versions of the runtime, which is often the case in msvc builds. Hiroshi Inoue, slightly updated comment by me
This commit is contained in:
parent
9f37a76a1c
commit
666407566d
@ -164,6 +164,15 @@ extern unsigned char pg_tolower(unsigned char ch);
|
||||
#ifdef printf
|
||||
#undef printf
|
||||
#endif
|
||||
/*
|
||||
* Versions of libintl >= 0.18? try to replace setlocale() with a macro
|
||||
* to their own versions. Remove the macro, if it exists, because it
|
||||
* ends up calling the wrong version when the backend and libintl use
|
||||
* different versions of msvcrt.
|
||||
*/
|
||||
#if defined(setlocale) && defined(WIN32)
|
||||
#undef setlocale
|
||||
#endif
|
||||
|
||||
extern int pg_vsnprintf(char *str, size_t count, const char *fmt, va_list args);
|
||||
extern int
|
||||
|
Loading…
Reference in New Issue
Block a user