changeset 16115:15d46238c9b0

gnulib-common: Silence warnings against config.h code. * m4/gnulib-common.m4 (_Noreturn): Check that _MSC_VER is defined before using it, in code that ends up in config.h.
author Simon Josefsson <simon@josefsson.org>
date Mon, 21 Nov 2011 14:18:24 +0100
parents cb89957e23c8
children f66a61056b41
files ChangeLog m4/gnulib-common.m4
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-21  Simon Josefsson  <simon@josefsson.org>
+
+	* m4/gnulib-common.m4 (_Noreturn): Check that _MSC_VER is defined
+	before using it, in code that ends up in config.h.
+
 2011-11-20  Bruno Haible  <bruno@clisp.org>
 
 	getcwd: Work around getcwd bug on AIX 5..7.
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -18,7 +18,7 @@
 # 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