summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-06 10:39:57 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-06 10:39:57 +0000
commit2b785b0f3e4f902e7de29a895d1f6ae0f10c3265 (patch)
treebc1801ecbd4d1e852a5ae0a0b8202a41c7ec933b /process.c
parent23a434b3630b05781dc48e07582ed180d9661a6a (diff)
Merge changes from ruby_1_8 to reduce warnings and potentially improve
security. * mkconfig.rb: hide build path from rbconfig.rb. * util.c (ruby_strtod, dtoa): initialize more variables for error handling. * io.c (rscheck), marshal.c (w_nbyte, w_bytes, w_unique), (path2class, path2module): constified. * pack.c (pack_unpack), process.c (rb_syswait): suppress warnings. * suppress warnings on cygwin, mingw and mswin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/process.c b/process.c
index 642c5982a6..c41924dbbf 100644
--- a/process.c
+++ b/process.c
@@ -1024,9 +1024,11 @@ int
rb_proc_exec(str)
const char *str;
{
+#ifndef _WIN32
const char *s = str;
char *ss, *t;
char **argv, **a;
+#endif
while (*str && ISSPACE(*str))
str++;
@@ -1089,7 +1091,9 @@ proc_spawn_v(argv, prog)
char **argv;
char *prog;
{
+#if defined(__human68k__)
char *extension;
+#endif
int status;
if (!prog)
@@ -1405,12 +1409,12 @@ rb_syswait(pid)
{
static int overriding;
#ifdef SIGHUP
- RETSIGTYPE (*hfunc)_((int));
+ RETSIGTYPE (*hfunc)_((int)) = 0;
#endif
#ifdef SIGQUIT
- RETSIGTYPE (*qfunc)_((int));
+ RETSIGTYPE (*qfunc)_((int)) = 0;
#endif
- RETSIGTYPE (*ifunc)_((int));
+ RETSIGTYPE (*ifunc)_((int)) = 0;
int status;
int i, hooked = Qfalse;
@@ -1650,7 +1654,9 @@ rb_f_sleep(argc, argv)
static VALUE
proc_getpgrp()
{
+#if defined(HAVE_GETPGRP) && defined(GETPGRP_VOID)
int pgrp;
+#endif
rb_secure(2);
#if defined(HAVE_GETPGRP) && defined(GETPGRP_VOID)