aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/io.c b/io.c
index 8f9c9d59b9..ae47c73867 100644
--- a/io.c
+++ b/io.c
@@ -12,11 +12,6 @@
**********************************************************************/
-#if defined(__VMS)
-#define _XOPEN_SOURCE
-#define _POSIX_C_SOURCE 2
-#endif
-
#include "ruby.h"
#include "rubyio.h"
#include "rubysig.h"
@@ -24,6 +19,7 @@
#include <ctype.h>
#include <errno.h>
+
#if defined(MSDOS) || defined(__BOW__) || defined(__CYGWIN__) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__) || defined(__BEOS__)
# define NO_SAFE_RENAME
#endif
@@ -116,6 +112,11 @@ static int gets_lineno;
static int init_p = 0, next_p = 0;
static VALUE lineno;
+#if defined(__VMS)
+#define fopen(file_spec, mode) fopen(file_spec, mode, "rfm=stmlf")
+#define open(file_spec, flags, mode) open(file_spec, flags, mode, "rfm=stmlf")
+#endif
+
#ifdef _STDIO_USES_IOSTREAM /* GNU libc */
# ifdef _IO_fpos_t
# define READ_DATA_PENDING(fp) ((fp)->_IO_read_ptr != (fp)->_IO_read_end)