зеркало из https://github.com/github/ruby.git
* {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
This commit is contained in:
Родитель
9a421e5b7e
Коммит
b2acbb2c67
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
8
io.c
8
io.c
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче