[#11156] How to delete methods from superclass? — Clemens Hintze <c.hintze@...>

Hello,

25 messages 1998/12/01
[#11157] Re: How to delete methods from superclass? — matz@... (Yukihiro Matsumoto) 1998/12/01

Hi, Clemens.

[#11176] English List [Re: How to delete methods from superclass?] — gotoken@... (GOTO Kentaro) 1998/12/01

In message "[ruby-list:11157] Re: How to delete methods from superclass?"

[#11250] Ruby 用語集 — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

25 messages 1998/12/08

[#11269] 京都 (Re: [ruby-dev:3789] Re: List()) — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

21 messages 1998/12/11
[#11299] Re: 京都 — MAEDA Shugo <shugo@...> 1998/12/12

前田です。

[#11393] mod_ruby — shugo@... (Shugo Maeda)

前田です。

28 messages 1998/12/21
[#11394] Re: mod_ruby — matz@... (Yukihiro Matsumoto) 1998/12/21

まつもと ゆきひろです

[#11398] Re: mod_ruby — shugo@... (Shugo Maeda) 1998/12/21

前田です。

[#11399] RE: mod_ruby — OZAWA Sakuro <crouton@...> 1998/12/21

さくです。

[#11408] Re: Be port — shugo@... (Shugo Maeda) 1998/12/22

前田です。

[#11464] ruby and IDE — Noritsugu Nakamura <nnakamur@...>

18 messages 1998/12/27
[#11465] goto (Re: ruby and IDE) — ttate@... 1998/12/27

立石です。

[ruby-list:11251] Re: variable $0

From: WATANABE Tetsuya <tetsu@...>
Date: 1998-12-09 09:41:51 UTC
List: ruby-list #11251
渡辺哲也です。

$0 の件です。

In message "[ruby-list:11239] Re: variable $0"
    on 98/12/07, Yukihiro Matsumoto <matz@netlab.co.jp> writes:

|とりあえずこの対処を行います.SolarisやHP-UXでこの問題に対応

HP-UX では、こんな感じです。

pstat(2) というシステムコールがあり、このシステムコール
で対応します。公開されたのは HP-UX 10 からなのですが、
HP-UX 9.x から使えました(ヘッダファイルはもともとありま
した)。

動作するはずの HP-UX は、9 と 10 と 11 です。

HP-UX 11 の 64bit モードというのがあるのですが、これは
今月中にテストできる環境が使えますので、来週あたりにテ
ストして問題があれば、またお知らせします(多分大丈夫なは
ずですが)。

ruby-1.1c9 へのパッチになっています。

--
WATANABE Tetsuya HP Japan
 e-mail  Tetsuya_WATANABE@hp.com
         tetsu@jpn.hp.com

--- ruby.c.orig	Thu Sep  3 16:43:41 1998
+++ ruby.c	Mon Dec  7 18:24:50 1998
@@ -20,6 +20,10 @@
 #include <fcntl.h>
 #include <ctype.h>
 
+#ifdef __hpux
+#include <sys/pstat.h>
+#endif
+
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
@@ -615,6 +619,7 @@
     static int len;
 
     if (origargv == 0) Fail("$0 not initialized");
+#ifndef __hpux
     if (len == 0) {
 	s = origargv[0];
 	s += strlen(s);
@@ -625,7 +630,9 @@
 	}
 	len = s - origargv[0];
     }
+#endif
     s = str2cstr(val, &i);
+#ifndef __hpux
     if (i > len) {
 	memcpy(origargv[0], s, len);
 	origargv[0][len] = '\0';
@@ -638,6 +645,21 @@
 	    *s++ = ' ';
     }
     rb_progname = str_taint(str_new2(origargv[0]));
+#else
+    if (i >= PST_CLEN) {
+      union pstun j;
+      j.pst_command = s;
+      i = PST_CLEN;
+      RSTRING(val)->len = i;
+      *(s + i) = '\0';
+      pstat(PSTAT_SETCMD, j, PST_CLEN, 0, 0);
+    } else {
+      union pstun j;
+      j.pst_command = s;
+      pstat(PSTAT_SETCMD, j, i, 0, 0);
+    }
+    rb_progname = str_taint(str_new(s, i));
+#endif
 }
 
 void

In This Thread

Prev Next