aboutsummaryrefslogtreecommitdiff
path: root/src/pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/pl')
-rw-r--r--src/pl/plperl/plperl.h4
-rw-r--r--src/pl/plpgsql/src/pl_scanner.c2
-rw-r--r--src/pl/plpython/plpy_elog.h8
3 files changed, 6 insertions, 8 deletions
diff --git a/src/pl/plperl/plperl.h b/src/pl/plperl/plperl.h
index 89bbd7ccb0d..aadb8883930 100644
--- a/src/pl/plperl/plperl.h
+++ b/src/pl/plperl/plperl.h
@@ -30,9 +30,7 @@
* Supply a value of PERL_UNUSED_DECL that will satisfy gcc - the one
* perl itself supplies doesn't seem to.
*/
-#if defined(__GNUC__)
-#define PERL_UNUSED_DECL __attribute__ ((unused))
-#endif
+#define PERL_UNUSED_DECL pg_attribute_unused
/*
* Sometimes perl carefully scribbles on our *printf macros.
diff --git a/src/pl/plpgsql/src/pl_scanner.c b/src/pl/plpgsql/src/pl_scanner.c
index ec08b02a213..f9323771e69 100644
--- a/src/pl/plpgsql/src/pl_scanner.c
+++ b/src/pl/plpgsql/src/pl_scanner.c
@@ -608,7 +608,7 @@ plpgsql_scanner_errposition(int location)
* be misleading!
*/
void
-__attribute__((noreturn))
+pg_attribute_noreturn
plpgsql_yyerror(const char *message)
{
char *yytext = core_yy.scanbuf + plpgsql_yylloc;
diff --git a/src/pl/plpython/plpy_elog.h b/src/pl/plpython/plpy_elog.h
index 6b8d485625b..e4e4dfb695d 100644
--- a/src/pl/plpython/plpy_elog.h
+++ b/src/pl/plpython/plpy_elog.h
@@ -12,16 +12,16 @@ extern PyObject *PLy_exc_spi_error;
extern void
PLy_elog(int elevel, const char *fmt,...)
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));
+pg_attribute_printf(2, 3);
extern void
PLy_exception_set(PyObject *exc, const char *fmt,...)
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));
+pg_attribute_printf(2, 3);
extern void
PLy_exception_set_plural(PyObject *exc, const char *fmt_singular, const char *fmt_plural,
unsigned long n,...)
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 5)))
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 5)));
+pg_attribute_printf(2, 5)
+pg_attribute_printf(3, 5);
#endif /* PLPY_ELOG_H */