summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-09 12:05:14 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-09 12:05:14 +0000
commit960c8ab125c3978a1399eb746faa4d65557ef9d7 (patch)
treeb664229fb4de65ffd9521e82602eae7a8cc15282
parent2291ff2eaad76f7ad17c48af85f37934ddff71e2 (diff)
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--process.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fb548c3..4dd9233 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Apr 9 21:02:04 2014 Tanaka Akira <akr@fsij.org>
+
+ * 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@ruby-lang.org>
* encoding.c (rb_enc_default_internal): fix rdoc. `__FILE__` is
diff --git a/process.c b/process.c
index e4600f5..084776a 100644
--- a/process.c
+++ b/process.c
@@ -175,12 +175,14 @@ obj2uid0(VALUE id)
# 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 *getgr_buf);
# 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