Skip to content
Snippets Groups Projects
Commit 0d2aad85 authored by Tom Lane's avatar Tom Lane
Browse files

Put undef's before extern declarations that need 'em, per Andrew Dunstan.

parent ef31c2bf
No related branches found
Tags
No related merge requests found
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/include/port.h,v 1.85 2005/12/06 02:29:03 tgl Exp $ * $PostgreSQL: pgsql/src/include/port.h,v 1.86 2005/12/06 05:13:46 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -114,24 +114,6 @@ extern unsigned char pg_tolower(unsigned char ch); ...@@ -114,24 +114,6 @@ extern unsigned char pg_tolower(unsigned char ch);
#ifdef USE_REPL_SNPRINTF #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; * Some versions of libintl try to replace printf and friends with macros;
* if we are doing likewise, make sure our versions win. * if we are doing likewise, make sure our versions win.
...@@ -152,6 +134,24 @@ __attribute__((format(printf, 1, 2))); ...@@ -152,6 +134,24 @@ __attribute__((format(printf, 1, 2)));
#undef printf #undef printf
#endif #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') * The GCC-specific code below prevents the __attribute__(... 'printf')
* above from being replaced, and this is required because gcc doesn't * above from being replaced, and this is required because gcc doesn't
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment