]> Savannah Git Hosting - gnulib.git/commitdiff
stdnoreturn: Work around problem with MSVC/clang.
authorBruno Haible <bruno@clisp.org>
Sat, 15 Aug 2020 00:15:26 +0000 (02:15 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 15 Aug 2020 00:15:26 +0000 (02:15 +0200)
* m4/stdnoreturn.m4 (gl_STDNORETURN_H): On native Windows, include some
system header after <stdnoreturn.h>.
* doc/posix-headers/stdnoreturn.texi: Mention the issue.

ChangeLog
doc/posix-headers/stdnoreturn.texi
m4/stdnoreturn.m4

index 1810d56f3c807bb7c71662b73c1559db8661de35..c9a97298b9b156480a6ef1d77851158baa76bedb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2020-08-14  Bruno Haible  <bruno@clisp.org>
+
+       stdnoreturn: Work around problem with MSVC/clang.
+       * m4/stdnoreturn.m4 (gl_STDNORETURN_H): On native Windows, include some
+       system header after <stdnoreturn.h>.
+       * doc/posix-headers/stdnoreturn.texi: Mention the issue.
+
 2020-08-14  Bruno Haible  <bruno@clisp.org>
 
        utime-h: Generate an utime.h file always.
index cb827ddeb8e85a07b4ea8450c57a9db4afa6af5f..59eade7b47f237ef604756100b0a7758194ec7f6 100644 (file)
@@ -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{<stdlib.h>} and
+@code{<process.h>}, on some platforms:
+MSVC/clang.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index 5336a38d6be4e34cc4d7873b77c94f612a73e7df..6a7aabf6a16bd934cba491ea2ce36e7394fb264b 100644 (file)
@@ -24,6 +24,9 @@ AC_DEFUN([gl_STDNORETURN_H],
            [AC_LANG_PROGRAM(
               [[#include <stdlib.h>
                 #include <stdnoreturn.h>
+                #if defined _WIN32 && !defined __CYGWIN__
+                # include <process.h>
+                #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