Put undef's before extern declarations that need 'em, per Andrew Dunstan.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 6 Dec 2005 05:13:56 +0000 (05:13 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 6 Dec 2005 05:13:56 +0000 (05:13 +0000)
src/include/port.h

index 424b1f7f9cbb57861dfea950d54aae8e682fd767..509518ac4da252dd01294f7ed7c09a52ff84cd4c 100644 (file)
@@ -114,24 +114,6 @@ extern unsigned char pg_tolower(unsigned char ch);
 
 #ifdef USE_REPL_SNPRINTF
 
-extern int     pg_vsnprintf(char *str, size_t count, const char *fmt, va_list args);
-extern int
-pg_snprintf(char *str, size_t count, const char *fmt,...)
-/* This extension allows gcc to check the format string */
-__attribute__((format(printf, 3, 4)));
-extern int
-pg_sprintf(char *str, const char *fmt,...)
-/* This extension allows gcc to check the format string */
-__attribute__((format(printf, 2, 3)));
-extern int
-pg_fprintf(FILE *stream, const char *fmt,...)
-/* This extension allows gcc to check the format string */
-__attribute__((format(printf, 2, 3)));
-extern int
-pg_printf(const char *fmt,...)
-/* This extension allows gcc to check the format string */
-__attribute__((format(printf, 1, 2)));
-
 /*
  * Some versions of libintl try to replace printf and friends with macros;
  * if we are doing likewise, make sure our versions win.
@@ -152,6 +134,24 @@ __attribute__((format(printf, 1, 2)));
 #undef printf
 #endif
 
+extern int     pg_vsnprintf(char *str, size_t count, const char *fmt, va_list args);
+extern int
+pg_snprintf(char *str, size_t count, const char *fmt,...)
+/* This extension allows gcc to check the format string */
+__attribute__((format(printf, 3, 4)));
+extern int
+pg_sprintf(char *str, const char *fmt,...)
+/* This extension allows gcc to check the format string */
+__attribute__((format(printf, 2, 3)));
+extern int
+pg_fprintf(FILE *stream, const char *fmt,...)
+/* This extension allows gcc to check the format string */
+__attribute__((format(printf, 2, 3)));
+extern int
+pg_printf(const char *fmt,...)
+/* This extension allows gcc to check the format string */
+__attribute__((format(printf, 1, 2)));
+
 /*
  *     The GCC-specific code below prevents the __attribute__(... 'printf')
  *     above from being replaced, and this is required because gcc doesn't