summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Linnakangas2011-09-01 06:13:37 +0000
committerHeikki Linnakangas2011-09-01 06:18:16 +0000
commit116b67f3add43b750c73e30727a58922080067bf (patch)
tree15d6c881b36657926a6cd44a94b56c8a39ce8ab9
parentf759ef139ea3d1b2c74c8b6275ca959d7320f4a6 (diff)
Move the line to undefine setlocale() macro on Win32 outside USE_REPL_SNPRINTF
ifdef block. It has nothing to do with whether the replacement snprintf function is used. It caused no live bug, because the replacement snprintf function is always used on Win32, but it was nevertheless misplaced.
-rw-r--r--src/include/port.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/include/port.h b/src/include/port.h
index 4c7ed643177..13cc7ffcc09 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -183,15 +183,6 @@ extern unsigned char pg_ascii_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
@@ -234,6 +225,16 @@ __attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
#endif
#endif /* USE_REPL_SNPRINTF */
+/*
+ * 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
+
/* Portable prompt handling */
extern char *simple_prompt(const char *prompt, int maxlen, bool echo);