[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib-common config.h snippet's use of _MSC_VER
From: |
Bruno Haible |
Subject: |
Re: gnulib-common config.h snippet's use of _MSC_VER |
Date: |
Mon, 21 Nov 2011 14:57:54 +0100 |
User-agent: |
KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; ) |
Hi Simon,
> I understand that gnulib's code isn't clean against -Wundef in general,
> however I believe code that gnulib puts into config.h should meet a
> higher standard
OK.
> +2011-11-21 Simon Josefsson <address@hidden>
> +
> + * m4/gnulib-common.m4 (_Noreturn): Check that _MSC_VER is defined
> + before using it, in code that ends up config.h.
sed -e 's/ends up/ends up in/'
> diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
> index 7d83299..8621dec 100644
> --- a/m4/gnulib-common.m4
> +++ b/m4/gnulib-common.m4
> @@ -18,7 +18,7 @@ AC_DEFUN([gl_COMMON_BODY], [
> # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
> || 0x5110 <= __SUNPRO_C)
> # define _Noreturn __attribute__ ((__noreturn__))
> -# elif 1200 <= _MSC_VER
> +# elif defined _MSC_VER && 1200 <= _MSC_VER
> # define _Noreturn __declspec (noreturn)
> # else
> # define _Noreturn
Looks good. Fine with me.
Bruno
--
In memoriam Ricardo Flores Magón
<http://en.wikipedia.org/wiki/Ricardo_Flores_Magón>