diff options
-rw-r--r-- | ext/Fcntl/Fcntl.xs | 6 | ||||
-rw-r--r-- | ext/IO/IO.xs | 7 | ||||
-rw-r--r-- | ext/POSIX/POSIX.xs | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/ext/Fcntl/Fcntl.xs b/ext/Fcntl/Fcntl.xs index 18a175f1c6..5149444b68 100644 --- a/ext/Fcntl/Fcntl.xs +++ b/ext/Fcntl/Fcntl.xs @@ -5,7 +5,13 @@ #ifdef VMS # include <file.h> #else +#if defined(__GNUC__) && defined(__cplusplus) && defined(WIN32) +#define _NO_OLDNAMES +#endif # include <fcntl.h> +#if defined(__GNUC__) && defined(__cplusplus) && defined(WIN32) +#undef _NO_OLDNAMES +#endif #endif /* This comment is a kludge to get metaconfig to see the symbols diff --git a/ext/IO/IO.xs b/ext/IO/IO.xs index afe7f7775b..a434cca78b 100644 --- a/ext/IO/IO.xs +++ b/ext/IO/IO.xs @@ -7,7 +7,14 @@ # include <unistd.h> #endif #ifdef I_FCNTL +#if defined(__GNUC__) && defined(__cplusplus) && defined(WIN32) +#define _NO_OLDNAMES +#endif # include <fcntl.h> +#if defined(__GNUC__) && defined(__cplusplus) && defined(WIN32) +#undef _NO_OLDNAMES +#endif + #endif #ifdef PerlIO diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index b86fbdce1a..59b688e7a2 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -8,6 +8,7 @@ #ifdef PERL_OBJECT /* XXX _very_ temporary hacks */ # undef signal # undef open +# undef setmode # define open PerlLIO_open3 # undef TAINT_PROPER # define TAINT_PROPER(a) |