diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-31 09:58:41 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-31 09:58:41 +0000 |
commit | b2acbb2c67e8d9dc5eaf4823f5e547c57832c443 (patch) | |
tree | 98db89de12857609052bbb8282450a85bbea2f62 | |
parent | 9a421e5b7ee330db3eb93affad9ba910dddc8f11 (diff) |
* {bcc,win}32/Makefile.sub (config.h): define ssize_t.
* io.c (copy_stream_body): some platform don't have O_NOCTTY.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | bcc32/Makefile.sub | 2 | ||||
-rw-r--r-- | io.c | 8 | ||||
-rw-r--r-- | win32/Makefile.sub | 6 |
4 files changed, 22 insertions, 0 deletions
@@ -1,3 +1,9 @@ +Mon Mar 31 18:57:36 2008 NAKAMURA Usaku <usa@ruby-lang.org> + + * {bcc,win}32/Makefile.sub (config.h): define ssize_t. + + * io.c (copy_stream_body): some platform don't have O_NOCTTY. + Mon Mar 31 18:42:41 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * configure.in: check for ssize_t. [ruby-dev:34184] diff --git a/bcc32/Makefile.sub b/bcc32/Makefile.sub index b48691e543..f46d5cd652 100644 --- a/bcc32/Makefile.sub +++ b/bcc32/Makefile.sub @@ -301,6 +301,8 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/bcc32/Makefile.sub \#define uint64_t unsigned __int64 \#define HAVE_INTPTR_T 1 \#define HAVE_UINTPTR_T 1 +\#define HAVE_SSIZE_T 1 +\#define ssize_t int \#define GETGROUPS_T int \#define RETSIGTYPE void \#define HAVE_ALLOCA 1 @@ -6587,7 +6587,11 @@ copy_stream_body(VALUE arg) src_fptr = 0; FilePathValue(stp->src); src_path = StringValueCStr(stp->src); +#ifdef O_NOCTTY src_fd = rb_sysopen_internal(src_path, O_RDONLY|O_NOCTTY, 0); +#else + src_fd = rb_sysopen_internal(src_path, O_RDONLY, 0); +#endif if (src_fd == -1) { rb_sys_fail(src_path); } stp->close_src = 1; } @@ -6603,7 +6607,11 @@ copy_stream_body(VALUE arg) dst_fptr = 0; FilePathValue(stp->dst); dst_path = StringValueCStr(stp->dst); +#ifdef O_NOCTTY dst_fd = rb_sysopen_internal(dst_path, O_WRONLY|O_CREAT|O_TRUNC|O_NOCTTY, 0600); +#else + dst_fd = rb_sysopen_internal(dst_path, O_WRONLY|O_CREAT|O_TRUNC, 0600); +#endif if (dst_fd == -1) { rb_sys_fail(dst_path); } stp->close_dst = 1; } diff --git a/win32/Makefile.sub b/win32/Makefile.sub index c61812212b..61d6afc6fb 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -384,6 +384,12 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub #define uint64_t unsigned __int64 #define HAVE_INTPTR_T 1 #define HAVE_UINTPTR_T 1 +#define HAVE_SSIZE_T 1 +!if "$(ARCH)" == "AMD64" || "$(ARCH)" == "IA64" +#define ssize_t __int64 +!else +#define ssize_t int +!endif #define GETGROUPS_T int #define RETSIGTYPE void !if !defined(WIN32_WCE) |