From 2170abddc59962473ce4441596e8a52db5385e54 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 29 Apr 2012 16:00:14 -0700 Subject: [PATCH] _Noreturn: future-proof non-GNU and non-MSVC compilers * build-aux/snippet/_Noreturn.h (_Noreturn): * m4/gnulib-common.m4 (gl_COMMON_BODY): Do not define _Noreturn if __STDC_VERSION__ indicates this is C11 or later. This is more likely to work with random future C compilers that are neither GNUish nor MSVCish. See Vincent Lefevre in . --- ChangeLog | 8 ++++++++ build-aux/snippet/_Noreturn.h | 2 +- m4/gnulib-common.m4 | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9d5195f49..baff3762c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2012-04-29 Paul Eggert + _Noreturn: future-proof non-GNU and non-MSVC compilers + * build-aux/snippet/_Noreturn.h (_Noreturn): + * m4/gnulib-common.m4 (gl_COMMON_BODY): + Do not define _Noreturn if __STDC_VERSION__ indicates this is + C11 or later. This is more likely to work with random future C + compilers that are neither GNUish nor MSVCish. See Vincent Lefevre in + . + exclude: handle wildcards with FNM_EXTMATCH * lib/exclude.c (fnmatch_pattern_has_wildcards): Also treat '+(', '+@', '!(' as wildcards, if FNM_EXTMATCH. Make it clear in a diff --git a/build-aux/snippet/_Noreturn.h b/build-aux/snippet/_Noreturn.h index 1a7b4daed..c44ad89b7 100644 --- a/build-aux/snippet/_Noreturn.h +++ b/build-aux/snippet/_Noreturn.h @@ -1,4 +1,4 @@ -#ifndef _Noreturn +#if !defined _Noreturn && __STDC_VERSION__ < 201112 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index ae4d25483..ab3c43d7b 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -14,7 +14,7 @@ AC_DEFUN([gl_COMMON], [ AC_DEFUN([gl_COMMON_BODY], [ AH_VERBATIM([_Noreturn], [/* The _Noreturn keyword of C11. */ -#ifndef _Noreturn +#if !defined _Noreturn && __STDC_VERSION__ < 201112 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) -- 2.11.0