]> Savannah Git Hosting - gnulib.git/commitdiff
unistd: Fix compilation error in C++ mode on MSVC.
authorBruno Haible <bruno@clisp.org>
Wed, 11 Dec 2019 09:46:16 +0000 (10:46 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 11 Dec 2019 10:38:53 +0000 (11:38 +0100)
* lib/unistd.in.h: Don't do include[_next] <unistd.h> if the platform
does not have <unistd.h>.

ChangeLog
lib/unistd.in.h

index ef6280b014267793b317c87f5ef622344ca0fd30..efa548ae8e38a6320864b300a75d51ed244f37e4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-12-11  Bruno Haible  <bruno@clisp.org>
+
+       unistd: Fix compilation error in C++ mode on MSVC.
+       * lib/unistd.in.h: Don't do include[_next] <unistd.h> if the platform
+       does not have <unistd.h>.
+
 2019-12-11  Bruno Haible  <bruno@clisp.org>
 
        locale: Fix compilation error in C++ mode on MSVC.
index 28ab704c3bb1ed8bd22f3bf3a2ead6b5e501f3d5..269318eb73d44a9925872cea148e5c820f30ae70 100644 (file)
@@ -21,7 +21,7 @@
 #endif
 @PRAGMA_COLUMNS@
 
-#ifdef _GL_INCLUDING_UNISTD_H
+#if @HAVE_UNISTD_H@ && defined _GL_INCLUDING_UNISTD_H
 /* Special invocation convention:
    - On Mac OS X 10.3.9 we have a sequence of nested includes
      <unistd.h> -> <signal.h> -> <pthread.h> -> <unistd.h>