[#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: Sean Chittenden <sean@...>
Date: 2002-07-06 00:18:17 UTC
List: ruby-core #211
> |I made the following changes in order to get the current ruby to compile 
> |on my OpenBSD system.
> 
> Could somebody confirm this patch, especially on OpenBSD and other
> non-Linux platforms?

Works for FreeBSD 5.0-CURRENT.  I'm re-sending the patch as an
attachment for ease of testing/application.  -sc

-- 
Sean Chittenden

Attachments (1)

patch (1.44 KB, text/x-diff)
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/06 00:16:23
@@ -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/06 00:16:23
@@ -15,6 +15,16 @@
 
 #if defined(HAVE_DLFCN_H)
 # include <dlfcn.h>
+# /* some stranger systems may not define all of 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