*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.244 2001/09/30 20:08:18 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.245 2001/10/03 21:58:28 tgl Exp $
*
* NOTES
*
static int CountChildren(void);
static bool CreateOptsFile(int argc, char *argv[]);
static pid_t SSDataBase(int xlop);
-#ifdef __GNUC__
-/* This checks the format string for consistency. */
static void postmaster_error(const char *fmt, ...)
- __attribute__((format(printf, 1, 2)));
-#else
-static void postmaster_error(const char *fmt, ...);
-#endif
+/* This lets gcc check the format string for consistency. */
+__attribute__((format(printf, 1, 2)));
#define StartupDataBase() SSDataBase(BS_XLOG_STARTUP)
#define CheckPointDataBase() SSDataBase(BS_XLOG_CHECKPOINT)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup.h,v 1.14 2001/08/22 20:23:23 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup.h,v 1.15 2001/10/03 21:58:28 tgl Exp $
*
*
* Main archiver interface.
*/
-extern void exit_horribly(Archive *AH, const char *modulename, const char *fmt, ...) __attribute__((format(printf,3,4)));
+extern void exit_horribly(Archive *AH, const char *modulename, const char *fmt, ...)
+__attribute__((format(printf,3,4)));
extern char *
simple_prompt(const char *prompt, int maxlen, bool echo);
/* Convenience functions used only when writing DATA */
extern int archputs(const char *s, Archive *AH);
extern int archputc(const char c, Archive *AH);
-extern int archprintf(Archive *AH, const char *fmt,...);
+extern int archprintf(Archive *AH, const char *fmt, ...)
+/* This extension allows gcc to check the format string */
+__attribute__((format(printf, 2, 3)));
#endif
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/common.h,v 1.13 2001/02/10 02:31:28 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/common.h,v 1.14 2001/10/03 21:58:28 tgl Exp $
*/
#ifndef COMMON_H
#define COMMON_H
#include "pqsignal.h"
#include "libpq-fe.h"
-char *xstrdup(const char *string);
+extern char *xstrdup(const char *string);
-bool setQFout(const char *fname);
+extern bool setQFout(const char *fname);
-#ifndef __GNUC__
-void psql_error(const char *fmt,...);
+extern void psql_error(const char *fmt, ...)
+/* This lets gcc check the format string for consistency. */
+__attribute__((format(printf, 1, 2)));
-#else
-/* This checks the format string for consistency. */
-void psql_error(const char *fmt,...) __attribute__((format(printf, 1, 2)));
+extern void NoticeProcessor(void *arg, const char *message);
-#endif
-
-void NoticeProcessor(void *arg, const char *message);
-
-char *simple_prompt(const char *prompt, int maxlen, bool echo);
+extern char *simple_prompt(const char *prompt, int maxlen, bool echo);
extern volatile bool cancel_pressed;
extern PGconn *cancelConn;
#ifndef WIN32
-void handle_sigint(SIGNAL_ARGS);
+extern void handle_sigint(SIGNAL_ARGS);
#endif /* not WIN32 */
-PGresult *PSQLexec(const char *query);
+extern PGresult *PSQLexec(const char *query);
-bool SendQuery(const char *query);
+extern bool SendQuery(const char *query);
#endif /* COMMON_H */
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: c.h,v 1.101 2001/08/27 23:02:25 tgl Exp $
+ * $Id: c.h,v 1.102 2001/10/03 21:58:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
*/
#ifndef HAVE_SNPRINTF_DECL
-extern int snprintf(char *str, size_t count, const char *fmt,...);
-
+extern int snprintf(char *str, size_t count, const char *fmt, ...)
+/* This extension allows gcc to check the format string */
+__attribute__((format(printf, 3, 4)));
#endif
#ifndef HAVE_VSNPRINTF_DECL
extern int vsnprintf(char *str, size_t count, const char *fmt, va_list args);
-
#endif
#if !defined(HAVE_MEMMOVE) && !defined(memmove)
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: stringinfo.h,v 1.19 2001/01/24 19:43:24 momjian Exp $
+ * $Id: stringinfo.h,v 1.20 2001/10/03 21:58:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
* to str if necessary. This is sort of like a combination of sprintf and
* strcat.
*/
-extern void appendStringInfo(StringInfo str, const char *fmt,...);
+extern void appendStringInfo(StringInfo str, const char *fmt, ...)
+/* This extension allows gcc to check the format string */
+__attribute__((format(printf, 2, 3)));
/*------------------------
* appendStringInfoChar
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1995, Regents of the University of California
*
- * $Id: postgres.h,v 1.52 2001/08/24 22:46:28 petere Exp $
+ * $Id: postgres.h,v 1.53 2001/10/03 21:58:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
extern int ExceptionalCondition(char *conditionName,
Exception *exceptionP, char *details,
char *fileName, int lineNumber);
-extern char *vararg_format(const char *fmt,...);
+
+extern char *vararg_format(const char *fmt, ...)
+/* This lets gcc check the format string for consistency. */
+__attribute__((format(printf, 1, 2)));
#ifndef USE_ASSERT_CHECKING
#define LogAssert(condition, printArgs)
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: libpq-int.h,v 1.39 2001/08/17 02:59:20 momjian Exp $
+ * $Id: libpq-int.h,v 1.40 2001/10/03 21:58:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifdef ENABLE_NLS
extern char * libpq_gettext(const char *msgid)
-#ifdef __GNUC__
-__attribute__((format_arg(1)))
-#endif
-;
+__attribute__((format_arg(1)));
#else
#define libpq_gettext(x) (x)
#endif
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pqexpbuffer.h,v 1.6 2001/01/24 19:43:31 momjian Exp $
+ * $Id: pqexpbuffer.h,v 1.7 2001/10/03 21:58:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
* This is a convenience routine that does the same thing as
* resetPQExpBuffer() followed by appendPQExpBuffer().
*/
-extern void printfPQExpBuffer(PQExpBuffer str, const char *fmt,...);
+extern void printfPQExpBuffer(PQExpBuffer str, const char *fmt, ...)
+/* This extension allows gcc to check the format string */
+__attribute__((format(printf, 2, 3)));
/*------------------------
* appendPQExpBuffer
* to str if necessary. This is sort of like a combination of sprintf and
* strcat.
*/
-extern void appendPQExpBuffer(PQExpBuffer str, const char *fmt,...);
+extern void appendPQExpBuffer(PQExpBuffer str, const char *fmt, ...)
+/* This extension allows gcc to check the format string */
+__attribute__((format(printf, 2, 3)));
/*------------------------
* appendPQExpBufferStr