[#237] object.c ruby.h (fwd) — Robert Skarwecki <skaav@...>

Hello everybody,

42 messages 2002/07/24
[#239] Re: [PATCH] object.c ruby.h (fwd) — GOTO Kentaro <gotoken@...> 2002/07/24

At Thu, 25 Jul 2002 00:02:28 +0900,

[#240] Re: [PATCH] object.c ruby.h (fwd) — Dave Thomas <Dave@...> 2002/07/24

GOTO Kentaro <gotoken@notwork.org> writes:

[#246] Re: [PATCH] object.c ruby.h (fwd) — GOTO Kentaro <gotoken@...> 2002/07/25

At Thu, 25 Jul 2002 05:05:46 +0900,

[#247] Re: [PATCH] object.c ruby.h (fwd) — Dave Thomas <Dave@...> 2002/07/25

GOTO Kentaro <gotoken@notwork.org> writes:

[#248] Re: [PATCH] object.c ruby.h (fwd) — nobu.nokada@... 2002/07/25

Hi,

[#249] Re: [PATCH] object.c ruby.h (fwd) — Dave Thomas <Dave@...> 2002/07/25

nobu.nokada@softhome.net writes:

[#250] Re: [PATCH] object.c ruby.h (fwd) — nobu.nokada@... 2002/07/25

Hi,

[#252] Re: [PATCH] object.c ruby.h (fwd) — GOTO Kentaro <gotoken@...> 2002/07/25

At Fri, 26 Jul 2002 03:11:02 +0900,

[#253] Re: [PATCH] object.c ruby.h (fwd) — Dave Thomas <Dave@...> 2002/07/25

GOTO Kentaro <gotoken@notwork.org> writes:

Re: openbsd system call changes

From: Jamie Herre <jfh@...>
Date: 2002-07-05 22:36:40 UTC
List: ruby-core #207
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 <dlfcn.h>
+# /* 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 <windows.h>

In This Thread