aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/utils')
-rw-r--r--src/include/utils/datetime.h2
-rw-r--r--src/include/utils/elog.h38
-rw-r--r--src/include/utils/help_config.h2
-rw-r--r--src/include/utils/palloc.h4
4 files changed, 23 insertions, 23 deletions
diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h
index 6b8ab3c6564..3a2335523d0 100644
--- a/src/include/utils/datetime.h
+++ b/src/include/utils/datetime.h
@@ -315,7 +315,7 @@ extern int DecodeISO8601Interval(char *str,
int *dtype, struct pg_tm * tm, fsec_t *fsec);
extern void DateTimeParseError(int dterr, const char *str,
- const char *datatype) __attribute__((noreturn));
+ const char *datatype) pg_attribute_noreturn;
extern int DetermineTimeZoneOffset(struct pg_tm * tm, pg_tz *tzp);
extern int DetermineTimeZoneAbbrevOffset(struct pg_tm * tm, const char *abbr, pg_tz *tzp);
diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h
index b5cfc9cbc88..a82063a57b1 100644
--- a/src/include/utils/elog.h
+++ b/src/include/utils/elog.h
@@ -147,61 +147,61 @@ extern int
errmsg(const char *fmt,...)
/* This extension allows gcc to check the format string for consistency with
the supplied arguments. */
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
+pg_attribute_printf(1, 2);
extern int
errmsg_internal(const char *fmt,...)
/* This extension allows gcc to check the format string for consistency with
the supplied arguments. */
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
+pg_attribute_printf(1, 2);
extern int
errmsg_plural(const char *fmt_singular, const char *fmt_plural,
unsigned long n,...)
/* This extension allows gcc to check the format string for consistency with
the supplied arguments. */
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 4)))
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 4)));
+pg_attribute_printf(1, 4)
+pg_attribute_printf(2, 4);
extern int
errdetail(const char *fmt,...)
/* This extension allows gcc to check the format string for consistency with
the supplied arguments. */
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
+pg_attribute_printf(1, 2);
extern int
errdetail_internal(const char *fmt,...)
/* This extension allows gcc to check the format string for consistency with
the supplied arguments. */
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
+pg_attribute_printf(1, 2);
extern int
errdetail_log(const char *fmt,...)
/* This extension allows gcc to check the format string for consistency with
the supplied arguments. */
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
+pg_attribute_printf(1, 2);
extern int
errdetail_log_plural(const char *fmt_singular, const char *fmt_plural,
unsigned long n,...)
/* This extension allows gcc to check the format string for consistency with
the supplied arguments. */
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 4)))
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 4)));
+pg_attribute_printf(1, 4)
+pg_attribute_printf(2, 4);
extern int
errdetail_plural(const char *fmt_singular, const char *fmt_plural,
unsigned long n,...)
/* This extension allows gcc to check the format string for consistency with
the supplied arguments. */
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 4)))
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 4)));
+pg_attribute_printf(1, 4)
+pg_attribute_printf(2, 4);
extern int
errhint(const char *fmt,...)
/* This extension allows gcc to check the format string for consistency with
the supplied arguments. */
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
+pg_attribute_printf(1, 2);
/*
* errcontext() is typically called in error context callback functions, not
@@ -218,7 +218,7 @@ extern int
errcontext_msg(const char *fmt,...)
/* This extension allows gcc to check the format string for consistency with
the supplied arguments. */
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
+pg_attribute_printf(1, 2);
extern int errhidestmt(bool hide_stmt);
extern int errhidecontext(bool hide_ctx);
@@ -278,7 +278,7 @@ extern void
elog_finish(int elevel, const char *fmt,...)
/* This extension allows gcc to check the format string for consistency with
the supplied arguments. */
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));
+pg_attribute_printf(2, 3);
/* Support for constructing error strings separately from ereport() calls */
@@ -288,7 +288,7 @@ extern char *
format_elog_string(const char *fmt,...)
/* This extension allows gcc to check the format string for consistency with
the supplied arguments. */
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
+pg_attribute_printf(1, 2);
/* Support for attaching context information to error reports */
@@ -364,7 +364,7 @@ extern PGDLLIMPORT ErrorContextCallback *error_context_stack;
} while (0)
/*
- * gcc understands __attribute__((noreturn)); for other compilers, insert
+ * gcc understands pg_attribute_noreturn; for other compilers, insert
* pg_unreachable() so that the compiler gets the point.
*/
#ifdef __GNUC__
@@ -423,9 +423,9 @@ extern void EmitErrorReport(void);
extern ErrorData *CopyErrorData(void);
extern void FreeErrorData(ErrorData *edata);
extern void FlushErrorState(void);
-extern void ReThrowError(ErrorData *edata) __attribute__((noreturn));
+extern void ReThrowError(ErrorData *edata) pg_attribute_noreturn;
extern void ThrowErrorData(ErrorData *edata);
-extern void pg_re_throw(void) __attribute__((noreturn));
+extern void pg_re_throw(void) pg_attribute_noreturn;
extern char *GetErrorContextStack(void);
@@ -472,6 +472,6 @@ extern void
write_stderr(const char *fmt,...)
/* This extension allows gcc to check the format string for consistency with
the supplied arguments. */
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
+pg_attribute_printf(1, 2);
#endif /* ELOG_H */
diff --git a/src/include/utils/help_config.h b/src/include/utils/help_config.h
index 481687f25fd..af529964003 100644
--- a/src/include/utils/help_config.h
+++ b/src/include/utils/help_config.h
@@ -12,6 +12,6 @@
#ifndef HELP_CONFIG_H
#define HELP_CONFIG_H 1
-extern void GucInfoMain(void) __attribute__((noreturn));
+extern void GucInfoMain(void) pg_attribute_noreturn;
#endif
diff --git a/src/include/utils/palloc.h b/src/include/utils/palloc.h
index 39b318da43a..bd8767520e3 100644
--- a/src/include/utils/palloc.h
+++ b/src/include/utils/palloc.h
@@ -138,9 +138,9 @@ extern char *pnstrdup(const char *in, Size len);
/* sprintf into a palloc'd buffer --- these are in psprintf.c */
extern char *
psprintf(const char *fmt,...)
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
+pg_attribute_printf(1, 2);
extern size_t
pvsnprintf(char *buf, size_t len, const char *fmt, va_list args)
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 0)));
+pg_attribute_printf(3, 0);
#endif /* PALLOC_H */