mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* win32/win32.c (init_stdhandle): assign standard file handles.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8424cec21c
commit
05bc15b0ec
2 changed files with 26 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Tue Aug 01 17:44:03 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* win32/win32.c (init_stdhandle): assign standard file handles.
|
||||||
|
|
||||||
Tue Aug 1 12:24:58 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Aug 1 12:24:58 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* eval.c (Init_Binding): fix old commit miss.
|
* eval.c (Init_Binding): fix old commit miss.
|
||||||
|
|
|
@ -360,6 +360,8 @@ flock(int fd, int oper)
|
||||||
(DWORD)-1);
|
(DWORD)-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void init_stdhandle(void);
|
||||||
|
|
||||||
#if _MSC_VER >= 1400
|
#if _MSC_VER >= 1400
|
||||||
static void invalid_parameter(const wchar_t *expr, const wchar_t *func, const wchar_t *file, unsigned int line, uintptr_t dummy)
|
static void invalid_parameter(const wchar_t *expr, const wchar_t *func, const wchar_t *file, unsigned int line, uintptr_t dummy)
|
||||||
{
|
{
|
||||||
|
@ -407,6 +409,8 @@ NtInitialize(int *argc, char ***argv)
|
||||||
|
|
||||||
tzset();
|
tzset();
|
||||||
|
|
||||||
|
init_stdhandle();
|
||||||
|
|
||||||
atexit(exit_handler);
|
atexit(exit_handler);
|
||||||
|
|
||||||
// Initialize Winsock
|
// Initialize Winsock
|
||||||
|
@ -1695,11 +1699,29 @@ rb_w32_open_osfhandle(long osfhandle, int flags)
|
||||||
}
|
}
|
||||||
return fh; /* return handle */
|
return fh; /* return handle */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
init_stdhandle(void)
|
||||||
|
{
|
||||||
|
if (fileno(stdin) < 0) {
|
||||||
|
stdin->_file = 0;
|
||||||
|
}
|
||||||
|
if (fileno(stdout) < 0) {
|
||||||
|
stdout->_file = 1;
|
||||||
|
}
|
||||||
|
if (fileno(stderr) < 0) {
|
||||||
|
stderr->_file = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define _set_osfhnd(fh, osfh) (void)((fh), (osfh))
|
#define _set_osfhnd(fh, osfh) (void)((fh), (osfh))
|
||||||
#define _set_osflags(fh, flags) (void)((fh), (flags))
|
#define _set_osflags(fh, flags) (void)((fh), (flags))
|
||||||
|
|
||||||
|
static void
|
||||||
|
init_stdhandle(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
#ifdef __BORLANDC__
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue