diff options
| author | Andrew Dunstan <andrew@dunslane.net> | 2011-04-28 10:56:14 -0400 |
|---|---|---|
| committer | Andrew Dunstan <andrew@dunslane.net> | 2011-04-28 10:56:14 -0400 |
| commit | c02d5b7c27d740830379244db4b9ef111bbf0fc8 (patch) | |
| tree | f1de6c2b7db8181b7d703fc5bd6732ffecda3c8c /src/bin/pg_dump/pg_backup_archiver.h | |
| parent | 39850c7fdb82bd7c64dbb759c5754e29fc0af5f2 (diff) | |
| download | postgresql-c02d5b7c27d740830379244db4b9ef111bbf0fc8.tar.gz | |
Use a macro variable PG_PRINTF_ATTRIBUTE for the style used for checking printf type functions.
The style is set to "printf" for backwards compatibility everywhere except
on Windows, where it is set to "gnu_printf", which eliminates hundreds of
false error messages from modern versions of gcc arising from %m and %ll{d,u}
formats.
Diffstat (limited to 'src/bin/pg_dump/pg_backup_archiver.h')
| -rw-r--r-- | src/bin/pg_dump/pg_backup_archiver.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/pg_dump/pg_backup_archiver.h b/src/bin/pg_dump/pg_backup_archiver.h index fd0b174b78..f9af8742cc 100644 --- a/src/bin/pg_dump/pg_backup_archiver.h +++ b/src/bin/pg_dump/pg_backup_archiver.h @@ -328,9 +328,9 @@ typedef struct _tocEntry /* Used everywhere */ extern const char *progname; -extern void die_horribly(ArchiveHandle *AH, const char *modulename, const char *fmt,...) __attribute__((format(printf, 3, 4))); -extern void warn_or_die_horribly(ArchiveHandle *AH, const char *modulename, const char *fmt,...) __attribute__((format(printf, 3, 4))); -extern void write_msg(const char *modulename, const char *fmt,...) __attribute__((format(printf, 2, 3))); +extern void die_horribly(ArchiveHandle *AH, const char *modulename, const char *fmt,...) __attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 4))); +extern void warn_or_die_horribly(ArchiveHandle *AH, const char *modulename, const char *fmt,...) __attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 4))); +extern void write_msg(const char *modulename, const char *fmt,...) __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3))); extern void WriteTOC(ArchiveHandle *AH); extern void ReadTOC(ArchiveHandle *AH); @@ -378,8 +378,8 @@ extern int ReconnectToServer(ArchiveHandle *AH, const char *dbname, const char * extern void DropBlobIfExists(ArchiveHandle *AH, Oid oid); int ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH); -int ahprintf(ArchiveHandle *AH, const char *fmt,...) __attribute__((format(printf, 2, 3))); +int ahprintf(ArchiveHandle *AH, const char *fmt,...) __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3))); -void ahlog(ArchiveHandle *AH, int level, const char *fmt,...) __attribute__((format(printf, 3, 4))); +void ahlog(ArchiveHandle *AH, int level, const char *fmt,...) __attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 4))); #endif |
