ruby-changes:18306
From: akr <ko1@a...>
Date: Fri, 24 Dec 2010 08:46:46 +0900 (JST)
Subject: [ruby-changes:18306] Ruby:r30329 (trunk): * process.c: parenthesize macro arguments.
akr 2010-12-24 08:46:39 +0900 (Fri, 24 Dec 2010) New Revision: 30329 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30329 Log: * process.c: parenthesize macro arguments. Modified files: trunk/ChangeLog trunk/process.c Index: ChangeLog =================================================================== --- ChangeLog (revision 30328) +++ ChangeLog (revision 30329) @@ -1,3 +1,7 @@ +Fri Dec 24 08:46:04 2010 Tanaka Akira <akr@f...> + + * process.c: parenthesize macro arguments. + Thu Dec 23 19:17:14 2010 Yuki Sonoda (Yugui) <yugui@y...> * test/net/imap/cacert.pem: updated because it has been expired. Index: process.c =================================================================== --- process.c (revision 30328) +++ process.c (revision 30329) @@ -1015,7 +1015,7 @@ } #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 exec_with_sh(const char *prog, char **argv) { @@ -1026,7 +1026,7 @@ #define ALLOCA_ARGV(n) ALLOCA_N(char*, (n)+1) #else #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 static int @@ -1165,7 +1165,7 @@ #if !defined(HAVE_FORK) && defined(HAVE_SPAWNV) #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 static rb_pid_t proc_spawn_v(char **argv, char *prog) @@ -1210,7 +1210,7 @@ } #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 static rb_pid_t proc_spawn(char *str) @@ -1882,9 +1882,9 @@ #else #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_open(pathname, flags, perm) open(pathname, flags, perm) +#define redirect_open(pathname, flags, perm) open((pathname), (flags), (perm)) #endif static int @@ -2603,7 +2603,7 @@ rb_set_errinfo(exc); } #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) { err = errno; } @@ -2882,7 +2882,7 @@ #if defined(POSIX_SIGNAL) -# define signal(a,b) posix_signal(a,b) +# define signal(a,b) posix_signal((a),(b)) #endif void @@ -4669,7 +4669,7 @@ #if defined(HAVE_DAEMON) || (defined(HAVE_FORK) && defined(HAVE_SETSID)) #ifndef HAVE_DAEMON 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 /* -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/