ruby-changes:4374
From: ko1@a...
Date: Mon, 31 Mar 2008 18:58:58 +0900 (JST)
Subject: [ruby-changes:4374] usa - Ruby:r15865 (trunk): * {bcc,win}32/Makefile.sub (config.h): define ssize_t.
usa 2008-03-31 18:58:41 +0900 (Mon, 31 Mar 2008)
New Revision: 15865
Modified files:
trunk/ChangeLog
trunk/bcc32/Makefile.sub
trunk/io.c
trunk/win32/Makefile.sub
Log:
* {bcc,win}32/Makefile.sub (config.h): define ssize_t.
* io.c (copy_stream_body): some platform don't have O_NOCTTY.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15865&r2=15864&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/win32/Makefile.sub?r1=15865&r2=15864&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/io.c?r1=15865&r2=15864&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/bcc32/Makefile.sub?r1=15865&r2=15864&diff_format=u
Index: ChangeLog
===================================================================
--- ChangeLog (revision 15864)
+++ ChangeLog (revision 15865)
@@ -1,3 +1,9 @@
+Mon Mar 31 18:57:36 2008 NAKAMURA Usaku <usa@r...>
+
+ * {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@r...>
* configure.in: check for ssize_t. [ruby-dev:34184]
Index: io.c
===================================================================
--- io.c (revision 15864)
+++ io.c (revision 15865)
@@ -6587,7 +6587,11 @@
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 @@
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;
}
Index: win32/Makefile.sub
===================================================================
--- win32/Makefile.sub (revision 15864)
+++ win32/Makefile.sub (revision 15865)
@@ -384,6 +384,12 @@
#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)
Index: bcc32/Makefile.sub
===================================================================
--- bcc32/Makefile.sub (revision 15864)
+++ bcc32/Makefile.sub (revision 15865)
@@ -301,6 +301,8 @@
\#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
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/