[#205] openbsd system call changes — Jamie Herre <jfh@...>
Hi,
7 messages
2002/07/05
[#216] lib/mkfm.rb: have_bin()/find_bin() — Sean Chittenden <sean@...>
This could be me over looking something, but in mkmf.rb, there is no
7 messages
2002/07/07
[#221] Wiring up the Boehm GC to the Ruby interpreter — Matthew Bloch <matthew@...>(by way of Matthew Bloch <mattbee@...>)
Hi there;
4 messages
2002/07/12
[#228] Patch to stop TCPSocket.new blocking on DNS lookups — Matthew Bloch <mattbee@...>
Hello;
6 messages
2002/07/17
[#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:
[#255] Re: [PATCH] object.c ruby.h (fwd)
— GOTO Kentaro <gotoken@...>
2002/07/25
At Fri, 26 Jul 2002 05:34:10 +0900,
[#268] Re: [PATCH] object.c ruby.h (fwd)
— Masaki Suketa <masaki.suketa@...>
2002/07/27
In message "Re: [PATCH] object.c ruby.h (fwd)"
[#269] Re: [PATCH] object.c ruby.h (fwd)
— Dave Thomas <Dave@...>
2002/07/27
Masaki Suketa <masaki.suketa@nifty.ne.jp> writes:
[#288] Re: [PATCH] object.c ruby.h (fwd)
— Masaki Suketa <masaki.suketa@...>
2002/08/03
In message "Re: [PATCH] object.c ruby.h (fwd)"
[#295] Re: [PATCH] object.c ruby.h (fwd)
— "NAKAMURA, Hiroshi" <nahi@...>
2002/08/05
Hi,
[#260] Re: [PATCH] object.c ruby.h (fwd)
— kjana@...4lab.to (YANAGAWA Kazuhisa)
2002/07/26
In message <m2bs8vr1h7.fsf@zip.local.thomases.com>
[#279] A truth? patch + benchmarks
— "Christoph" <chr_news@...>
2002/07/31
[#280] Re: A truth? patch + benchmarks
— ts <decoux@...>
2002/07/31
>>>>> "C" == Christoph <chr_news@gmx.net> writes:
[#283] RE: A truth? patch + benchmarks
— "Christoph" <chr_news@...>
2002/08/01
[#241] Compiling ruby on SGI origins — Bil Kleb <W.L.Kleb@...>
I just tried compiling ruby-1.6.7 on a couple SGI origins (mips-sgi-irix6.5),
6 messages
2002/07/25
openbsd system call changes
From:
Jamie Herre <jfh@...>
Date:
2002-07-05 16:12:14 UTC
List:
ruby-core #205
Hi,
I'm assuming that this is the right place to send proposed patches for
ruby.
I made the following changes in order to get the current ruby to compile
on my OpenBSD system.
Mostly just a matter of changing the order of preference for various
system calls.
Let me know if I'm barking up the wrong tree with this.
Thanks,
-J
------------------------------------------------------
Jamie Herre
Gettys Group Software, Inc.
jfh@gettys.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 15:49:40
@@ -996,13 +996,13 @@
{
int pgrp;
-#if defined(HAVE_GETPGRP) && defined(GETPGRP_VOID)
- pgrp = getpgrp();
+#ifdef HAVE_GETPGID
+ pgrp = getpgid(0);
if (pgrp < 0) rb_sys_fail(0);
return INT2FIX(pgrp);
#else
-# ifdef HAVE_GETPGID
- pgrp = getpgid(0);
+# if defined(HAVE_GETPGRP) && defined(GETPGRP_VOID)
+ pgrp = getpgrp();
if (pgrp < 0) rb_sys_fail(0);
return INT2FIX(pgrp);
# else
@@ -1014,11 +1014,11 @@
static VALUE
proc_setpgrp()
{
-#if defined(HAVE_SETPGRP) && defined(SETPGRP_VOID)
- if (setpgrp() < 0) rb_sys_fail(0);
-#else
-# ifdef HAVE_SETPGID
+#ifdef HAVE_SETPGID
if (setpgid(0, 0) < 0) rb_sys_fail(0);
+#else
+# if defined(HAVE_SETPGRP) && defined(SETPGRP_VOID)
+ if (setpgrp() < 0) rb_sys_fail(0);
# else
rb_notimplement();
# endif
@@ -1151,10 +1151,10 @@
uid = NUM2INT(id);
#if defined(HAVE_SETRESUID) && !defined(__CHECKER__)
if (setresuid(uid, -1, -1) < 0) rb_sys_fail(0);
-#elif defined HAVE_SETREUID
- if (setreuid(uid, -1) < 0) rb_sys_fail(0);
#elif defined HAVE_SETRUID
if (setruid(uid) < 0) rb_sys_fail(0);
+#elif defined HAVE_SETREUID
+ if (setreuid(uid, -1) < 0) rb_sys_fail(0);
#else
{
if (geteuid() == uid) {
@@ -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);
#elif defined HAVE_SETREGID
if (setregid(gid, -1) < 0) rb_sys_fail(0);
#elif defined HAS_SETRGID
@@ -1214,12 +1216,12 @@
proc_seteuid(obj, euid)
VALUE obj, euid;
{
-#if defined(HAVE_SETRESUID) && !defined(__CHECKER__)
+#if defined HAVE_SETEUID
+ if (seteuid(NUM2INT(euid)) < 0) rb_sys_fail(0);
+#elif defined(HAVE_SETRESUID) && !defined(__CHECKER__)
if (setresuid(-1, NUM2INT(euid), -1) < 0) rb_sys_fail(0);
#elif defined HAVE_SETREUID
if (setreuid(-1, NUM2INT(euid)) < 0) rb_sys_fail(0);
-#elif defined HAVE_SETEUID
- if (seteuid(NUM2INT(euid)) < 0) rb_sys_fail(0);
#else
euid = NUM2INT(euid);
if (euid == getuid()) {
@@ -1247,10 +1249,10 @@
rb_secure(2);
#if defined(HAVE_SETRESGID) && !defined(__CHECKER__)
if (setresgid(-1, NUM2INT(egid), -1) < 0) rb_sys_fail(0);
-#elif defined HAVE_SETREGID
- if (setregid(-1, NUM2INT(egid)) < 0) rb_sys_fail(0);
#elif defined HAVE_SETEGID
if (setegid(NUM2INT(egid)) < 0) rb_sys_fail(0);
+#elif defined HAVE_SETREGID
+ if (setregid(-1, NUM2INT(egid)) < 0) rb_sys_fail(0);
#else
egid = NUM2INT(egid);
if (egid == getgid()) {
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 15:49:41
@@ -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>