mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 15:16:29 +00:00
Prevent compiler warnings with 9.0
PG_PRINTF_ATTRIBUTE was introduced with 9.1.
This commit is contained in:
14
strutil.h
14
strutil.h
@@ -31,6 +31,7 @@
|
||||
#define MAXCONNINFO 1024
|
||||
|
||||
|
||||
#if (PG_VERSION_NUM >= 90100)
|
||||
extern int
|
||||
xsnprintf(char *str, size_t size, const char *format,...)
|
||||
__attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 4)));
|
||||
@@ -42,5 +43,18 @@ __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));
|
||||
extern int
|
||||
maxlen_snprintf(char *str, const char *format,...)
|
||||
__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));
|
||||
#else
|
||||
extern int
|
||||
xsnprintf(char *str, size_t size, const char *format,...)
|
||||
__attribute__((format(printf, 3, 4)));
|
||||
|
||||
extern int
|
||||
sqlquery_snprintf(char *str, const char *format,...)
|
||||
__attribute__((format(printf, 2, 3)));
|
||||
|
||||
extern int
|
||||
maxlen_snprintf(char *str, const char *format,...)
|
||||
__attribute__((format(printf, 2, 3)));
|
||||
#endif
|
||||
|
||||
#endif /* _STRUTIL_H_ */
|
||||
|
||||
Reference in New Issue
Block a user