From 6563cd7648f78ce137eb66d4a9a77f9f1666d17f Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 8 Sep 2011 00:03:50 +0200 Subject: [PATCH] openat: Work around compilation error with OSF/1 5.1 DTK cc. * lib/fopen.c: Use different syntax for include of . * lib/freopen.c: Likewise. * lib/fstatat.c: Use different syntax for include of . * lib/lstat.c: Likewise. * lib/stat.c: Likewise. * lib/open.c: Use different syntax for include of . * lib/openat.c: Include fcntl.h again, explicitly. --- ChangeLog | 11 +++++++++++ lib/fopen.c | 4 +++- lib/freopen.c | 4 +++- lib/fstatat.c | 5 ++++- lib/lstat.c | 5 ++++- lib/open.c | 4 +++- lib/openat.c | 4 ++++ lib/stat.c | 5 ++++- 8 files changed, 36 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f64d746e..56ada704e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2011-09-07 Bruno Haible + + openat: Work around compilation error with OSF/1 5.1 DTK cc. + * lib/fopen.c: Use different syntax for include of . + * lib/freopen.c: Likewise. + * lib/fstatat.c: Use different syntax for include of . + * lib/lstat.c: Likewise. + * lib/stat.c: Likewise. + * lib/open.c: Use different syntax for include of . + * lib/openat.c: Include fcntl.h again, explicitly. + 2011-09-04 J.T. Conklin parse-datetime: document the newly accepted format diff --git a/lib/fopen.c b/lib/fopen.c index 33412fbce..e9ba6bba1 100644 --- a/lib/fopen.c +++ b/lib/fopen.c @@ -33,7 +33,9 @@ orig_fopen (const char *filename, const char *mode) } /* Specification. */ -#include +/* Write "stdio.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates + this include because of the preliminary #include above. */ +#include "stdio.h" #include #include diff --git a/lib/freopen.c b/lib/freopen.c index bae064684..7069ec98f 100644 --- a/lib/freopen.c +++ b/lib/freopen.c @@ -33,7 +33,9 @@ orig_freopen (const char *filename, const char *mode, FILE *stream) } /* Specification. */ -#include +/* Write "stdio.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates + this include because of the preliminary #include above. */ +#include "stdio.h" #include diff --git a/lib/fstatat.c b/lib/fstatat.c index 326ce215a..4b01d6660 100644 --- a/lib/fstatat.c +++ b/lib/fstatat.c @@ -36,7 +36,10 @@ orig_fstatat (int fd, char const *filename, struct stat *buf, int flags) } #endif -#include +/* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc + eliminates this include because of the preliminary #include + above. */ +#include "sys/stat.h" #include #include diff --git a/lib/lstat.c b/lib/lstat.c index 29fc6d25f..d786288f2 100644 --- a/lib/lstat.c +++ b/lib/lstat.c @@ -42,7 +42,10 @@ orig_lstat (const char *filename, struct stat *buf) } /* Specification. */ -# include +/* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc + eliminates this include because of the preliminary #include + above. */ +# include "sys/stat.h" # include # include diff --git a/lib/open.c b/lib/open.c index ffd3b8ded..8dc36ef1e 100644 --- a/lib/open.c +++ b/lib/open.c @@ -34,7 +34,9 @@ orig_open (const char *filename, int flags, mode_t mode) } /* Specification. */ -#include +/* Write "fcntl.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates + this include because of the preliminary #include above. */ +#include "fcntl.h" #include #include diff --git a/lib/openat.c b/lib/openat.c index cc4b9d073..0768b48f3 100644 --- a/lib/openat.c +++ b/lib/openat.c @@ -35,6 +35,10 @@ orig_openat (int fd, char const *filename, int flags, mode_t mode) } #endif +/* Write "fcntl.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates + this include because of the preliminary #include above. */ +#include "fcntl.h" + #include "openat.h" #include diff --git a/lib/stat.c b/lib/stat.c index 6c354d1d3..1002f161b 100644 --- a/lib/stat.c +++ b/lib/stat.c @@ -34,7 +34,10 @@ orig_stat (const char *filename, struct stat *buf) } /* Specification. */ -#include +/* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc + eliminates this include because of the preliminary #include + above. */ +#include "sys/stat.h" #include #include -- 2.11.0