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

Commita02e409

Browse files
committed
Move the line to undefine setlocale() macro on Win32 outside USE_REPL_SNPRINTF
ifdef block. It has nothing to do with whether the replacement snprintffunction is used. It caused no live bug, because the replacement snprintffunction is always used on Win32, but it was nevertheless misplaced.
1 parent3505862 commita02e409

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

‎src/include/port.h

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,6 @@ 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
188179

189180
externintpg_vsnprintf(char*str,size_tcount,constchar*fmt,va_listargs);
190181
externint
@@ -227,6 +218,16 @@ __attribute__((format(printf, 1, 2)));
227218
#endif
228219
#endif/* USE_REPL_SNPRINTF */
229220

221+
/*
222+
* Versions of libintl >= 0.18? try to replace setlocale() with a macro
223+
* to their own versions. Remove the macro, if it exists, because it
224+
* ends up calling the wrong version when the backend and libintl use
225+
* different versions of msvcrt.
226+
*/
227+
#if defined(setlocale)&& defined(WIN32)
228+
#undef setlocale
229+
#endif
230+
230231
/* Portable prompt handling */
231232
externchar*simple_prompt(constchar*prompt,intmaxlen,boolecho);
232233

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp