Mercurial > hg > octave-nkf > gnulib-hg
changeset 15411:7b889c2a4a01
_Noreturn: Ignore __STDC_VERSION__; observe _MSC_VER.
* build-aux/_Noreturn.h (_Noreturn): Ignore __STDC_VERSION__.
Reparenthesize to avoid GCC warning.
Support Microsoft's syntax.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Likewise.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 12 Jul 2011 01:15:20 -0700 |
parents | 36ed604c0f60 |
children | 7f0f3e1ac6fd |
files | ChangeLog build-aux/_Noreturn.h m4/gnulib-common.m4 |
diffstat | 3 files changed, 15 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2011-07-12 Paul Eggert <eggert@cs.ucla.edu> + _Noreturn: Ignore __STDC_VERSION__; observe _MSC_VER. + * build-aux/_Noreturn.h (_Noreturn): Ignore __STDC_VERSION__. + Reparenthesize to avoid GCC warning. + Support Microsoft's syntax. + * m4/gnulib-common.m4 (gl_COMMON_BODY): Likewise. + _Noreturn-tests: remove module * modules/_Noreturn-tests: Remove. * modules/stdnoreturn-tests (Files): Remove tests/test-_Noreturn.c.
--- a/build-aux/_Noreturn.h +++ b/build-aux/_Noreturn.h @@ -1,7 +1,9 @@ -#if ! defined _Noreturn && __STDC_VERSION__ < 201000 -# if (3 <= __GNUC__ || __GNUC__ == 2 && 8 <= __GNUC_MINOR__ \ +#ifndef _Noreturn +# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) +# elif 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) # else # define _Noreturn # endif
--- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 27 +# gnulib-common.m4 serial 28 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -14,10 +14,12 @@ AC_DEFUN([gl_COMMON_BODY], [ AH_VERBATIM([_Noreturn], [/* The _Noreturn keyword of draft C1X. */ -#if ! defined _Noreturn && __STDC_VERSION__ < 201000L -# if (3 <= __GNUC__ || __GNUC__ == 2 && 8 <= __GNUC_MINOR__ \ +#ifndef _Noreturn +# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) +# elif 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) # else # define _Noreturn # endif