From 9dc6e93b77ce0d920771060756e65779751fd5f7 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Mon, 12 Jun 2017 10:54:29 +0200 Subject: [PATCH] Explicitly require C11 or C++11 in emacs-module.h We already implicitly require them by including stdbool.h. Just make the error message a bit clearer, and remove an unnecessary version comparison. --- src/emacs-module.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/emacs-module.h b/src/emacs-module.h index b8bf2ed2d5f..26b519a39cf 100644 --- a/src/emacs-module.h +++ b/src/emacs-module.h @@ -20,11 +20,16 @@ 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" +#endif + #include #include #include -#if defined __cplusplus && __cplusplus >= 201103L +#if defined __cplusplus # define EMACS_NOEXCEPT noexcept #else # define EMACS_NOEXCEPT -- 2.39.2