From: Bruno Haible Date: Mon, 23 Oct 2006 11:21:03 +0000 (+0000) Subject: Fix compilation error with gcc < 3.1. X-Git-Tag: 0.16.x-branchpoint~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3697423eed556874514f642d77abcfca87249d12;p=thirdparty%2Fgettext.git Fix compilation error with gcc < 3.1. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 362decd97..1cbeab2dd 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,8 @@ +2006-10-21 Bruno Haible + + * po-error.h (po_error, po_error_at_line): Use format attribute only + with gcc >= 3.1. + 2006-10-21 Bruno Haible * msgmerge.c (struct definitions_ty): Use gl_lock_define to declare diff --git a/gettext-tools/src/po-error.h b/gettext-tools/src/po-error.h index 71e6a1425..4db909a30 100644 --- a/gettext-tools/src/po-error.h +++ b/gettext-tools/src/po-error.h @@ -46,12 +46,18 @@ extern "C" { extern DLL_VARIABLE void (*po_error) (int status, int errnum, const char *format, ...) - __attribute__ ((__format__ (__printf__, 3, 4))); +#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3 + __attribute__ ((__format__ (__printf__, 3, 4))) +#endif + ; extern DLL_VARIABLE void (*po_error_at_line) (int status, int errnum, const char *filename, unsigned int lineno, const char *format, ...) - __attribute__ ((__format__ (__printf__, 5, 6))); +#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3 + __attribute__ ((__format__ (__printf__, 5, 6))) +#endif + ; /* Both functions must work like the xerror.h multiline_warning(), multiline_error() functions. In particular,