From: Eli Zaretskii Date: Wed, 6 Apr 2011 15:44:32 +0000 (+0300) Subject: Fix the Windows build due to introduction of ATTRIBUTE_FORMAT_PRINTF. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~389 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0f1ba050b3e8228b47e77ec77e5047c7c3276fdf;p=emacs.git Fix the Windows build due to introduction of ATTRIBUTE_FORMAT_PRINTF. nt/config.nt (NO_INLINE, ATTRIBUTE_FORMAT) (ATTRIBUTE_FORMAT_PRINTF): Define, as followup to 2011-04-06T05:19:39Z!eggert@cs.ucla.edu on the trunk on 2011-04-06. --- diff --git a/nt/ChangeLog b/nt/ChangeLog index 9f8df7ee62b..155ee41d9da 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,9 @@ +2011-04-06 Eli Zaretskii + + * config.nt (NO_INLINE, ATTRIBUTE_FORMAT) + (ATTRIBUTE_FORMAT_PRINTF): Define, as followup to 2011-04-06T05:19:39Z!eggert@cs.ucla.edu + on the trunk on 2011-04-06. + 2011-03-27 Glenn Morris * config.nt: Remove RETSIGTYPE, SIGTYPE (identical to void). diff --git a/nt/config.nt b/nt/config.nt index 1d9a5faaf2c..74217c9c048 100644 --- a/nt/config.nt +++ b/nt/config.nt @@ -345,12 +345,32 @@ along with GNU Emacs. If not, see . */ #define INLINE #endif +#if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */ +#define NO_INLINE __attribute__((noinline)) +#else +#define NO_INLINE +#endif + #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) #define EXTERNALLY_VISIBLE __attribute__((externally_visible)) #else #define EXTERNALLY_VISIBLE #endif +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) +#else +# define ATTRIBUTE_FORMAT(spec) /* empty */ +#endif + +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) +# define ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ + ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) +#else +# define ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ + ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) +#endif + #if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)) #define HAVE___BUILTIN_UNWIND_INIT 1 #endif