* process.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2383807c69
commit
a041f129af
@ -1,3 +1,7 @@
|
|||||||
|
Fri Dec 24 08:46:04 2010 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* process.c: parenthesize macro arguments.
|
||||||
|
|
||||||
Thu Dec 23 19:17:14 2010 Yuki Sonoda (Yugui) <yugui@yugui.jp>
|
Thu Dec 23 19:17:14 2010 Yuki Sonoda (Yugui) <yugui@yugui.jp>
|
||||||
|
|
||||||
* test/net/imap/cacert.pem: updated because it has been expired.
|
* test/net/imap/cacert.pem: updated because it has been expired.
|
||||||
|
18
process.c
18
process.c
@ -1015,7 +1015,7 @@ security(const char *str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_FORK
|
#ifdef HAVE_FORK
|
||||||
#define try_with_sh(prog, argv) ((saved_errno == ENOEXEC) ? exec_with_sh(prog, argv) : (void)0)
|
#define try_with_sh(prog, argv) ((saved_errno == ENOEXEC) ? exec_with_sh((prog), (argv)) : (void)0)
|
||||||
static void
|
static void
|
||||||
exec_with_sh(const char *prog, char **argv)
|
exec_with_sh(const char *prog, char **argv)
|
||||||
{
|
{
|
||||||
@ -1026,7 +1026,7 @@ exec_with_sh(const char *prog, char **argv)
|
|||||||
#define ALLOCA_ARGV(n) ALLOCA_N(char*, (n)+1)
|
#define ALLOCA_ARGV(n) ALLOCA_N(char*, (n)+1)
|
||||||
#else
|
#else
|
||||||
#define try_with_sh(prog, argv) (void)0
|
#define try_with_sh(prog, argv) (void)0
|
||||||
#define ALLOCA_ARGV(n) ALLOCA_N(char*, n)
|
#define ALLOCA_ARGV(n) ALLOCA_N(char*, (n))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -1165,7 +1165,7 @@ rb_proc_exec(const char *str)
|
|||||||
|
|
||||||
#if !defined(HAVE_FORK) && defined(HAVE_SPAWNV)
|
#if !defined(HAVE_FORK) && defined(HAVE_SPAWNV)
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#define proc_spawn_v(argv, prog) rb_w32_aspawn(P_NOWAIT, prog, argv)
|
#define proc_spawn_v(argv, prog) rb_w32_aspawn(P_NOWAIT, (prog), (argv))
|
||||||
#else
|
#else
|
||||||
static rb_pid_t
|
static rb_pid_t
|
||||||
proc_spawn_v(char **argv, char *prog)
|
proc_spawn_v(char **argv, char *prog)
|
||||||
@ -1210,7 +1210,7 @@ proc_spawn_n(int argc, VALUE *argv, VALUE prog)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#define proc_spawn(str) rb_w32_spawn(P_NOWAIT, str, 0)
|
#define proc_spawn(str) rb_w32_spawn(P_NOWAIT, (str), 0)
|
||||||
#else
|
#else
|
||||||
static rb_pid_t
|
static rb_pid_t
|
||||||
proc_spawn(char *str)
|
proc_spawn(char *str)
|
||||||
@ -1882,9 +1882,9 @@ redirect_open(const char *pathname, int flags, mode_t perm)
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
#define redirect_dup(oldfd) dup(oldfd)
|
#define redirect_dup(oldfd) dup(oldfd)
|
||||||
#define redirect_dup2(oldfd, newfd) dup2(oldfd, newfd)
|
#define redirect_dup2(oldfd, newfd) dup2((oldfd), (newfd))
|
||||||
#define redirect_close(fd) close(fd)
|
#define redirect_close(fd) close(fd)
|
||||||
#define redirect_open(pathname, flags, perm) open(pathname, flags, perm)
|
#define redirect_open(pathname, flags, perm) open((pathname), (flags), (perm))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -2603,7 +2603,7 @@ rb_fork_err(int *status, int (*chfunc)(void*, char *, size_t), void *charg, VALU
|
|||||||
rb_set_errinfo(exc);
|
rb_set_errinfo(exc);
|
||||||
}
|
}
|
||||||
#define READ_FROM_CHILD(ptr, len) \
|
#define READ_FROM_CHILD(ptr, len) \
|
||||||
(NIL_P(io) ? read(ep[0], ptr, len) : rb_io_bufread(io, ptr, len))
|
(NIL_P(io) ? read(ep[0], (ptr), (len)) : rb_io_bufread(io, (ptr), (len)))
|
||||||
if ((size = READ_FROM_CHILD(&err, sizeof(err))) < 0) {
|
if ((size = READ_FROM_CHILD(&err, sizeof(err))) < 0) {
|
||||||
err = errno;
|
err = errno;
|
||||||
}
|
}
|
||||||
@ -2882,7 +2882,7 @@ rb_f_abort(int argc, VALUE *argv)
|
|||||||
|
|
||||||
|
|
||||||
#if defined(POSIX_SIGNAL)
|
#if defined(POSIX_SIGNAL)
|
||||||
# define signal(a,b) posix_signal(a,b)
|
# define signal(a,b) posix_signal((a),(b))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -4669,7 +4669,7 @@ proc_setmaxgroups(VALUE obj, VALUE val)
|
|||||||
#if defined(HAVE_DAEMON) || (defined(HAVE_FORK) && defined(HAVE_SETSID))
|
#if defined(HAVE_DAEMON) || (defined(HAVE_FORK) && defined(HAVE_SETSID))
|
||||||
#ifndef HAVE_DAEMON
|
#ifndef HAVE_DAEMON
|
||||||
static int rb_daemon(int nochdir, int noclose);
|
static int rb_daemon(int nochdir, int noclose);
|
||||||
#define daemon(nochdir, noclose) rb_daemon(nochdir, noclose)
|
#define daemon(nochdir, noclose) rb_daemon((nochdir), (noclose))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user