Skip to content

Commit 0d2aad8

Browse files
committed
Put undef's before extern declarations that need 'em, per Andrew Dunstan.
1 parent ef31c2b commit 0d2aad8

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

src/include/port.h

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/include/port.h,v 1.85 2005/12/06 02:29:03 tgl Exp $
9+
* $PostgreSQL: pgsql/src/include/port.h,v 1.86 2005/12/06 05:13:46 tgl Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -114,24 +114,6 @@ extern unsigned char pg_tolower(unsigned char ch);
114114

115115
#ifdef USE_REPL_SNPRINTF
116116

117-
extern int pg_vsnprintf(char *str, size_t count, const char *fmt, va_list args);
118-
extern int
119-
pg_snprintf(char *str, size_t count, const char *fmt,...)
120-
/* This extension allows gcc to check the format string */
121-
__attribute__((format(printf, 3, 4)));
122-
extern int
123-
pg_sprintf(char *str, const char *fmt,...)
124-
/* This extension allows gcc to check the format string */
125-
__attribute__((format(printf, 2, 3)));
126-
extern int
127-
pg_fprintf(FILE *stream, const char *fmt,...)
128-
/* This extension allows gcc to check the format string */
129-
__attribute__((format(printf, 2, 3)));
130-
extern int
131-
pg_printf(const char *fmt,...)
132-
/* This extension allows gcc to check the format string */
133-
__attribute__((format(printf, 1, 2)));
134-
135117
/*
136118
* Some versions of libintl try to replace printf and friends with macros;
137119
* if we are doing likewise, make sure our versions win.
@@ -152,6 +134,24 @@ __attribute__((format(printf, 1, 2)));
152134
#undef printf
153135
#endif
154136

137+
extern int pg_vsnprintf(char *str, size_t count, const char *fmt, va_list args);
138+
extern int
139+
pg_snprintf(char *str, size_t count, const char *fmt,...)
140+
/* This extension allows gcc to check the format string */
141+
__attribute__((format(printf, 3, 4)));
142+
extern int
143+
pg_sprintf(char *str, const char *fmt,...)
144+
/* This extension allows gcc to check the format string */
145+
__attribute__((format(printf, 2, 3)));
146+
extern int
147+
pg_fprintf(FILE *stream, const char *fmt,...)
148+
/* This extension allows gcc to check the format string */
149+
__attribute__((format(printf, 2, 3)));
150+
extern int
151+
pg_printf(const char *fmt,...)
152+
/* This extension allows gcc to check the format string */
153+
__attribute__((format(printf, 1, 2)));
154+
155155
/*
156156
* The GCC-specific code below prevents the __attribute__(... 'printf')
157157
* above from being replaced, and this is required because gcc doesn't

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy