From 9af2ab68caf7a0bf3bda521729ac0376489cce19 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Tue, 13 Jun 2017 09:53:33 +0200 Subject: [PATCH] Fix version checks for emacs-module.h We don't need C11 or C++11 because stdbool.h is in C99, and for C++ we don't need it at all. --- src/emacs-module.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/emacs-module.h b/src/emacs-module.h index 313dd58d690..ad102e6d843 100644 --- a/src/emacs-module.h +++ b/src/emacs-module.h @@ -20,16 +20,19 @@ along with GNU Emacs. If not, see . */ #ifndef EMACS_MODULE_H #define EMACS_MODULE_H -#if ! (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L) \ - && ! (defined __cplusplus && __cplusplus >= 201103L) -# error "This file requires at least C11 or C++11" +#if ! (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) \ + && ! (defined __cplusplus && __cplusplus >= 199711L) +# error "This file requires at least C99 or C++98" #endif #include #include + +#ifndef __cplusplus #include +#endif -#if defined __cplusplus +#if defined __cplusplus && __cplusplus >= 201103L # define EMACS_NOEXCEPT noexcept #else # define EMACS_NOEXCEPT -- 2.39.2