summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-05-14 14:57:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-05-14 14:57:53 +0000
commit7862a89c564005b4f2c0eed1308ebd193dcbcd14 (patch)
tree78b0af99dcf7b739c0afaa59f53c338fdec6cdd9 /process.c
parentafdbd6fc5264ad548370ade033daa8fa318ca8ab (diff)
* configure.in: Check for the availability of pid_t, gid_t and uid_t and
remove AC_TYPE_UID_T. fixed: [ruby-core:04745] * defines.h: Remove pid_t typedef. * ruby.h: Define rb_pid_t, rb_gid_t and rb_uid_t in accordance with the available system types. * process.c: Change instances of pid_t and gid_t to their rb_* counterparts. * ext/pty/pty.c: Change pid_t to rb_pid_t. * vms/config.h: Define HAVE_{P,G,U}ID_T to 1. * win32/Makefile.sub: Remove #define for {g,u}id_t. * win32/win32.c: Change pid_t to rb_pid_t. * wince/Makefile.sub: Remove #define for {g,u}id_t. * wince/sys/types.h: Remove definitions of {p,g,u}id_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/process.c b/process.c
index 530665b..800c302 100644
--- a/process.c
+++ b/process.c
@@ -1715,7 +1715,7 @@ proc_setsid()
if (pid < 0) rb_sys_fail(0);
return INT2FIX(pid);
#elif defined(HAVE_SETPGRP) && defined(TIOCNOTTY)
- pid_t pid;
+ rb_pid_t pid;
int ret;
rb_secure(2);
@@ -2413,10 +2413,10 @@ proc_getgroups(VALUE obj)
#ifdef HAVE_GETGROUPS
VALUE ary;
size_t ngroups;
- gid_t *groups;
+ rb_gid_t *groups;
int i;
- groups = ALLOCA_N(gid_t, maxgroups);
+ groups = ALLOCA_N(rb_gid_t, maxgroups);
ngroups = getgroups(maxgroups, groups);
if (ngroups == -1)
@@ -2452,7 +2452,7 @@ proc_setgroups(VALUE obj, VALUE ary)
{
#ifdef HAVE_SETGROUPS
size_t ngroups;
- gid_t *groups;
+ rb_gid_t *groups;
int i;
struct group *gr;
@@ -2462,7 +2462,7 @@ proc_setgroups(VALUE obj, VALUE ary)
if (ngroups > maxgroups)
rb_raise(rb_eArgError, "too many groups, %d max", maxgroups);
- groups = ALLOCA_N(gid_t, ngroups);
+ groups = ALLOCA_N(rb_gid_t, ngroups);
for (i = 0; i < ngroups && i < RARRAY(ary)->len; i++) {
VALUE g = RARRAY(ary)->ptr[i];
@@ -2520,7 +2520,7 @@ proc_initgroups(obj, uname, base_grp)
VALUE obj, uname, base_grp;
{
#ifdef HAVE_INITGROUPS
- if (initgroups(StringValuePtr(uname), (gid_t)NUM2INT(base_grp)) != 0) {
+ if (initgroups(StringValuePtr(uname), (rb_gid_t)NUM2INT(base_grp)) != 0) {
rb_sys_fail(0);
}
return proc_getgroups(obj);