From: Bruno Haible Date: Thu, 16 Sep 2004 19:05:31 +0000 (+0000) Subject: Avoid error with gcc-3.0 and older. X-Git-Tag: v0.14.2~223 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31325849cbf92a5a3e9beb94f45eb975475f93ac;p=thirdparty%2Fgettext.git Avoid error with gcc-3.0 and older. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 5b3082851..5d070aa40 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,8 @@ +2004-09-16 Bruno Haible + + * format.h (formatstring_error_logger_t): Modify decl for GCC <= 3.0. + Reported by Jens A. Tkotz . + 2004-09-11 Bruno Haible * Makefile.am (msginit_SOURCES): Add plural-count.c. diff --git a/gettext-tools/src/format.h b/gettext-tools/src/format.h index 03cf96819..cbd9f57d1 100644 --- a/gettext-tools/src/format.h +++ b/gettext-tools/src/format.h @@ -32,9 +32,11 @@ extern "C" { /* This type of callback is responsible for showing an error. */ -typedef void formatstring_error_logger_fn (const char *format, ...) - __attribute__ ((__format__ (__printf__, 1, 2))); -typedef formatstring_error_logger_fn *formatstring_error_logger_t; +typedef void (*formatstring_error_logger_t) (const char *format, ...) +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) + __attribute__ ((__format__ (__printf__, 1, 2))) +#endif +; /* This structure describes a format string parser for a language. */ struct formatstring_parser