From: Philipp Stephani Date: Mon, 12 Jun 2017 08:54:29 +0000 (+0200) Subject: Explicitly require C11 or C++11 in emacs-module.h X-Git-Tag: emacs-26.0.90~521^2~117 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9dc6e93b77ce0d920771060756e65779751fd5f7;p=emacs.git 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. --- 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