From: Bruno Haible Date: Sat, 15 Aug 2020 00:15:26 +0000 (+0200) Subject: stdnoreturn: Work around problem with MSVC/clang. X-Git-Tag: v1.0~3765 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=67379a1e4714205e6a9644bfc939b165a5a4df43;p=gnulib.git stdnoreturn: Work around problem with MSVC/clang. * m4/stdnoreturn.m4 (gl_STDNORETURN_H): On native Windows, include some system header after . * doc/posix-headers/stdnoreturn.texi: Mention the issue. --- diff --git a/ChangeLog b/ChangeLog index 1810d56f3c..c9a97298b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2020-08-14 Bruno Haible + + stdnoreturn: Work around problem with MSVC/clang. + * m4/stdnoreturn.m4 (gl_STDNORETURN_H): On native Windows, include some + system header after . + * doc/posix-headers/stdnoreturn.texi: Mention the issue. + 2020-08-14 Bruno Haible utime-h: Generate an utime.h file always. diff --git a/doc/posix-headers/stdnoreturn.texi b/doc/posix-headers/stdnoreturn.texi index cb827ddeb8..59eade7b47 100644 --- a/doc/posix-headers/stdnoreturn.texi +++ b/doc/posix-headers/stdnoreturn.texi @@ -13,6 +13,10 @@ Portability problems fixed by Gnulib: @item This header file is missing on many platforms: FreeBSD 6.4, NetBSD 7.1, OpenBSD 3.8, Minix 3.3.0, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9.0, mingw, MSVC 14, Android 9.0. +@item +This file conflicts with some system header files, such as @code{} and +@code{}, on some platforms: +MSVC/clang. @end itemize Portability problems not fixed by Gnulib: diff --git a/m4/stdnoreturn.m4 b/m4/stdnoreturn.m4 index 5336a38d6b..6a7aabf6a1 100644 --- a/m4/stdnoreturn.m4 +++ b/m4/stdnoreturn.m4 @@ -24,6 +24,9 @@ AC_DEFUN([gl_STDNORETURN_H], [AC_LANG_PROGRAM( [[#include #include + #if defined _WIN32 && !defined __CYGWIN__ + # include + #endif /* Do not check for 'noreturn' after the return type. C11 allows it, but it's rarely done that way and circa-2012 bleeding-edge GCC rejects it when given