aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2011-09-01 09:13:37 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2011-09-01 09:36:41 +0300
commitf2d875983b9a1acf8c49477b5afe733a3ba7a817 (patch)
treea1ca88f0865e0e58db67f0ee34ba7e8b60812dad
parent899d7b00e98865d5e156e0624d7596320fceb7ab (diff)
downloadpostgresql-f2d875983b9a1acf8c49477b5afe733a3ba7a817.tar.gz
postgresql-f2d875983b9a1acf8c49477b5afe733a3ba7a817.zip
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 f2d751f33a9..f33ee15476c 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -165,15 +165,6 @@ 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
@@ -216,6 +207,16 @@ __attribute__((format(printf, 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);