diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/mkmf.rb | 3 | ||||
-rw-r--r-- | process.c | 8 |
3 files changed, 14 insertions, 3 deletions
@@ -1,3 +1,9 @@ +Wed Dec 8 20:13:06 2004 WATANABE Hirofumi <[email protected]> + + * process.c (rb_spawn): support for DJGPP. + + * lib/mkmf.rb (VPATH): specify the implicit path separator for DJGPP. + Wed Dec 8 17:37:33 2004 NAKAMURA Usaku <[email protected]> * win32/win32.c (rb_w32_pipe_exec): need to close original socket diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 8b04299322..2e2da375f4 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -733,6 +733,9 @@ def configuration(srcdir) if !CROSS_COMPILING && CONFIG['build_os'] == 'cygwin' && CONFIG['target_os'] != 'cygwin' vpath.each {|p| p.sub!(/.*/, '$(shell cygpath -u \&)')} end + if !CROSS_COMPILING && CONFIG['build_os'] == 'msdosdjgpp' + CONFIG['PATH_SEPARATOR'] = ';' + end mk << %{ SHELL = /bin/sh @@ -600,7 +600,7 @@ rb_waitpid(pid, st, flags) goto retry; } #else /* NO_WAITPID */ - if (pid_tbl && st_lookup(pid_tbl, pid, st)) { + if (pid_tbl && st_lookup(pid_tbl, pid, (st_data_t *)st)) { last_status_set(*st, pid); st_delete(pid_tbl, (st_data_t*)&pid, NULL); return pid; @@ -626,7 +626,7 @@ rb_waitpid(pid, st, flags) } if (!pid_tbl) pid_tbl = st_init_numtable(); - st_insert(pid_tbl, pid, st); + st_insert(pid_tbl, pid, (st_data_t)st); if (!rb_thread_alone()) rb_thread_schedule(); } #endif @@ -1141,6 +1141,7 @@ proc_spawn_v(argv, prog) #endif before_exec(); status = spawnv(P_WAIT, prog, argv); + last_status_set(status == -1 ? 127 : status, 0); after_exec(); return status; #endif @@ -1181,6 +1182,7 @@ proc_spawn(str) char *shell = dln_find_exe("sh", 0); before_exec(); status = shell?spawnl(P_WAIT,shell,"sh","-c",str,(char*)NULL):system(str); + last_status_set(status == -1 ? 127 : status, 0); after_exec(); return status; } @@ -1597,7 +1599,7 @@ rb_spawn(argc, argv) if (prog && argc) argv[0] = prog; #else if (prog && argc) argv[0] = prog; - prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" ")); + if (argc) prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" ")); status = system(StringValuePtr(prog)); # if defined(__human68k__) || defined(__DJGPP__) last_status_set(status == -1 ? 127 : status, 0); |