]> git.eshelyaron.com Git - emacs.git/commitdiff
Don’t assume __has_attribute in emacs-module.c
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 6 May 2020 00:16:49 +0000 (17:16 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 6 May 2020 00:22:07 +0000 (17:22 -0700)
Problem reported by Glenn Morris in:
https://lists.gnu.org/r/emacs-devel/2020-05/msg00724.html
* src/emacs-module.c: Use HAS_ATTRIBUTE instead of assuming
the compiler supports __has_attribute.

src/emacs-module.c

index e43e4907d2e8a765015ff11bc30a339f628a83a8..3d1827c7dada3bba7ef04477473ae8fd3370d5a9 100644 (file)
@@ -248,7 +248,7 @@ module_decode_utf_8 (const char *str, ptrdiff_t len)
    of `internal_condition_case' etc., and to avoid worrying about
    passing information to the handler functions.  */
 
-#if !__has_attribute (cleanup)
+#if !HAS_ATTRIBUTE (cleanup)
  #error "__attribute__ ((cleanup)) not supported by this compiler; try GCC"
 #endif