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.72 2005/03/11 19:13:42 momjian Exp $
9+ * $PostgreSQL: pgsql/src/include/port.h,v 1.73 2005/03/16 21:27:23 momjian Exp $
1010 *
1111 *-------------------------------------------------------------------------
1212 */
@@ -112,6 +112,9 @@ extern int pg_vsnprintf(char *str, size_t count, const char *fmt, va_list args);
112112extern int pg_snprintf (char * str ,size_t count ,const char * fmt ,...)
113113/* This extension allows gcc to check the format string */
114114__attribute__((format (printf ,3 ,4 )));
115+ extern int pg_sprintf (char * str ,const char * fmt ,...)
116+ /* This extension allows gcc to check the format string */
117+ __attribute__((format (printf ,2 ,3 )));
115118extern int pg_fprintf (FILE * stream ,const char * fmt ,...)
116119/* This extension allows gcc to check the format string */
117120__attribute__((format (printf ,2 ,3 )));
@@ -127,11 +130,13 @@ __attribute__((format(printf, 1, 2)));
127130#ifdef __GNUC__
128131#define vsnprintf (...)pg_vsnprintf(__VA_ARGS__)
129132#define snprintf (...)pg_snprintf(__VA_ARGS__)
133+ #define sprintf (...)pg_sprintf(__VA_ARGS__)
130134#define fprintf (...)pg_fprintf(__VA_ARGS__)
131135#define printf (...)pg_printf(__VA_ARGS__)
132136#else
133137#define vsnprintf pg_vsnprintf
134138#define snprintf pg_snprintf
139+ #define sprintf pg_sprintf
135140#define fprintf pg_fprintf
136141#define printf pg_printf
137142#endif