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

Commit8ea0257

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 parent0d3b231 commit8ea0257

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
@@ -184,15 +184,6 @@ extern unsigned char pg_ascii_tolower(unsigned char ch);
184184
#ifdefprintf
185185
#undef printf
186186
#endif
187-
/*
188-
* Versions of libintl >= 0.18? try to replace setlocale() with a macro
189-
* to their own versions. Remove the macro, if it exists, because it
190-
* ends up calling the wrong version when the backend and libintl use
191-
* different versions of msvcrt.
192-
*/
193-
#if defined(setlocale)&& defined(WIN32)
194-
#undef setlocale
195-
#endif
196187

197188
externintpg_vsnprintf(char*str,size_tcount,constchar*fmt,va_listargs);
198189
externint
@@ -235,6 +226,16 @@ __attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
235226
#endif
236227
#endif/* USE_REPL_SNPRINTF */
237228

229+
/*
230+
* Versions of libintl >= 0.18? try to replace setlocale() with a macro
231+
* to their own versions. Remove the macro, if it exists, because it
232+
* ends up calling the wrong version when the backend and libintl use
233+
* different versions of msvcrt.
234+
*/
235+
#if defined(setlocale)&& defined(WIN32)
236+
#undef setlocale
237+
#endif
238+
238239
/* Portable prompt handling */
239240
externchar*simple_prompt(constchar*prompt,intmaxlen,boolecho);
240241

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp