From b2a1af15474219c75d2447b0213e20f1e60b3dc1 Mon Sep 17 00:00:00 2001 From: usa Date: Mon, 31 Oct 2011 04:16:11 +0000 Subject: * win32/win32.c (setfl): extract from fcntl(). * win32/win32.c (dupfd): new function to support F_DUPFD. base on a patch written by akr. * win32/win32.c (fcntl): use above functions. * include/ruby/win32.h (F_DUPFD): define. [experimental] * include/ruby/win32.h (F_SETFL): change the value to correspond with other platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/win32.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/ruby') diff --git a/include/ruby/win32.h b/include/ruby/win32.h index bba38dcf4a..b0150b6a19 100644 --- a/include/ruby/win32.h +++ b/include/ruby/win32.h @@ -569,7 +569,12 @@ extern char *rb_w32_strerror(int); # define EREMOTE WSAEREMOTE #endif -#define F_SETFL 1 +#define F_DUPFD 0 +//#define F_GETFD 1 +//#define F_SETFD 2 +//#define F_GETFL 3 +#define F_SETFL 4 +//#define FD_CLOEXEC 1 /* F_GETFD, F_SETFD */ #define O_NONBLOCK 1 #undef FD_SET -- cgit v1.2.3