Avoid compilation error with cc on OSF/1 5.1.
authorBruno Haible <bruno@clisp.org>
Tue, 19 Jan 2010 10:17:18 +0000 (11:17 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 19 Jan 2010 10:17:18 +0000 (11:17 +0100)
ChangeLog
lib/fcntl.in.h

index 0ac094f..69cd50d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-01-19  Bruno Haible  <bruno@clisp.org>
+
+       Avoid compilation error with cc on OSF/1 5.1.
+       * lib/fcntl.in.h: Include <unistd.h> after the #include_next <fcntl.h>
+       statement, not before.
+       Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
+
 2010-01-18  Bruno Haible  <bruno@clisp.org>
 
        Avoid a link error due to the __printf__ symbol.
index 92bb50d..b0a90fc 100644 (file)
@@ -27,7 +27,6 @@
 #include <sys/types.h>
 #ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems.  */
 # include <sys/stat.h>
-# include <unistd.h>
 #endif
 #@INCLUDE_NEXT@ @NEXT_FCNTL_H@
 
@@ -39,7 +38,6 @@
 #include <sys/types.h>
 #ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems.  */
 # include <sys/stat.h>
-# include <unistd.h>
 #endif
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_FCNTL_H@
 #ifndef _GL_FCNTL_H
 #define _GL_FCNTL_H
 
+#ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems.  */
+# include <unistd.h>
+#endif
+
 
 /* The definition of GL_LINK_WARNING is copied here.  */