openat: Work around compilation error with OSF/1 5.1 DTK cc.
authorBruno Haible <bruno@clisp.org>
Wed, 7 Sep 2011 22:03:50 +0000 (00:03 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 7 Sep 2011 22:03:50 +0000 (00:03 +0200)
* lib/fopen.c: Use different syntax for include of <stdio.h>.
* lib/freopen.c: Likewise.
* lib/fstatat.c: Use different syntax for include of <sys/stat.h>.
* lib/lstat.c: Likewise.
* lib/stat.c: Likewise.
* lib/open.c: Use different syntax for include of <fcntl.h>.
* lib/openat.c: Include fcntl.h again, explicitly.

ChangeLog
lib/fopen.c
lib/freopen.c
lib/fstatat.c
lib/lstat.c
lib/open.c
lib/openat.c
lib/stat.c

index 2f64d74..56ada70 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-09-07  Bruno Haible  <bruno@clisp.org>
+
+       openat: Work around compilation error with OSF/1 5.1 DTK cc.
+       * lib/fopen.c: Use different syntax for include of <stdio.h>.
+       * lib/freopen.c: Likewise.
+       * lib/fstatat.c: Use different syntax for include of <sys/stat.h>.
+       * lib/lstat.c: Likewise.
+       * lib/stat.c: Likewise.
+       * lib/open.c: Use different syntax for include of <fcntl.h>.
+       * lib/openat.c: Include fcntl.h again, explicitly.
+
 2011-09-04  J.T. Conklin  <jtc@acorntoolworks.com>
 
        parse-datetime: document the newly accepted format
index 33412fb..e9ba6bb 100644 (file)
@@ -33,7 +33,9 @@ orig_fopen (const char *filename, const char *mode)
 }
 
 /* Specification.  */
-#include <stdio.h>
+/* Write "stdio.h" here, not <stdio.h>, otherwise OSF/1 5.1 DTK cc eliminates
+   this include because of the preliminary #include <stdio.h> above.  */
+#include "stdio.h"
 
 #include <errno.h>
 #include <fcntl.h>
index bae0646..7069ec9 100644 (file)
@@ -33,7 +33,9 @@ orig_freopen (const char *filename, const char *mode, FILE *stream)
 }
 
 /* Specification.  */
-#include <stdio.h>
+/* Write "stdio.h" here, not <stdio.h>, otherwise OSF/1 5.1 DTK cc eliminates
+   this include because of the preliminary #include <stdio.h> above.  */
+#include "stdio.h"
 
 #include <string.h>
 
index 326ce21..4b01d66 100644 (file)
@@ -36,7 +36,10 @@ orig_fstatat (int fd, char const *filename, struct stat *buf, int flags)
 }
 #endif
 
-#include <sys/stat.h>
+/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
+   eliminates this include because of the preliminary #include <sys/stat.h>
+   above.  */
+#include "sys/stat.h"
 
 #include <errno.h>
 #include <fcntl.h>
index 29fc6d2..d786288 100644 (file)
@@ -42,7 +42,10 @@ orig_lstat (const char *filename, struct stat *buf)
 }
 
 /* Specification.  */
-# include <sys/stat.h>
+/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
+   eliminates this include because of the preliminary #include <sys/stat.h>
+   above.  */
+# include "sys/stat.h"
 
 # include <string.h>
 # include <errno.h>
index ffd3b8d..8dc36ef 100644 (file)
@@ -34,7 +34,9 @@ orig_open (const char *filename, int flags, mode_t mode)
 }
 
 /* Specification.  */
-#include <fcntl.h>
+/* Write "fcntl.h" here, not <fcntl.h>, otherwise OSF/1 5.1 DTK cc eliminates
+   this include because of the preliminary #include <fcntl.h> above.  */
+#include "fcntl.h"
 
 #include <errno.h>
 #include <stdarg.h>
index cc4b9d0..0768b48 100644 (file)
@@ -35,6 +35,10 @@ orig_openat (int fd, char const *filename, int flags, mode_t mode)
 }
 #endif
 
+/* Write "fcntl.h" here, not <fcntl.h>, otherwise OSF/1 5.1 DTK cc eliminates
+   this include because of the preliminary #include <fcntl.h> above.  */
+#include "fcntl.h"
+
 #include "openat.h"
 
 #include <stdarg.h>
index 6c354d1..1002f16 100644 (file)
@@ -34,7 +34,10 @@ orig_stat (const char *filename, struct stat *buf)
 }
 
 /* Specification.  */
-#include <sys/stat.h>
+/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
+   eliminates this include because of the preliminary #include <sys/stat.h>
+   above.  */
+#include "sys/stat.h"
 
 #include <errno.h>
 #include <limits.h>