diff options
author | Andy Wingo <wingo@pobox.com> | 2011-10-27 13:45:04 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-10-27 13:45:04 +0200 |
commit | 4938d3cb742de2a356586c55e5af32e193c5990b (patch) | |
tree | b4bfe0fd26e102c5fa38ca9965bc4ebdbae8e3b4 /lib/open.c | |
parent | 9d013330154852bc2309947adaa30b32418642c0 (diff) | |
parent | 2be3feb17e5456bba71749e0e97adf45c32c4e0e (diff) | |
download | guile-4938d3cb742de2a356586c55e5af32e193c5990b.tar.gz |
Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
GUILE-VERSION
libguile/deprecated.c
libguile/gc-malloc.c
module/language/tree-il/peval.scm
Diffstat (limited to 'lib/open.c')
-rw-r--r-- | lib/open.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/open.c b/lib/open.c index 480017750..d24f42c2f 100644 --- a/lib/open.c +++ b/lib/open.c @@ -16,13 +16,16 @@ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ +/* If the user's config.h happens to include <fcntl.h>, let it include only + the system's <fcntl.h> here, so that orig_open doesn't recurse to + rpl_open. */ +#define __need_system_fcntl_h #include <config.h> /* Get the original definition of open. It might be defined as a macro. */ -#define __need_system_fcntl_h #include <fcntl.h> -#undef __need_system_fcntl_h #include <sys/types.h> +#undef __need_system_fcntl_h static inline int orig_open (const char *filename, int flags, mode_t mode) @@ -31,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> |