[#4060] [patch] require problem — shugo@... (Shugo Maeda)
前田です。
新井です。
[#4076] Re: call/cc — shugo@... (Shugo Maeda)
前田@リコーです。
In message <m0zyZO8-0003EbC@crunkey.chocolate.or.jp>
えぐち@エスアンドイー です。
[#4090] finalizers — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろです
まつもと ゆきひろです
けいじゅ@日本ラショナルソフトウェアです.
[#4095] Ruby on CYGWIN — TAKAHASHI Masayoshi <maki@...>
高橋です。久しぶりに書きます。
わたなべです.
高橋です。Rubyのリンク集から見つけたのですが、sgmailって
前橋です。
高橋です。
前橋です。
[#4186] UTF-8 patch for Ruby-1.2.1 — Yoshida Masato <yoshidam@...>
よしだです
まつもと ゆきひろです
[#4193] open with O_CREAT|O_EXCL — 民斗 <tommy@...>
民斗です。
[#4203] Compile via WATCOM C — ARIMA Yasuhiro <fit0298@...>
有馬です。
Regard to "[ruby-dev:4204] Re: Compile via WATCOM C"
Regard to "[ruby-dev:4215] Re: Compile via WATCOM C"
[#4237] extmk.rb.in patch, environment variable — Ryo HAYASAKA <hayasaka@...>
早坂@会津大学です。
まつもと ゆきひろです
[#4244] %//, %!! — Wakou Aoyama <wakou@...>
青山です。
[#4248] patch for ruby-mswin32 — Koji Oda <oda@...1.qnes.nec.co.jp>
小田@QNES です。
まつもと ゆきひろです
わたなべです.
まつもと ゆきひろです
小田@QNES です。
小田@QNES です。
[#4290] signed/unsigned char — ARIMA Yasuhiro <fit0298@...>
有馬です。
えぐち@エスアンドイー です。
Regard to "[ruby-dev:4292] Re: signed/unsigned char"
えぐち@エスアンドイー です。
笠原です。
Regard to "[ruby-dev:4295] Re: signed/unsigned char"
[#4302] ruby-1.3 MacRuby patch — 藤本尚邦 / Hisakuni FUJIMOTO <hisa@...>
藤本です。こんにちは。
まつもと ゆきひろです
[#4306] MacRuby 1.3 binary test release — 藤本尚邦 / Hisakuni FUJIMOTO <hisa@...>
藤本です。
[#4327] pack("F") for bigendian float — gotoken@... (GOTO Kentaro)
ごとけんです。
ごとけんです
ごとけんです
まつもと ゆきひろです
ごとけんです
山下 純司です。
ごとけんです
まつもと ゆきひろです
ごとけんです
[#4341] cascades on ruby — Kazunori NISHI <kazunori@...>
西@九大です。
ひわだです。
西@九大です。
まつもと ゆきひろです
けいじゅ@日本ラショナルソフトウェアです.
まつもと ゆきひろです
けいじゅ@日本ラショナルソフトウェアです.
けいじゅ@日本ラショナルソフトウェアです.
まつもと ゆきひろです
けいじゅ@日本ラショナルソフトウェアです.
まつもと ゆきひろです
けいじゅ@日本ラショナルソフトウェアです.
まつもと ゆきひろです
まつもと ゆきひろです
まつもと ゆきひろです
前田です。
まつもと ゆきひろです
けいじゅ@日本ラショナルソフトウェアです.
まつもと ゆきひろです
けいじゅ@日本ラショナルソフトウェアです.
[#4347] ordered number — "D.Kanda" <MAP2303@...>
[#4349] Re: [ruby-list:11707] Re: ruby 1.2.2 released — EGUCHI Osamu <eguchi@...>
えぐち@エスアンドイー です。
えぐち@エスアンドイー です。
えぐち@エスアンドイー です。
まつもと ゆきひろです
えぐち@エスアンドイー です。
まつもと ゆきひろです
えぐち@エスアンドイー です。
まつもと ゆきひろです
えぐち@エスアンドイー です。
笠原です。
えぐち@エスアンドイー です。
笠原です。
立石です。
えぐち@エスアンドイー です。
[#4419] Re: module Precision — Inaba Hiroto <inaba@...>
ごとけんです
From: gotoken@math.sci.hokudai.ac.jp (GOTO Kentaro)
ごとけんです
まつもと ゆきひろです
ごとけんです
まつもと ゆきひろです
ごとけんです
まつもと ゆきひろです
ごとけんです
[#4420] ruby 1.3.1-990126 — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろです
えぐち@エスアンドイー です。
[#4442] Forward: ruby 1.3.1-990126 — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろです
[#4452] permit to put a comma — Koji Arai <JCA02266@...>
新井です。
まつもと ゆきひろです
新井です。
[#4480] option -h — Wakou Aoyama <wakou@...>
青山です。
[#4481] bug? thread — WATANABE Tetsuya <tetsu@...>
渡辺哲也です。
[#4498] cookie on cgi-lib.rb — IKARASHI Akira <ikarashi@...>
五十嵐です。
[#4518] Inf.0 — gotoken@... (GOTO Kentaro)
ごとけんです
[ruby-dev:4302] ruby-1.3 MacRuby patch
藤本です。こんにちは。 ruby-1.3のMacRuby用のパッチが収束してきたので、パッチを送ります。他 へは影響しないよう注意して作ったつもりです。取り込んでもらえるとうれし いです。 ============================================================= 藤本尚邦 FUJIMOTO Hisakuni hisa@imasy.or.jp =============================================================
Attachments (1)
Index: ruby/ruby-1/defines.h
diff -u ruby/ruby-1/defines.h:1.1.1.6 ruby/ruby-1/defines.h:1.1.1.6.4.2
--- ruby/ruby-1/defines.h:1.1.1.6 Sun Dec 27 01:28:06 1998
+++ ruby/ruby-1/defines.h Thu Jan 21 14:29:21 1999
@@ -44,7 +44,7 @@
#define FLUSH_REGISTER_WINDOWS /* empty */
#endif
-#if defined(MSDOS) || defined(NT) || defined(__human68k__) || defined(__MACOS__)
+#if defined(MSDOS) || defined(NT) || defined(__human68k__)
#define RUBY_LIB_SEP ";"
#else
#define RUBY_LIB_SEP ":"
Index: ruby/ruby-1/dln.c
diff -u ruby/ruby-1/dln.c:1.1.1.7 ruby/ruby-1/dln.c:1.1.1.7.4.3
--- ruby/ruby-1/dln.c:1.1.1.7 Sun Dec 27 01:28:07 1998
+++ ruby/ruby-1/dln.c Thu Jan 21 13:49:25 1999
@@ -64,6 +64,7 @@
# include <TextUtils.h>
# include <CodeFragments.h>
# include <Aliases.h>
+# include "macruby_private.h"
#endif
#ifdef __BEOS__
@@ -1516,8 +1517,13 @@
char *fname;
char *path;
{
+#ifndef __MACOS__
if (!path) path = ".";
return dln_find_1(fname, path, 0);
+#else
+ if (!path) path = ".";
+ return _macruby_path_conv_posix_to_macos(dln_find_1(fname, path, 0));
+#endif
}
#if defined(__CYGWIN32__)
@@ -1555,14 +1561,17 @@
register char *dp;
register char *ep;
register char *bp;
+#ifndef __MACOS__
struct stat st;
+#else
+ const char* mac_fullpath;
+#endif
#if defined(__CYGWIN32__)
char rubypath[MAXPATHLEN];
conv_to_posix_path(path, rubypath);
path = rubypath;
#endif
-#ifndef __MACOS__
if (fname[0] == '/') return fname;
if (strncmp("./", fname, 2) == 0 || strncmp("../", fname, 3) == 0)
return fname;
@@ -1574,7 +1583,6 @@
return fname;
if (exe_flag && strchr(fname, '\\')) return fname;
#endif
-#endif /* __MACOS__ */
for (dp = path;; dp = ++ep) {
register int l;
@@ -1582,7 +1590,7 @@
int fspace;
/* extract a component */
-#if !defined(MSDOS) && !defined(NT) && !defined(__human68k__) && !defined(__MACOS__)
+#if !defined(MSDOS) && !defined(NT) && !defined(__human68k__)
ep = strchr(dp, ':');
#else
ep = strchr(dp, ';');
@@ -1630,11 +1638,7 @@
/* add a "/" between directory and filename */
if (ep[-1] != '/')
-#ifdef __MACOS__
- *bp++ = ':';
-#else
*bp++ = '/';
-#endif
}
/* now append the file name */
@@ -1649,11 +1653,19 @@
}
memcpy(bp, fname, i + 1);
+#ifndef __MACOS__
if (stat(fbuf, &st) == 0) {
if (exe_flag == 0) return fbuf;
/* looking for executable */
if (eaccess(fbuf, X_OK) == 0) return fbuf;
}
+#else
+ if (mac_fullpath = _macruby_exist_file_in_libdir_as_posix_name(fbuf)) {
+ if (exe_flag == 0) return mac_fullpath;
+ /* looking for executable */
+ if (eaccess(mac_fullpath, X_OK) == 0) return mac_fullpath;
+ }
+#endif
#if defined(MSDOS) || defined(NT) || defined(__human68k__)
if (exe_flag) {
static const char *extension[] = {
@@ -1677,8 +1689,13 @@
continue;
}
strcpy(bp + i, extension[j]);
+#ifndef __MACOS__
if (stat(fbuf, &st) == 0)
return fbuf;
+#else
+ if (mac_fullpath = _macruby_exist_file_in_libdir_as_posix_name(fbuf))
+ return mac_fullpath;
+#endif
}
}
#endif /* MSDOS or NT or __human68k__ */
Index: ruby/ruby-1/eval.c
diff -u ruby/ruby-1/eval.c:1.1.1.9 ruby/ruby-1/eval.c:1.1.1.9.4.2
--- ruby/ruby-1/eval.c:1.1.1.9 Sun Dec 27 01:28:09 1998
+++ ruby/ruby-1/eval.c Thu Jan 21 13:49:25 1999
@@ -38,6 +38,10 @@
#include <compat.h>
#endif
+#ifdef __MACOS__
+#include "macruby_private.h"
+#endif
+
#ifndef setjmp
#ifdef HAVE__SETJMP
#define setjmp(env) _setjmp(env)
@@ -886,6 +890,9 @@
ruby_frame->self = rb_top_self;
ruby_frame->cbase = (VALUE)rb_node_newnode(NODE_CREF,rb_cObject,0,0);
rb_define_global_const("TOPLEVEL_BINDING", rb_f_binding(rb_top_self));
+#ifdef __MACOS__
+ _macruby_init();
+#endif
ruby_prog_init();
}
POP_TAG();
@@ -4305,6 +4312,16 @@
return 0;
}
+#ifdef __MACOS__
+static int
+is_macos_native_path(path)
+ char *path;
+{
+ if (strchr(path, ':')) return 1;
+ return 0;
+}
+#endif
+
static char*
find_file(file)
char *file;
@@ -4312,6 +4329,16 @@
extern VALUE rb_load_path;
char *path;
+#ifdef __MACOS__
+ if (is_macos_native_path(file)) {
+ FILE *f = fopen(file, "r");
+
+ if (f == NULL) return 0;
+ fclose(f);
+ return file;
+ }
+#endif
+
if (is_absolute_path(file)) {
FILE *f = fopen(file, "r");
@@ -4354,11 +4381,9 @@
rb_secure(4);
Check_SafeStr(fname);
-#ifndef __MACOS__
if (RSTRING(fname)->ptr[0] == '~') {
fname = rb_file_s_expand_path(1, &fname);
}
-#endif
file = find_file(RSTRING(fname)->ptr);
if (!file) {
rb_raise(rb_eLoadError, "No such file to load -- %s",
Index: ruby/ruby-1/file.c
diff -u ruby/ruby-1/file.c:1.1.1.5 ruby/ruby-1/file.c:1.1.1.5.4.1
--- ruby/ruby-1/file.c:1.1.1.5 Sun Dec 27 01:28:12 1998
+++ ruby/ruby-1/file.c Mon Jan 18 11:17:24 1999
@@ -54,6 +54,7 @@
#include "macruby_missing.h"
extern int fileno(FILE *stream);
extern int utimes();
+ char* strdup(char*);
#endif
VALUE rb_cFile;
Index: ruby/ruby-1/gc.c
diff -u ruby/ruby-1/gc.c:1.1.1.7 ruby/ruby-1/gc.c:1.1.1.7.4.1
--- ruby/ruby-1/gc.c:1.1.1.7 Sun Dec 27 01:28:12 1998
+++ ruby/ruby-1/gc.c Mon Jan 18 11:17:25 1999
@@ -393,7 +393,8 @@
obj->as.basic.flags |= FL_MARK;
if (FL_TEST(obj, FL_EXIVAR)) {
- return rb_mark_generic_ivar((VALUE)obj);
+ rb_mark_generic_ivar((VALUE)obj);
+ return;
}
switch (obj->as.basic.flags & T_MASK) {
Index: ruby/ruby-1/hash.c
diff -u ruby/ruby-1/hash.c:1.1.1.5 ruby/ruby-1/hash.c:1.1.1.5.4.2
--- ruby/ruby-1/hash.c:1.1.1.5 Sun Dec 27 01:28:13 1998
+++ ruby/ruby-1/hash.c Tue Jan 19 00:12:41 1999
@@ -21,6 +21,10 @@
char *strchr _((char*,char));
#endif
+#ifdef USE_CWGUSI
+char* strdup(const char*);
+#endif
+
#define HASH_FREEZE FL_USER1
#define HASH_DELETED FL_USER2
@@ -823,7 +827,6 @@
return hash1;
}
-#ifndef __MACOS__ /* no environment variables on MacOS. */
static int path_tainted = -1;
#ifndef NT
@@ -1314,8 +1317,6 @@
}
return hash;
}
-
-#endif /* ifndef __MACOS__ no environment variables on MacOS. */
void
Init_Hash()
Index: ruby/ruby-1/intern.h
diff -u ruby/ruby-1/intern.h:1.1.1.8 ruby/ruby-1/intern.h:1.1.1.8.4.1
--- ruby/ruby-1/intern.h:1.1.1.8 Sun Dec 27 01:28:13 1998
+++ ruby/ruby-1/intern.h Mon Jan 18 11:17:25 1999
@@ -225,6 +225,7 @@
void rb_set_kcode _((char*));
int rb_ignorecase_p _((void));
/* ruby.c */
+extern VALUE rb_argv0;
void rb_load_file _((char*));
void ruby_script _((char*));
void ruby_prog_init _((void));
Index: ruby/ruby-1/io.c
diff -u ruby/ruby-1/io.c:1.1.1.8 ruby/ruby-1/io.c:1.1.1.8.4.1
--- ruby/ruby-1/io.c:1.1.1.8 Sun Dec 27 01:28:14 1998
+++ ruby/ruby-1/io.c Mon Jan 18 11:17:25 1999
@@ -55,6 +55,7 @@
#include <unix.mac.h>
#include <compat.h>
extern void Init_File();
+ extern char* strdup(const char*);
#endif
#ifdef __BEOS__
@@ -99,7 +100,7 @@
#elif defined(__BEOS__)
# define ReadDataPending(fp) (fp->_state._eof == 0)
#elif defined(USE_CWGUSI)
-# define ReadDataPending(fp) (fp->state.eof == 0)
+# define READ_DATA_PENDING(fp) (fp->state.eof == 0)
#else
/* requires systems own version of the ReadDataPending() */
extern int ReadDataPending();
@@ -675,6 +676,7 @@
GetOpenFile(io, fptr);
rb_io_check_readable(fptr);
fptr->lineno = NUM2INT(lineno);
+ return lineno;
}
static void
@@ -1011,9 +1013,9 @@
rb_sys_fail(fptr->path);
# else /* USE_CWGUSI */
if (fptr->f)
- fptr->f->mode.binrb_ary_io = 1;
+ fptr->f->mode.binary_io = 1;
if (fptr->f2)
- fptr->f2->mode.binrb_ary_io = 1;
+ fptr->f2->mode.binary_io = 1;
# endif /* USE_CWGUSI */
#endif
Index: ruby/ruby-1/main.c
diff -u ruby/ruby-1/main.c:1.1.1.1 ruby/ruby-1/main.c:1.1.1.1.22.2
--- ruby/ruby-1/main.c:1.1.1.1 Sat Sep 5 21:27:29 1998
+++ ruby/ruby-1/main.c Thu Jan 21 13:49:28 1999
@@ -18,6 +18,10 @@
int _stacksize = 131072;
#endif
+#if defined(__MACOS__) && defined(__MWERKS__)
+#include <console.h>
+#endif
+
int
main(argc, argv, envp)
int argc;
@@ -25,6 +29,9 @@
{
#if defined(NT)
NtInitialize(&argc, &argv);
+#endif
+#if defined(__MACOS__) && defined(__MWERKS__)
+ argc = ccommand(&argv);
#endif
ruby_init();
Index: ruby/ruby-1/parse.c
diff -u ruby/ruby-1/parse.c:1.1.1.6 ruby/ruby-1/parse.c:1.1.1.6.4.1
--- ruby/ruby-1/parse.c:1.1.1.6 Sun Dec 27 01:28:18 1998
+++ ruby/ruby-1/parse.c Thu Jan 21 13:49:28 1999
@@ -4577,6 +4577,10 @@
RSTRING(line)->ptr[RSTRING(line)->len-2] = '\n';
RSTRING(line)->len--;
}
+#ifdef __MACOS__
+ else if (RSTRING(line)->ptr[RSTRING(line)->len-1] == '\r')
+ RSTRING(line)->ptr[RSTRING(line)->len-1] = '\n';
+#endif
}
static int
Index: ruby/ruby-1/parse.y
diff -u ruby/ruby-1/parse.y:1.1.1.8 ruby/ruby-1/parse.y:1.1.1.8.4.1
--- ruby/ruby-1/parse.y:1.1.1.8 Sun Dec 27 01:28:22 1998
+++ ruby/ruby-1/parse.y Thu Jan 21 13:49:31 1999
@@ -1745,6 +1745,10 @@
RSTRING(line)->ptr[RSTRING(line)->len-2] = '\n';
RSTRING(line)->len--;
}
+#ifdef __MACOS__
+ else if (RSTRING(line)->ptr[RSTRING(line)->len-1] == '\r')
+ RSTRING(line)->ptr[RSTRING(line)->len-1] = '\n';
+#endif
}
static int
Index: ruby/ruby-1/process.c
diff -u ruby/ruby-1/process.c:1.1.1.7 ruby/ruby-1/process.c:1.1.1.7.4.2
--- ruby/ruby-1/process.c:1.1.1.7 Sun Dec 27 01:28:23 1998
+++ ruby/ruby-1/process.c Thu Jan 21 13:49:31 1999
@@ -138,7 +138,7 @@
pid_tbl = st_init_numtable();
st_insert(pid_tbl, pid, st);
#ifdef USE_THREAD
- if (!thread_alone()) rb_thread_schedule();
+ if (!rb_thread_alone()) rb_thread_schedule();
#endif
}
#endif
@@ -521,7 +521,7 @@
rb_f_fork(obj)
VALUE obj;
{
-#if !defined(__human68k__)
+#if !defined(__human68k__) && !defined(__MACOS__)
int pid;
rb_secure(2);
@@ -670,7 +670,10 @@
rb_last_status = state == -1 ? INT2FIX(127) : INT2FIX(state);
return state == 0 ? Qtrue : Qfalse ;
#else
- volatile VALUE prog = 0;
+#if defined(USE_CWGUSI)
+ rb_notimplement();
+#else
+ volatile VALUE prog = 0;
int pid;
int i;
@@ -725,9 +728,10 @@
if (rb_last_status == INT2FIX(0)) return Qtrue;
return Qfalse;
-#endif
-#endif
-#endif
+#endif /* USE_CWGUSI */
+#endif /* __human68k__ */
+#endif /* DJGPP */
+#endif /* NT */
}
static VALUE
@@ -1032,13 +1036,11 @@
#ifndef USE_CWGUSI
rb_define_global_function("exec", rb_f_exec, -1);
#endif
-#if !defined(NT) && !defined(USE_CWGUSI)
+#if !defined(NT)
rb_define_global_function("fork", rb_f_fork, 0);
#endif
rb_define_global_function("exit!", rb_f_exit_bang, 1);
-#ifndef USE_CWGUSI
rb_define_global_function("system", rb_f_system, -1);
-#endif
rb_define_global_function("sleep", rb_f_sleep, -1);
rb_mProcess = rb_define_module("Process");
@@ -1056,7 +1058,7 @@
#endif
#endif
-#if !defined(NT) && !defined(USE_CWGUSI)
+#if !defined(NT)
rb_define_singleton_method(rb_mProcess, "fork", rb_f_fork, 0);
#endif
rb_define_singleton_method(rb_mProcess, "exit!", rb_f_exit_bang, 1);
Index: ruby/ruby-1/ruby.c
diff -u ruby/ruby-1/ruby.c:1.1.1.6 ruby/ruby-1/ruby.c:1.1.1.6.4.4
--- ruby/ruby-1/ruby.c:1.1.1.6 Sun Dec 27 01:28:24 1998
+++ ruby/ruby-1/ruby.c Thu Jan 21 13:49:32 1999
@@ -28,10 +28,6 @@
#include <unistd.h>
#endif
-#ifdef __MWERKS__
-#include "node.h"
-#endif
-
#ifdef USE_CWGUSI
#include "macruby_missing.h"
#endif
@@ -739,15 +735,16 @@
rb_define_readonly_variable("$-l", &do_line);
if (rb_safe_level() == 0) {
+#ifndef test__MACOS__
+ addpath(".");
+#else
addpath(".");
+#endif
}
addpath(RUBY_LIB);
#if defined(_WIN32) || defined(DJGPP)
addpath(ruby_libpath());
-#endif
-#ifdef __MACOS__
- setup_macruby_libpath();
#endif
#ifdef RUBY_ARCHLIB
Index: ruby/ruby-1/signal.c
diff -u ruby/ruby-1/signal.c:1.1.1.4 ruby/ruby-1/signal.c:1.1.1.4.4.1
--- ruby/ruby-1/signal.c:1.1.1.4 Sun Dec 27 01:28:25 1998
+++ ruby/ruby-1/signal.c Mon Jan 18 11:17:26 1999
@@ -507,7 +507,7 @@
void
rb_trap_restore_mask()
{
-#ifndef NT
+#if !defined(NT) && !defined(USE_CWGUSI)
# ifdef HAVE_SIGPROCMASK
sigprocmask(SIG_SETMASK, &trap_last_mask, NULL);
# else
Index: ruby/ruby-1/sprintf.c
diff -u ruby/ruby-1/sprintf.c:1.1.1.6 ruby/ruby-1/sprintf.c:1.1.1.6.4.1
--- ruby/ruby-1/sprintf.c:1.1.1.6 Sun Dec 27 01:28:25 1998
+++ ruby/ruby-1/sprintf.c Mon Jan 18 11:17:26 1999
@@ -13,7 +13,11 @@
#include "ruby.h"
#include <ctype.h>
+#ifdef USE_CWGUSI
+static void fmt_setup();
+#else
static void fmt_setup _((char*,char,int,int,int));
+#endif
static char*
remove_sign_bits(str, base)
Index: ruby/ruby-1/time.c
diff -u ruby/ruby-1/time.c:1.1.1.6 ruby/ruby-1/time.c:1.1.1.6.4.1
--- ruby/ruby-1/time.c:1.1.1.6 Sun Dec 27 01:28:26 1998
+++ ruby/ruby-1/time.c Tue Jan 19 00:12:42 1999
@@ -79,8 +79,10 @@
VALUE obj;
struct time_object *tobj;
+#ifndef USE_CWGUSI
if (sec < 0 || (sec == 0 && usec < 0))
rb_raise(rb_eArgError, "time must be positive");
+#endif
obj = Data_Make_Struct(klass, struct time_object, 0, free, tobj);
tobj->tm_got = 0;
tobj->tv.tv_sec = sec;
Index: ruby/ruby-1/util.c
diff -u ruby/ruby-1/util.c:1.1.1.7 ruby/ruby-1/util.c:1.1.1.7.4.1
--- ruby/ruby-1/util.c:1.1.1.7 Sun Dec 27 01:28:27 1998
+++ ruby/ruby-1/util.c Mon Jan 18 11:17:26 1999
@@ -19,6 +19,10 @@
#include "missing/file.h"
#endif
+#ifdef USE_CWGUSI
+extern char* mktemp(char*);
+#endif
+
VALUE
rb_class_of(obj)
VALUE obj;