mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (ruby_options): now we cannot call rb_glob() before
ruby_init(), so call rb_w32_cmdvector() at ruby_options(). * win32.{c,h} (rb_w32_cmdvector): rename make_cmdvector() and export it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
47fa2caf2e
commit
c4ce79084f
4 changed files with 19 additions and 13 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Fri Nov 12 15:15:06 2004 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* eval.c (ruby_options): now we cannot call rb_glob() before
|
||||||
|
ruby_init(), so call rb_w32_cmdvector() at ruby_options().
|
||||||
|
|
||||||
|
* win32.{c,h} (rb_w32_cmdvector): rename make_cmdvector() and
|
||||||
|
export it.
|
||||||
|
|
||||||
Fri Nov 12 14:08:01 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
Fri Nov 12 14:08:01 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
* ext/tk/lib/tk/event.rb: remove $LOADED_FEATURES trick
|
* ext/tk/lib/tk/event.rb: remove $LOADED_FEATURES trick
|
||||||
|
|
8
eval.c
8
eval.c
|
@ -1364,6 +1364,10 @@ ruby_options(argc, argv)
|
||||||
{
|
{
|
||||||
int state;
|
int state;
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
argc = rb_w32_cmdvector(GetCommandLine(), &argv);
|
||||||
|
#endif
|
||||||
|
|
||||||
Init_stack((void*)&state);
|
Init_stack((void*)&state);
|
||||||
PUSH_TAG(PROT_NONE);
|
PUSH_TAG(PROT_NONE);
|
||||||
if ((state = EXEC_TAG()) == 0) {
|
if ((state = EXEC_TAG()) == 0) {
|
||||||
|
@ -1375,6 +1379,10 @@ ruby_options(argc, argv)
|
||||||
exit(error_handle(state));
|
exit(error_handle(state));
|
||||||
}
|
}
|
||||||
POP_TAG();
|
POP_TAG();
|
||||||
|
|
||||||
|
#ifdef _WIN32_WCE
|
||||||
|
wce_FreeCommandLine();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void rb_exec_end_proc _((void));
|
void rb_exec_end_proc _((void));
|
||||||
|
|
|
@ -85,7 +85,6 @@
|
||||||
#define TO_SOCKET(x) _get_osfhandle(x)
|
#define TO_SOCKET(x) _get_osfhandle(x)
|
||||||
|
|
||||||
static struct ChildRecord *CreateChild(const char *, const char *, SECURITY_ATTRIBUTES *, HANDLE, HANDLE, HANDLE);
|
static struct ChildRecord *CreateChild(const char *, const char *, SECURITY_ATTRIBUTES *, HANDLE, HANDLE, HANDLE);
|
||||||
static int make_cmdvector(const char *, char ***);
|
|
||||||
static int has_redirection(const char *);
|
static int has_redirection(const char *);
|
||||||
static void StartSockets(void);
|
static void StartSockets(void);
|
||||||
static DWORD wait_events(HANDLE event, DWORD timeout);
|
static DWORD wait_events(HANDLE event, DWORD timeout);
|
||||||
|
@ -422,11 +421,6 @@ NtInitialize(int *argc, char ***argv)
|
||||||
_controlfp(0x5, 0x5);
|
_controlfp(0x5, 0x5);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
// subvert cmd.exe's feeble attempt at command line parsing
|
|
||||||
//
|
|
||||||
*argc = make_cmdvector(GetCommandLine(), argv);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Now set up the correct time stuff
|
// Now set up the correct time stuff
|
||||||
//
|
//
|
||||||
|
@ -437,11 +431,6 @@ NtInitialize(int *argc, char ***argv)
|
||||||
|
|
||||||
// Initialize Winsock
|
// Initialize Winsock
|
||||||
StartSockets();
|
StartSockets();
|
||||||
|
|
||||||
#ifdef _WIN32_WCE
|
|
||||||
// free commandline buffer
|
|
||||||
wce_FreeCommandLine();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
@ -1141,8 +1130,8 @@ skipspace(char *ptr)
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
int
|
||||||
make_cmdvector(const char *cmd, char ***vec)
|
rb_w32_cmdvector(const char *cmd, char ***vec)
|
||||||
{
|
{
|
||||||
int cmdlen, globbing, len, i;
|
int cmdlen, globbing, len, i;
|
||||||
int elements, strsz, done;
|
int elements, strsz, done;
|
||||||
|
|
|
@ -134,6 +134,7 @@ struct timezone {
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
extern void NtInitialize(int *, char ***);
|
extern void NtInitialize(int *, char ***);
|
||||||
|
extern int rb_w32_cmdvector(const char *, char ***);
|
||||||
extern pid_t rb_w32_pipe_exec(const char *, const char *, int, FILE **, FILE **);
|
extern pid_t rb_w32_pipe_exec(const char *, const char *, int, FILE **, FILE **);
|
||||||
extern int flock(int fd, int oper);
|
extern int flock(int fd, int oper);
|
||||||
extern int rb_w32_accept(int, struct sockaddr *, int *);
|
extern int rb_w32_accept(int, struct sockaddr *, int *);
|
||||||
|
|
Loading…
Reference in a new issue