From: Jamie Herre Date: 2002-07-06T07:36:40+09:00 Subject: Re: openbsd system call changes On Friday, July 5, 2002, at 01:06 PM, nobu.nokada@softhome.net wrote: > > Could you explain what changed? It may affect other platforms. > >> @@ -1185,6 +1185,8 @@ >> gid = NUM2INT(id); >> #if defined(HAVE_SETRESGID) && !defined(__CHECKER__) >> if (setresgid(gid, -1, -1) < 0) rb_sys_fail(0); >> +#elif defined HAVE_SETEGID >> + if (setgid(gid) < 0) rb_sys_fail(0); > > The macro and the system call names differ..., which is correct? > > Pah! You're right. Due to my sloppiness. Let me apologize for sending such a messy patch. The only changes actually required for compilation are below. (Too much celebrating yesterday.) -J Jamie Herre Gettys Group Software, Inc. jfh@gettysgroup.com Index: process.c =================================================================== RCS file: /src/ruby/process.c,v retrieving revision 1.52 diff -u -r1.52 process.c --- process.c 2002/05/14 06:22:26 1.52 +++ process.c 2002/07/05 22:35:04 @@ -1014,14 +1014,16 @@ static VALUE proc_setpgrp() { -#if defined(HAVE_SETPGRP) && defined(SETPGRP_VOID) + /* check for posix setpgid() first; this matches the posix */ + /* getpgrp() above. It appears that configure will set SETPGRP_VOID */ + /* even though setpgrp(0, 0) would be prefered. The posix call avoids */ + /* this confusion. */ +#ifdef HAVE_SETPGID + if (setpgid(0, 0) < 0) rb_sys_fail(0); +#elif defined(HAVE_SETPGRP) && defined(SETPGRP_VOID) if (setpgrp() < 0) rb_sys_fail(0); #else -# ifdef HAVE_SETPGID - if (setpgid(0, 0) < 0) rb_sys_fail(0); -# else rb_notimplement(); -# endif #endif return INT2FIX(0); } Index: ext/dl/dl.h =================================================================== RCS file: /src/ruby/ext/dl/dl.h,v retrieving revision 1.6 diff -u -r1.6 dl.h --- ext/dl/dl.h 2002/05/20 15:35:48 1.6 +++ ext/dl/dl.h 2002/07/05 22:35:04 @@ -15,6 +15,16 @@ #if defined(HAVE_DLFCN_H) # include +# /* some stranger systems may not define all these */ +# ifndef RTLD_LAZY +# define RTLD_LAZY 0 +# endif +# ifndef RTLD_GLOBAL +# define RTLD_GLOBAL 0 +# endif +# ifndef RTLD_NOW +# define RTLD_NOW 0 +# endif #else # if defined(HAVE_WINDOWS_H) # include