ruby-changes:33462
From: akr <ko1@a...>
Date: Wed, 9 Apr 2014 21:05:21 +0900 (JST)
Subject: [ruby-changes:33462] akr:r45541 (trunk): * process.c (OBJ2UID1): Defined even if getpwnam_r is not usable.
akr 2014-04-09 21:05:14 +0900 (Wed, 09 Apr 2014) New Revision: 45541 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45541 Log: * process.c (OBJ2UID1): Defined even if getpwnam_r is not usable. (OBJ2GID1): Defined even if getgrnam_r is not usable. This fixes compilation error on Android. Modified files: trunk/ChangeLog trunk/process.c Index: ChangeLog =================================================================== --- ChangeLog (revision 45540) +++ ChangeLog (revision 45541) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Apr 9 21:02:04 2014 Tanaka Akira <akr@f...> + + * process.c (OBJ2UID1): Defined even if getpwnam_r is not usable. + (OBJ2GID1): Defined even if getgrnam_r is not usable. + This fixes compilation error on Android. + Wed Apr 9 15:16:59 2014 Nobuyoshi Nakada <nobu@r...> * encoding.c (rb_enc_default_internal): fix rdoc. `__FILE__` is Index: process.c =================================================================== --- process.c (revision 45540) +++ process.c (revision 45541) @@ -175,12 +175,14 @@ obj2uid0(VALUE id) https://github.com/ruby/ruby/blob/trunk/process.c#L175 # else # define PREPARE_GETPWNAM /* do nothing */ # define FINISH_GETPWNAM /* do nothing */ +# define OBJ2UID1(id) obj2uid((id)) # define OBJ2UID(id) obj2uid((id)) static rb_uid_t obj2uid(VALUE id); # endif #else # define PREPARE_GETPWNAM /* do nothing */ # define FINISH_GETPWNAM /* do nothing */ +# define OBJ2UID1(id) NUM2UIDT(id) # define OBJ2UID(id) NUM2UIDT(id) # ifdef p_uid_from_name # undef p_uid_from_name @@ -216,12 +218,14 @@ static rb_gid_t obj2gid(VALUE id, VALUE https://github.com/ruby/ruby/blob/trunk/process.c#L218 # else # define PREPARE_GETGRNAM /* do nothing */ # define FINISH_GETGRNAM /* do nothing */ +# define OBJ2GID1(id) obj2gid((id)) # define OBJ2GID(id) obj2gid((id)) static rb_gid_t obj2gid(VALUE id); # endif #else # define PREPARE_GETGRNAM /* do nothing */ # define FINISH_GETGRNAM /* do nothing */ +# define OBJ2GID1(id) NUM2GIDT(id) # define OBJ2GID(id) NUM2GIDT(id) # ifdef p_gid_from_name # undef p_gid_from_name -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/