summaryrefslogtreecommitdiff
path: root/ext/etc/etc.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-18 04:13:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-18 04:13:09 +0000
commit562f256c54dbb1a0a26699ba3dceba24062a9b11 (patch)
tree765bda387c202be5cf3db52886842b7d79ba29f7 /ext/etc/etc.c
parentbf6efa76c0abcd1a2577cf0ca49f8137d3483b60 (diff)
* configure.in (pid_t, uid_t, gid_t): check if defined.
* intern.h, process.c, rubyio.h, ext/etc/etc.c, ext/pty/pty.c: use rb_{pid,uid,gid}_t instead of plain int. [ruby-dev:30376] * ext/etc/extconf.rb (PIDT2NUM, NUM2PIDT, UIDT2NUM, NUM2UIDT, GIDT2NUM, NUM2GIDT): moved to configure.in. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/etc/etc.c')
-rw-r--r--ext/etc/etc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index a0e8861..54367a0 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -76,8 +76,8 @@ setup_passwd(struct passwd *pwd)
#ifdef HAVE_ST_PW_PASSWD
safe_setup_str(pwd->pw_passwd),
#endif
- PW_UID2VAL(pwd->pw_uid),
- PW_GID2VAL(pwd->pw_gid),
+ UIDT2NUM(pwd->pw_uid),
+ GIDT2NUM(pwd->pw_gid),
#ifdef HAVE_ST_PW_GECOS
safe_setup_str(pwd->pw_gecos),
#endif
@@ -125,7 +125,7 @@ etc_getpwuid(int argc, VALUE *argv, VALUE obj)
rb_secure(4);
if (rb_scan_args(argc, argv, "01", &id) == 1) {
- uid = PW_VAL2UID(id);
+ uid = NUM2UIDT(id);
}
else {
uid = getuid();
@@ -301,7 +301,7 @@ setup_group(struct group *grp)
#ifdef HAVE_ST_GR_PASSWD
safe_setup_str(grp->gr_passwd),
#endif
- PW_GID2VAL(grp->gr_gid),
+ GIDT2NUM(grp->gr_gid),
mem);
}
#endif