[#4745] Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — Erik Huelsmann <ehuels@...>

Having taken upon me the task to provide a Windows build for

24 messages 2005/04/20
[#4746] Re: Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — Austin Ziegler <halostatue@...> 2005/04/20

On 4/20/05, Erik Huelsmann <ehuels@gmail.com> wrote:

[#4747] Re: Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — Erik Huelsmann <ehuels@...> 2005/04/20

Hi Austin,

[#4762] Re: Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — nobu.nokada@... 2005/04/24

Hi,

[#4783] Re: Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — Erik Huelsmann <ehuels@...> 2005/04/25

On 4/24/05, nobu.nokada@softhome.net <nobu.nokada@softhome.net> wrote:

[#4787] Re: Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — nobu.nokada@... 2005/04/25

Hi,

[#4794] Re: Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — Erik Huelsmann <ehuels@...> 2005/04/25

> > > Ruby is just using AC_TYPE_UID_T. So, using typedef for them,

[#4751] Illegal regexp causes segfault — Andrew Walrond <andrew@...>

irb(main):058:0> a = /\[([^]]*)\]/

13 messages 2005/04/22

Re: [PATCH] enhanced $0 modification

From: nobu.nokada@...
Date: 2005-04-26 13:31:35 UTC
List: ruby-core #4796
Hi,

At Mon, 25 Apr 2005 08:34:07 +0900,
Evan Webb wrote in [ruby-core:04774]:
> The attached patch allows for ruby to use more of the available stack
> space when altering argv[0]. This allows for much more flexible usage
> of setting $0 as the new value is not constrained only be the current
> size of argv, but by the size of argv plus the size of the
> environment.
> 
> Initial tests show that even though the new $0 consumes space formally
> occupied by the envp array, it has no ill effects on usage of the
> environment.

It resulted SEGV with bccwin.  And envp doesn't seem necessary.


Index: ruby.c
===================================================================
RCS file: /cvs/ruby/src/ruby/ruby.c,v
retrieving revision 1.98
diff -U2 -p -r1.98 ruby.c
--- ruby.c	20 Apr 2005 21:44:20 -0000	1.98
+++ ruby.c	26 Apr 2005 13:23:37 -0000
@@ -991,17 +991,18 @@ set_arg0(val, id)
     s = RSTRING(val)->ptr;
     i = RSTRING(val)->len;
-#ifdef __hpux
+#if defined(PSTAT_SETCMD)
     if (i >= PST_CLEN) {
       union pstun j;
@@ -1025,4 +1025,27 @@ set_arg0(val, id)
 	    }
 	}
+#ifndef DOSISH
+	{
+	    extern char **environ;
+
+	    /*
+	     * Adapted enhanced usage of env space for program title
+	     * from ProFTPD init_set_proc_title.
+	     * Copyright (c) 1997, 1998 Public Flood Software
+	     * Copyright (c) 1999, 2000 MacGyver, aka Habeeb J. Dihu <macgyver@tos.net>
+	     */
+
+	    for (i = 0; environ[i]; i++) {
+		if (environ[i] == s + 1) {
+		    s++;
+		    s += strlen(s);	/* this one is ok too */
+		}
+	    }
+
+	    for (i = 0; environ[i]; i++) {
+		environ[i] = strdup(environ[i]);
+	    }
+	}
+#endif
 	len = s - origargv[0];
     }


-- 
Nobu Nakada

In This Thread