summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--MANIFEST1
-rw-r--r--Makefile.in27
-rw-r--r--README.EXT95
-rw-r--r--README.EXT.jp2
-rw-r--r--ToDo5
-rw-r--r--array.c113
-rw-r--r--bignum.c50
-rw-r--r--class.c4
-rw-r--r--compar.c2
-rw-r--r--configure555
-rw-r--r--configure.in55
-rw-r--r--defines.h4
-rw-r--r--dir.c2
-rw-r--r--dln.c31
-rw-r--r--enum.c2
-rw-r--r--error.c11
-rw-r--r--eval.c78
-rw-r--r--ext/Win32API/Win32API.c30
-rw-r--r--ext/etc/MANIFEST3
-rw-r--r--ext/extmk.rb.in2
-rw-r--r--ext/md5/MANIFEST3
-rw-r--r--ext/tk/lib/tk.rb3
-rw-r--r--ext/tk/lib/tkscrollbox.rb4
-rw-r--r--file.c3
-rw-r--r--gc.c2
-rw-r--r--hash.c9
-rw-r--r--inits.c4
-rw-r--r--instruby.rb13
-rw-r--r--intern.h23
-rw-r--r--io.c11
-rw-r--r--main.c7
-rw-r--r--math.c2
-rw-r--r--missing/vsnprintf.c37
-rw-r--r--node.h2
-rw-r--r--numeric.c30
-rw-r--r--object.c4
-rw-r--r--pack.c2
-rw-r--r--parse.c4
-rw-r--r--parse.y6
-rw-r--r--process.c24
-rw-r--r--random.c2
-rw-r--r--range.c2
-rw-r--r--re.c10
-rw-r--r--re.h2
-rw-r--r--regex.c14
-rw-r--r--regex.h14
-rw-r--r--ruby.c5
-rw-r--r--ruby.h14
-rw-r--r--rubyio.h2
-rw-r--r--signal.c2
-rw-r--r--sprintf.c6
-rw-r--r--string.c112
-rw-r--r--time.c4
-rw-r--r--util.c6
-rw-r--r--util.h2
-rw-r--r--version.c4
-rw-r--r--win32/config.h28
-rw-r--r--win32/win32.c2
-rw-r--r--win32/win32.h29
60 files changed, 886 insertions, 649 deletions
diff --git a/ChangeLog b/ChangeLog
index 6a317e294b..e9445aed77 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Tue Jan 26 02:40:41 1999 GOTO Kentaro <gotoken@math.sci.hokudai.ac.jp>
+
+ * prec.c: Precision support for numbers.
+
+Thu Jan 21 19:08:14 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * eval.c (rb_f_raise): calls `exception' method, not `new'.
+
+ * error.c (exc_exception): renamed from `new'.
+
Wed Jan 20 03:39:48 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
* parse.y (yycompile): rb_in_compile renamed to ruby_in_compile.
diff --git a/MANIFEST b/MANIFEST
index 5c697d612f..8f8976bb98 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -50,6 +50,7 @@ object.c
pack.c
parse.c
parse.y
+prec.c
process.c
random.c
range.c
diff --git a/Makefile.in b/Makefile.in
index 628b0e0778..3512cab03b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -2,6 +2,13 @@ SHELL = /bin/sh
#### Start of system configuration section. ####
+MAJOR= @MAJOR@
+MINOR= @MINOR@
+
+MAJOR= @MAJOR@
+MINOR= @MINOR@
+TEENY= @TEENY@
+
srcdir = @srcdir@
VPATH = @srcdir@:@srcdir@/missing
@@ -26,6 +33,9 @@ binsuffix = @binsuffix@
#### End of system configuration section. ####
+LIBRUBY_A = @LIBRUBY_A@
+LIBRUBY_SO = @LIBRUBY_SO@
+LIBRUBY_ALIASES= @LIBRUBY_ALIASES@
LIBRUBY = @LIBRUBY@
LIBRUBYARG = @LIBRUBYARG@
@@ -50,6 +60,7 @@ OBJS = array.o \
inits.o \
io.o \
marshal.o \
+ prec.o \
math.o \
numeric.o \
object.o \
@@ -75,25 +86,30 @@ OBJS = array.o \
all: miniruby$(binsuffix) rbconfig.rb
@./miniruby$(binsuffix) -Xext extmk.rb @EXTSTATIC@
-miniruby$(binsuffix): libruby.a $(MAINOBJ) dmyext.o
+miniruby$(binsuffix): $(LIBRUBY_A) $(MAINOBJ) dmyext.o
@rm -f $@
- $(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) dmyext.o libruby.a $(LIBS) -o $@
+ $(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) dmyext.o $(LIBRUBY_A) $(LIBS) -o $@
ruby$(binsuffix): $(LIBRUBY) $(MAINOBJ) $(EXTOBJS)
@rm -f $@
$(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@
-libruby.a: $(OBJS) dmyext.o
+$(LIBRUBY_A): $(OBJS) dmyext.o
@AR@ rcu $@ $(OBJS) dmyext.o
@-@RANLIB@ $@ 2> /dev/null || true
-libruby.so: $(OBJS) dmyext.o
+$(LIBRUBY_SO): $(OBJS) dmyext.o
$(LDSHARED) $(DLDFLAGS) $(SOLIBS) $(OBJS) dmyext.o -o $@
+ @for alias in $(LIBRUBY_ALIASES); do \
+ rm -f $$alias \
+ && @LN_S@ $(LIBRUBY_SO) $$alias \
+ && echo ln @LN_S@ $(LIBRUBY_SO) $$alias; \
+ done
install: rbconfig.rb
./miniruby$(binsuffix) $(srcdir)/instruby.rb $(DESTDIR)
-clean:; @rm -f $(OBJS) $(LIBRUBY) $(MAINOBJ) rbconfig.rb
+clean:; @rm -f $(OBJS) $(LIBRUBY_A) $(LIBRUBY_SO) $(LIBRUBY_ALIASES) $(MAINOBJ) rbconfig.rb
@rm -f ext/extinit.c ext/extinit.o dmyext.o
@if test -f ./miniruby$(binsuffix); then \
./miniruby$(binsuffix) -Xext extmk.rb clean; \
@@ -208,6 +224,7 @@ inits.o: inits.c ruby.h config.h defines.h intern.h
io.o: io.c ruby.h config.h defines.h intern.h rubyio.h rubysig.h
main.o: main.c ruby.h config.h defines.h intern.h
marshal.o: marshal.c ruby.h config.h defines.h intern.h rubyio.h st.h
+prec.o: prec.c ruby.h config.h defines.h intern.h
math.o: math.c ruby.h config.h defines.h intern.h
numeric.o: numeric.c ruby.h config.h defines.h intern.h
object.o: object.c ruby.h config.h defines.h intern.h st.h
diff --git a/README.EXT b/README.EXT
index f169e54995..a7b64433ba 100644
--- a/README.EXT
+++ b/README.EXT
@@ -133,11 +133,11 @@ FIXNUMに関しては変換マクロを経由する必要があります.Cの整数
からVALUEに変換するマクロは以下のものがあります.必要に応じ
て使い分けてください.
- INT2FIX() もとの整数が31bit以内に収まる時
- INT2NUM() 任意の整数からVALUEへ
+ INT2FIX() for intergers within 31bits.
+ INT2NUM() for arbitrary sized integer.
-INT2NUM()は整数がFIXNUMの範囲に収まらない場合,Bignumに変換
-してくれます(が,少し遅い).
+INT2NUM() converts integers into Bignums, if it is out of FIXNUM
+range, but bit slower.
1.5 Manipulate Ruby data
@@ -205,8 +205,6 @@ Rubyで提供されている関数を使えばRubyインタプリタに新しい機能
* Methods, Singleton Methods
* Constants
-では順に紹介します.
-
2.1.1 Class/module definition
To define class or module, use functions below:
@@ -643,23 +641,21 @@ extconf.rbはモジュールのコンパイルに必要な条件のチェックなど
(6) prepare depend (optional)
-もし,ディレクトリにdependというファイルが存在すれば,
-Makefileが依存関係をチェックしてくれます.
+If the file named depend exists, Makefile will include that file to
+check dependency. You can make this file by invoking
% gcc -MM *.c > depend
-などで作ることが出来ます.あって損は無いでしょう.
+It's no harm. Prepare it.
(7) MANIFESTファイルにファイル名を入れる
- % ls > MANIFEST
+ % find * -type f -print > MANIFEST
% vi MANIFEST
-*.o, *~など不必要なファイル以外はMANIFESTに追加しておきます.
-make時にはMANIFESTの内容は参照しませんので,空のままでも問題
-は起きませんが,パッケージングの時に参照することがあるのと,
-必要なファイルを区別できるので,用意しておいた方が良いでしょ
-う.
+Append file names into MANIFEST. The compilation scheme requires
+MANIFEST only to be exist. But, you'd better take this step to
+distinguish required files.
(8) make
@@ -676,9 +672,9 @@ so that you can inspect the module by the debugger.
(10) done, now you have the extension library
-後はこっそり使うなり,広く公開するなり,売るなり,ご自由にお
-使いください.Rubyの作者は拡張ライブラリに関して一切の権利を
-主張しません.
+You can do anything you want with your library. The author of Ruby
+will not claim any restriction about your code depending Ruby API.
+Feel free to use, modify, distribute or sell your program.
Appendix A. Rubyのソースコードの分類
@@ -737,7 +733,7 @@ class library
struct.c
time.c
-Appendix B. 拡張用関数リファレンス
+Appendix B. Ruby extension API reference
C言語からRubyの機能を利用するAPIは以下の通りである.
@@ -764,7 +760,7 @@ const: Qtrue object(default true value)
const: Qfalse object
-** Cデータのカプセル化
+** C pointer wrapping
Data_Wrap_Struct(VALUE class, void (*mark)(), void (*free)(), void *sval)
@@ -783,33 +779,33 @@ type型のメモリをmallocし,変数svalに代入した後,それをカプセ
dataからtype型のポインタを取り出し変数svalに代入するマクロ.
-** クラス/モジュール定義
+** defining class/module
VALUE rb_define_class(char *name, VALUE super)
-superのサブクラスとして新しいRubyクラスを定義する.
+Defines new Ruby class as subclass of super.
VALUE rb_define_class_under(VALUE module, char *name, VALUE super)
-superのサブクラスとして新しいRubyクラスを定義し,moduleの定
-数として定義する.
+Creates new Ruby class as subclass of super, under the module's
+namespace.
VALUE rb_define_module(char *name)
-新しいRubyモジュールを定義する.
+Defines new Ruby module.
VALUE rb_define_module_under(VALUE module, char *name, VALUE super)
-新しいRubyモジュールを定義し,moduleの定数として定義する.
+Defines new Ruby module, under the modules's namespace.
void rb_include_module(VALUE class, VALUE module)
-モジュールをインクルードする.classがすでにmoduleをインクルー
-ドしている時には何もしない(多重インクルードの禁止).
+Includes module into class. If class already includes it, just
+ignore.
void rb_extend_object(VALUE object, VALUE module)
-オブジェクトをモジュール(で定義されているメソッド)で拡張する.
+Extend the object with module's attribute.
** Defining Global Variables
@@ -871,19 +867,20 @@ Defines global contant. This is just work as
rb_define_method(VALUE class, char *name, VALUE (*func)(), int argc)
-メソッドを定義する.argcはselfを除く引数の数.argcが-1の時,
-関数には引数の数(selfを含まない)を第1引数, 引数の配列を第2引
-数とする形式で与えられる(第3引数はself).argcが-2の時, 第1引
-数がself, 第2引数がargs(argsは引数を含むRubyの配列)という形
-式で与えられる.
+Defines a method for the class. func is the function pointer. argc
+is the number of arguments. if argc is -1, the function will receive
+3 arguments argc, argv, and self. if argc is -2, the function will
+receive 2 arguments, self and args, where args is the Ruby array of
+the method arguments.
rb_define_private_method(VALUE class, char *name, VALUE (*func)(), int argc)
-privateメソッドを定義する.引数はrb_define_method()と同じ.
+Defines a private method for the class. Arguments are same as
+rb_define_method().
rb_define_singleton_method(VALUE class, char *name, VALUE (*func)(), int argc)
-特異メソッドを定義する.引数はrb_define_method()と同じ.
+Defines a singleton method. Arguments are same as rb_define_method().
rb_scan_args(int atgc, VALUE *argv, char *fmt, ...)
@@ -899,42 +896,40 @@ argc,argv形式で与えられた引数を分解する.fmtは必須引数の数,
VALUE rb_funcall(VALUE recv, ID mid, int narg, ...)
-メソッド呼び出し.文字列からmidを得るためにはrb_intern()を使う.
+Invokes the method. To retrieve mid from method name, use rb_intern().
VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv)
-メソッド呼び出し.引数をargc,argv形式で渡す.
+Invokes method, passing arguments by array of values.
VALUE rb_eval_string(char *str)
-文字列をRubyとスクリプトしてコンパイル・実行する.
+Compiles and executes the string as Ruby program.
ID rb_intern(char *name)
-文字列に対応するIDを返す.
+Returns ID corresponding the name.
char *rb_id2name(ID id)
-IDに対応する文字列を返す(デバッグ用).
+Returns the name corresponding ID.
char *rb_class2name(VALUE class)
-classの名前を返す(デバッグ用).classが名前を持たない時には,
-祖先を遡って名前を持つクラスの名前を返す.
+Returns the name of the class.
-** インスタンス変数
+** Instance Variables
VALUE rb_iv_get(VALUE obj, char *name)
-objのインスタンス変数の値を得る.`@'で始まらないインスタンス
-変数は Rubyプログラムからアクセスできない「隠れた」インスタ
-ンス変数になる.
+Retrieve the value of the instance variable. If the name is not
+prefixed by `@', that variable shall be inaccessible from Ruby.
VALUE rb_iv_set(VALUE obj, char *name, VALUE val)
-objのインスタンス変数をvalにセットする.
+Sets the value of the instance variable.
-** 制御構造
+** Control Structure
VALUE rb_iterate(VALUE (*func1)(), void *arg1, VALUE (*func2)(), void *arg2)
@@ -1024,6 +1019,6 @@ this method, the compilation will not be done.
/*
* Local variables:
- * fill-column: 60
+ * fill-column: 70
* end:
*/
diff --git a/README.EXT.jp b/README.EXT.jp
index 87175be853..af3e0ae983 100644
--- a/README.EXT.jp
+++ b/README.EXT.jp
@@ -723,7 +723,7 @@ Makefileが依存関係をチェックしてくれます.
(7) MANIFESTファイルにファイル名を入れる
- % ls > MANIFEST
+ % find * -type f -print > MANIFEST
% vi MANIFEST
*.o, *~など不必要なファイル以外はMANIFESTに追加しておきます.
diff --git a/ToDo b/ToDo
index 3bc7887489..7f20c28ed3 100644
--- a/ToDo
+++ b/ToDo
@@ -1,8 +1,10 @@
Language Spec.
* package or access control for global variables
-* named arguments like foo(nation:="german").
+* named arguments like foo(nation:="german" or nation: "german").
+* method to retrieve argument information (need new C API)
* multiple return values, yield values. maybe imcompatible
+* cascading method invocation.
Hacking Interpreter
@@ -12,7 +14,6 @@ Hacking Interpreter
* remove rb_eval() recursions
* syntax tree -> bytecode ???
* scrambled script, or script filter
-* regular expression bug /(?:\s+\d+){2}/ URGENT!!
Extension Libraries
diff --git a/array.c b/array.c
index 8f6c0c223f..968899f42c 100644
--- a/array.c
+++ b/array.c
@@ -6,7 +6,7 @@
$Date$
created at: Fri Aug 6 09:46:12 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
@@ -72,7 +72,7 @@ rb_ary_frozen_p(ary)
VALUE
rb_ary_new2(len)
- size_t len;
+ int len;
{
NEWOBJ(ary, struct RArray);
OBJSETUP(ary, rb_cArray, T_ARRAY);
@@ -107,16 +107,16 @@ rb_ary_new()
VALUE
#ifdef HAVE_STDARG_PROTOTYPES
-rb_ary_new3(size_t n, ...)
+rb_ary_new3(int n, ...)
#else
rb_ary_new3(n, va_alist)
- size_t n;
+ int n;
va_dcl
#endif
{
va_list ar;
VALUE ary;
- size_t i;
+ int i;
if (n < 0) {
rb_raise(rb_eIndexError, "negative number of items(%d)", n);
@@ -135,7 +135,7 @@ rb_ary_new3(n, va_alist)
VALUE
rb_ary_new4(n, elts)
- size_t n;
+ int n;
VALUE *elts;
{
VALUE ary;
@@ -169,7 +169,7 @@ rb_ary_s_new(argc, argv, klass)
VALUE *argv;
VALUE klass;
{
- size_t len = 0;
+ int len = 0;
VALUE size, val;
NEWOBJ(ary, struct RArray);
OBJSETUP(ary, klass, T_ARRAY);
@@ -180,7 +180,7 @@ rb_ary_s_new(argc, argv, klass)
ary->capa = ARY_DEFAULT_SIZE;
}
else {
- size_t capa = NUM2UINT(size);
+ int capa = NUM2INT(size);
if (capa < 0) {
rb_raise(rb_eArgError, "negative array size");
@@ -224,7 +224,7 @@ rb_ary_s_create(argc, argv, klass)
void
rb_ary_store(ary, idx, val)
VALUE ary;
- size_t idx;
+ int idx;
VALUE val;
{
rb_ary_modify(ary);
@@ -326,7 +326,7 @@ rb_ary_unshift(ary, item)
VALUE
rb_ary_entry(ary, offset)
VALUE ary;
- size_t offset;
+ int offset;
{
if (RARRAY(ary)->len == 0) return Qnil;
@@ -343,7 +343,7 @@ rb_ary_entry(ary, offset)
static VALUE
rb_ary_subseq(ary, beg, len)
VALUE ary;
- size_t beg, len;
+ int beg, len;
{
VALUE ary2;
@@ -371,11 +371,10 @@ rb_ary_subseq(ary, beg, len)
static VALUE
beg_len(range, begp, lenp, len)
VALUE range;
- size_t *begp, *lenp;
- size_t len;
+ int *begp, *lenp, len;
{
- size_t beg, end;
- size_t b, e;
+ int beg, end;
+ int b, e;
if (!rb_range_beg_end(range, &beg, &end)) return Qfalse;
b = beg; e = end;
@@ -408,11 +407,11 @@ rb_ary_aref(argc, argv, ary)
VALUE ary;
{
VALUE arg1, arg2;
- size_t beg, len;
+ int beg, len;
if (rb_scan_args(argc, argv, "11", &arg1, &arg2) == 2) {
- beg = NUM2UINT(arg1);
- len = NUM2UINT(arg2);
+ beg = NUM2INT(arg1);
+ len = NUM2INT(arg2);
if (beg < 0) {
beg = RARRAY(ary)->len + beg;
}
@@ -421,7 +420,7 @@ rb_ary_aref(argc, argv, ary)
/* special case - speeding up */
if (FIXNUM_P(arg1)) {
- return rb_ary_entry(ary, FIX2UINT(arg1));
+ return rb_ary_entry(ary, FIX2INT(arg1));
}
else if (TYPE(arg1) == T_BIGNUM) {
rb_raise(rb_eIndexError, "index too big");
@@ -430,7 +429,7 @@ rb_ary_aref(argc, argv, ary)
/* check if idx is Range */
return rb_ary_subseq(ary, beg, len);
}
- return rb_ary_entry(ary, NUM2UINT(arg1));
+ return rb_ary_entry(ary, NUM2INT(arg1));
}
static VALUE
@@ -438,7 +437,7 @@ rb_ary_index(ary, val)
VALUE ary;
VALUE val;
{
- size_t i;
+ int i;
for (i=0; i<RARRAY(ary)->len; i++) {
if (rb_equal(RARRAY(ary)->ptr[i], val))
@@ -452,7 +451,7 @@ rb_ary_rindex(ary, val)
VALUE ary;
VALUE val;
{
- size_t i = RARRAY(ary)->len;
+ int i = RARRAY(ary)->len;
while (i--) {
if (rb_equal(RARRAY(ary)->ptr[i], val))
@@ -468,11 +467,11 @@ rb_ary_indexes(argc, argv, ary)
VALUE ary;
{
VALUE new_ary;
- size_t i;
+ int i;
new_ary = rb_ary_new2(argc);
for (i=0; i<argc; i++) {
- rb_ary_store(new_ary, i, rb_ary_entry(ary, NUM2UINT(argv[i])));
+ rb_ary_store(new_ary, i, rb_ary_entry(ary, NUM2INT(argv[i])));
}
return new_ary;
@@ -481,7 +480,7 @@ rb_ary_indexes(argc, argv, ary)
static void
rb_ary_replace(ary, beg, len, rpl)
VALUE ary, rpl;
- size_t beg, len;
+ int beg, len;
{
if (len < 0) {
rb_raise(rb_eIndexError, "negative length %d", len);
@@ -511,7 +510,7 @@ rb_ary_replace(ary, beg, len, rpl)
RARRAY(ary)->len = len;
}
else {
- size_t alen;
+ int alen;
if (beg + len > RARRAY(ary)->len) {
len = RARRAY(ary)->len - beg;
@@ -539,12 +538,11 @@ rb_ary_aset(argc, argv, ary)
VALUE ary;
{
VALUE arg1, arg2, arg3;
- size_t offset;
- size_t beg, len;
+ int offset, beg, len;
if (rb_scan_args(argc, argv, "21", &arg1, &arg2, &arg3) == 3) {
- beg = NUM2UINT(arg1);
- len = NUM2UINT(arg2);
+ beg = NUM2INT(arg1);
+ len = NUM2INT(arg2);
if (beg < 0) {
beg = RARRAY(ary)->len + beg;
@@ -553,7 +551,7 @@ rb_ary_aset(argc, argv, ary)
return arg3;
}
else if (FIXNUM_P(arg1)) {
- offset = FIX2UINT(arg1);
+ offset = FIX2INT(arg1);
goto fixnum;
}
else if (beg_len(arg1, &beg, &len, RARRAY(ary)->len)) {
@@ -565,7 +563,7 @@ rb_ary_aset(argc, argv, ary)
rb_raise(rb_eIndexError, "index too big");
}
- offset = NUM2UINT(arg1);
+ offset = NUM2INT(arg1);
fixnum:
rb_ary_store(ary, offset, arg2);
return arg2;
@@ -575,7 +573,7 @@ VALUE
rb_ary_each(ary)
VALUE ary;
{
- size_t i;
+ int i;
for (i=0; i<RARRAY(ary)->len; i++) {
rb_yield(RARRAY(ary)->ptr[i]);
@@ -587,7 +585,7 @@ static VALUE
rb_ary_each_index(ary)
VALUE ary;
{
- size_t i;
+ int i;
for (i=0; i<RARRAY(ary)->len; i++) {
rb_yield(INT2FIX(i));
@@ -599,7 +597,7 @@ static VALUE
rb_ary_reverse_each(ary)
VALUE ary;
{
- size_t len = RARRAY(ary)->len;
+ int len = RARRAY(ary)->len;
while (len--) {
rb_yield(RARRAY(ary)->ptr[len]);
@@ -663,7 +661,7 @@ VALUE
rb_ary_join(ary, sep)
VALUE ary, sep;
{
- size_t i;
+ int i;
VALUE result, tmp;
if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);
@@ -824,7 +822,7 @@ static VALUE
inspect_ary(ary)
VALUE ary;
{
- size_t i = 0;
+ int i = 0;
VALUE s, str;
str = rb_str_new2("[");
@@ -953,7 +951,7 @@ rb_ary_delete(ary, item)
VALUE ary;
VALUE item;
{
- size_t i1, i2;
+ int i1, i2;
rb_ary_modify(ary);
for (i1 = i2 = 0; i1 < RARRAY(ary)->len; i1++) {
@@ -981,11 +979,11 @@ rb_ary_delete_at(ary, at)
VALUE ary;
VALUE at;
{
- size_t i1, i2, pos;
+ int i1, i2, pos;
VALUE del = Qnil;
rb_ary_modify(ary);
- pos = NUM2UINT(at);
+ pos = NUM2INT(at);
for (i1 = i2 = 0; i1 < RARRAY(ary)->len; i1++) {
if (i1 == pos) {
del = RARRAY(ary)->ptr[i1];
@@ -1005,7 +1003,7 @@ static VALUE
rb_ary_delete_if(ary)
VALUE ary;
{
- size_t i1, i2;
+ int i1, i2;
rb_ary_modify(ary);
for (i1 = i2 = 0; i1 < RARRAY(ary)->len; i1++) {
@@ -1024,7 +1022,7 @@ static VALUE
rb_ary_filter(ary)
VALUE ary;
{
- size_t i;
+ int i;
rb_ary_modify(ary);
for (i = 0; i < RARRAY(ary)->len; i++) {
@@ -1061,7 +1059,7 @@ rb_ary_fill(argc, argv, ary)
VALUE ary;
{
VALUE item, arg1, arg2;
- size_t beg, len, end;
+ int beg, end, len;
VALUE *p, *pend;
if (rb_scan_args(argc, argv, "12", &item, &arg1, &arg2) == 2 &&
@@ -1069,12 +1067,12 @@ rb_ary_fill(argc, argv, ary)
/* beg and len set already */
}
else {
- beg = NIL_P(arg1)?0:NUM2UINT(arg1);
+ beg = NIL_P(arg1)?0:NUM2INT(arg1);
if (beg < 0) {
beg = RARRAY(ary)->len + beg;
if (beg < 0) beg = 0;
}
- len = NIL_P(arg2)?RARRAY(ary)->len - beg:NUM2UINT(arg2);
+ len = NIL_P(arg2)?RARRAY(ary)->len - beg:NUM2INT(arg2);
}
rb_ary_modify(ary);
end = beg + len;
@@ -1138,13 +1136,13 @@ rb_ary_times(ary, times)
VALUE times;
{
VALUE ary2;
- size_t i, len;
+ int i, len;
if (TYPE(times) == T_STRING) {
return rb_ary_join(ary, times);
}
- len = NUM2UINT(times);
+ len = NUM2INT(times);
if (len < 0) {
rb_raise(rb_eArgError, "negative argument");
}
@@ -1200,7 +1198,7 @@ static VALUE
rb_ary_equal(ary1, ary2)
VALUE ary1, ary2;
{
- size_t i;
+ int i;
if (TYPE(ary2) != T_ARRAY) return Qfalse;
if (RARRAY(ary1)->len != RARRAY(ary2)->len) return Qfalse;
@@ -1215,7 +1213,7 @@ static VALUE
rb_ary_eql(ary1, ary2)
VALUE ary1, ary2;
{
- size_t i;
+ int i;
if (TYPE(ary2) != T_ARRAY) return Qfalse;
if (RARRAY(ary1)->len != RARRAY(ary2)->len)
@@ -1231,8 +1229,7 @@ static VALUE
rb_ary_hash(ary)
VALUE ary;
{
- size_t i;
- int h;
+ int i, h;
h = RARRAY(ary)->len;
for (i=0; i<RARRAY(ary)->len; i++) {
@@ -1247,7 +1244,7 @@ rb_ary_includes(ary, item)
VALUE ary;
VALUE item;
{
- size_t i;
+ int i;
for (i=0; i<RARRAY(ary)->len; i++) {
if (rb_equal(RARRAY(ary)->ptr[i], item)) {
return Qtrue;
@@ -1261,7 +1258,7 @@ rb_ary_cmp(ary, ary2)
VALUE ary;
VALUE ary2;
{
- size_t i, len;
+ int i, len;
ary2 = to_ary(ary2);
len = RARRAY(ary)->len;
@@ -1285,7 +1282,7 @@ rb_ary_diff(ary1, ary2)
VALUE ary1, ary2;
{
VALUE ary3;
- size_t i;
+ int i;
ary2 = to_ary(ary2);
ary3 = rb_ary_new();
@@ -1302,7 +1299,7 @@ rb_ary_and(ary1, ary2)
VALUE ary1, ary2;
{
VALUE ary3;
- size_t i;
+ int i;
ary2 = to_ary(ary2);
ary3 = rb_ary_new();
@@ -1320,7 +1317,7 @@ rb_ary_or(ary1, ary2)
VALUE ary1, ary2;
{
VALUE ary3;
- size_t i;
+ int i;
if (TYPE(ary2) != T_ARRAY) {
if (rb_ary_includes(ary1, ary2)) return ary1;
@@ -1414,7 +1411,7 @@ static VALUE
rb_ary_nitems(ary)
VALUE ary;
{
- size_t n = 0;
+ int n = 0;
VALUE *p, *pend;
p = RARRAY(ary)->ptr;
@@ -1430,7 +1427,7 @@ static VALUE
rb_ary_flatten_bang(ary)
VALUE ary;
{
- size_t i;
+ int i;
int mod = 0;
rb_ary_modify(ary);
diff --git a/bignum.c b/bignum.c
index 770e86ad80..6b0e78729b 100644
--- a/bignum.c
+++ b/bignum.c
@@ -26,7 +26,7 @@ typedef unsigned short USHORT;
static VALUE
bignew_1(klass, len, sign)
VALUE klass;
- size_t len;
+ int len;
char sign;
{
NEWOBJ(big, struct RBignum);
@@ -79,7 +79,7 @@ static VALUE
bignorm(x)
VALUE x;
{
- size_t len = RBIGNUM(x)->len;
+ int len = RBIGNUM(x)->len;
USHORT *ds = BDIGITS(x);
while (len-- && !ds[len]) ;
@@ -170,7 +170,7 @@ rb_str2inum(str, base)
{
char sign = 1, c;
unsigned long num;
- size_t len, blen = 1;
+ int len, blen = 1;
int i;
VALUE z;
USHORT *zds;
@@ -352,7 +352,7 @@ rb_big2ulong(x)
VALUE x;
{
unsigned long num;
- size_t len = RBIGNUM(x)->len;
+ int len = RBIGNUM(x)->len;
USHORT *ds;
if (len > sizeof(long)/sizeof(USHORT))
@@ -417,7 +417,7 @@ rb_big2dbl(x)
VALUE x;
{
double d = 0.0;
- size_t i = RBIGNUM(x)->len;
+ int i = RBIGNUM(x)->len;
USHORT *ds = BDIGITS(x);
while (i--) {
@@ -438,7 +438,7 @@ static VALUE
rb_big_cmp(x, y)
VALUE x, y;
{
- size_t xlen = RBIGNUM(x)->len;
+ int xlen = RBIGNUM(x)->len;
switch (TYPE(y)) {
case T_FIXNUM:
@@ -490,7 +490,7 @@ rb_big_neg(x)
VALUE x;
{
VALUE z = rb_big_clone(x);
- size_t i = RBIGNUM(x)->len;
+ int i = RBIGNUM(x)->len;
USHORT *ds = BDIGITS(z);
if (!RBIGNUM(x)->sign) rb_big_2comp(z);
@@ -508,7 +508,7 @@ bigsub(x, y)
VALUE z = 0;
USHORT *zds;
long num;
- size_t i;
+ int i;
i = RBIGNUM(x)->len;
/* if x is larger than y, swap */
@@ -556,7 +556,7 @@ bigadd(x, y, sign)
{
VALUE z;
long num;
- size_t i, len;
+ int i, len;
sign = (sign == RBIGNUM(y)->sign);
if (RBIGNUM(x)->sign != sign) {
@@ -636,7 +636,7 @@ VALUE
rb_big_mul(x, y)
VALUE x, y;
{
- size_t i, j;
+ int i, j;
unsigned long n = 0;
VALUE z;
USHORT *zds;
@@ -685,11 +685,11 @@ bigdivmod(x, y, div, mod, modulo)
VALUE *div, *mod;
int modulo;
{
- size_t nx = RBIGNUM(x)->len, ny = RBIGNUM(y)->len;
+ int nx = RBIGNUM(x)->len, ny = RBIGNUM(y)->len;
int i, j;
VALUE yy, z;
USHORT *xds, *yds, *zds, *tds;
- size_t t2;
+ unsigned long t2;
long num;
USHORT dd, q;
@@ -714,7 +714,7 @@ bigdivmod(x, y, div, mod, modulo)
if (div) *div = bignorm(z);
if (mod) {
if (!RBIGNUM(y)->sign) t2 = -(long)t2;
- *mod = INT2FIX(t2);
+ *mod = INT2NUM(t2);
}
return;
}
@@ -798,7 +798,7 @@ bigdivmod(x, y, div, mod, modulo)
RBIGNUM(*mod)->len = ny;
RBIGNUM(*mod)->sign = RBIGNUM(x)->sign;
if (modulo && RBIGNUM(x)->sign != RBIGNUM(y)->sign) {
- size_t len = ny;
+ int len = ny;
zds = BDIGITS(*mod);
while (len-- && !zds[len]);
if (len > 0) {
@@ -953,7 +953,7 @@ rb_big_and(x, y)
{
VALUE z;
USHORT *ds1, *ds2, *zds;
- size_t i, l1, l2;
+ int i, l1, l2;
char sign;
if (FIXNUM_P(y)) {
@@ -1112,11 +1112,11 @@ rb_big_lshift(x, y)
{
USHORT *xds, *zds;
int shift = NUM2INT(y);
- size_t s1 = shift/BITSPERDIG;
- size_t s2 = shift%BITSPERDIG;
+ int s1 = shift/BITSPERDIG;
+ int s2 = shift%BITSPERDIG;
VALUE z;
unsigned long num = 0;
- size_t len, i;
+ int len, i;
if (shift < 0) return rb_big_rshift(x, INT2FIX(-shift));
xds = BDIGITS(x);
@@ -1141,12 +1141,12 @@ rb_big_rshift(x, y)
{
USHORT *xds, *zds;
int shift = NUM2INT(y);
- size_t s1 = shift/BITSPERDIG;
- size_t s2 = shift%BITSPERDIG;
+ int s1 = shift/BITSPERDIG;
+ int s2 = shift%BITSPERDIG;
VALUE z;
unsigned long num = 0;
- size_t i = RBIGNUM(x)->len;
- size_t j;
+ int i = RBIGNUM(x)->len;
+ int j;
if (shift < 0) return rb_big_lshift(x, INT2FIX(-shift));
if (s1 > RBIGNUM(x)->len) {
@@ -1173,7 +1173,7 @@ rb_big_aref(x, y)
{
USHORT *xds;
int shift = NUM2INT(y);
- size_t s1, s2;
+ int s1, s2;
if (shift < 0) return INT2FIX(0);
s1 = shift/BITSPERDIG;
@@ -1197,7 +1197,7 @@ static VALUE
rb_big_hash(x)
VALUE x;
{
- size_t i, len;
+ int i, len;
int key;
USHORT *digits;
@@ -1243,7 +1243,7 @@ rb_big_rand(max)
VALUE max;
{
struct RBignum *v;
- size_t len;
+ int len;
len = RBIGNUM(max)->len;
v = RBIGNUM(bignew(len,1));
diff --git a/class.c b/class.c
index 86ac8c5ae7..c80473fd32 100644
--- a/class.c
+++ b/class.c
@@ -6,7 +6,7 @@
$Date$
created at: Tue Aug 10 15:05:44 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
@@ -596,7 +596,7 @@ rb_scan_args(argc, argv, fmt, va_alist)
if (ISDIGIT(*p)) {
n = *p - '0';
if (n > argc)
- rb_raise(rb_eArgError, "Wrong # of arguments (%d for %d)", argc, n);
+ rb_raise(rb_eArgError, "wrong # of arguments (%d for %d)", argc, n);
for (i=0; i<n; i++) {
var = va_arg(vargs, VALUE*);
*var = argv[i];
diff --git a/compar.c b/compar.c
index a6212a86bb..50e4fa3a87 100644
--- a/compar.c
+++ b/compar.c
@@ -6,7 +6,7 @@
$Date$
created at: Thu Aug 26 14:39:48 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
diff --git a/configure b/configure
index 31a40f05e8..f34f48bcae 100644
--- a/configure
+++ b/configure
@@ -532,6 +532,12 @@ fi
+MAJOR=1
+MINOR=3
+TEENY=1
+
+
+
# Check whether --with-gcc or --without-gcc was given.
if test "${with_gcc+set}" = set; then
withval="$with_gcc"
@@ -596,7 +602,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:600: checking host system type" >&5
+echo "configure:606: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -627,7 +633,7 @@ fi
if test "$fat_binary" = yes ; then
echo $ac_n "checking target architecture ""... $ac_c" 1>&6
-echo "configure:631: checking target architecture " >&5
+echo "configure:637: checking target architecture " >&5
case "$host_os" in
rhapsody*)
@@ -692,7 +698,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:696: checking for $ac_word" >&5
+echo "configure:702: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -722,7 +728,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:726: checking for $ac_word" >&5
+echo "configure:732: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -773,7 +779,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:777: checking for $ac_word" >&5
+echo "configure:783: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -805,7 +811,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:809: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:815: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -816,12 +822,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 820 "configure"
+#line 826 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -847,12 +853,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:851: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:857: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:856: checking whether we are using GNU C" >&5
+echo "configure:862: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -861,7 +867,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -880,7 +886,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:884: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:890: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -912,7 +918,7 @@ else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:916: checking how to run the C preprocessor" >&5
+echo "configure:922: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -927,13 +933,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 931 "configure"
+#line 937 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -944,13 +950,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 948 "configure"
+#line 954 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -961,13 +967,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 965 "configure"
+#line 971 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -993,13 +999,13 @@ echo "$ac_t""$CPP" 1>&6
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:997: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:1003: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <<EOF
-#line 1003 "configure"
+#line 1009 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@@ -1017,7 +1023,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 1021 "configure"
+#line 1027 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@@ -1043,7 +1049,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1047: checking for $ac_word" >&5
+echo "configure:1053: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1076,7 +1082,7 @@ test -n "$YACC" || YACC="yacc"
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1080: checking for $ac_word" >&5
+echo "configure:1086: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1109,7 +1115,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1113: checking for $ac_word" >&5
+echo "configure:1119: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1151,7 +1157,7 @@ test -n "$AR" || AR="ar"
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1155: checking for a BSD compatible install" >&5
+echo "configure:1161: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1203,8 +1209,29 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:1214: checking whether ln -s works" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+ rm -f conftestdata
+ ac_cv_prog_LN_S="ln -s"
+else
+ ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1208: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1235: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1234,17 +1261,17 @@ fi
# checks for UNIX variants that set C preprocessor variables
ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
-echo "configure:1238: checking for minix/config.h" >&5
+echo "configure:1265: checking for minix/config.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1243 "configure"
+#line 1270 "configure"
#include "confdefs.h"
#include <minix/config.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1283,7 +1310,7 @@ fi
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:1287: checking size of int" >&5
+echo "configure:1314: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1291,7 +1318,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1295 "configure"
+#line 1322 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1302,7 +1329,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int=`cat conftestval`
else
@@ -1322,7 +1349,7 @@ EOF
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:1326: checking size of long" >&5
+echo "configure:1353: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1330,7 +1357,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1334 "configure"
+#line 1361 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1341,7 +1368,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
@@ -1361,7 +1388,7 @@ EOF
echo $ac_n "checking size of void*""... $ac_c" 1>&6
-echo "configure:1365: checking size of void*" >&5
+echo "configure:1392: checking size of void*" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1369,7 +1396,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1373 "configure"
+#line 1400 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1380,7 +1407,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_voidp=`cat conftestval`
else
@@ -1399,21 +1426,99 @@ cat >> confdefs.h <<EOF
EOF
+echo $ac_n "checking size of float""... $ac_c" 1>&6
+echo "configure:1431: checking size of float" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1439 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(float));
+ exit(0);
+}
+EOF
+if { (eval echo configure:1450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_sizeof_float=`cat conftestval`
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_sizeof_float=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_float" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_FLOAT $ac_cv_sizeof_float
+EOF
+
+
+echo $ac_n "checking size of double""... $ac_c" 1>&6
+echo "configure:1470: checking size of double" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1478 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(double));
+ exit(0);
+}
+EOF
+if { (eval echo configure:1489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_sizeof_double=`cat conftestval`
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_sizeof_double=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_double" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_DOUBLE $ac_cv_sizeof_double
+EOF
+
+
echo $ac_n "checking for prototypes""... $ac_c" 1>&6
-echo "configure:1405: checking for prototypes" >&5
+echo "configure:1510: checking for prototypes" >&5
if eval "test \"`echo '$''{'rb_cv_have_prototypes'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1410 "configure"
+#line 1515 "configure"
#include "confdefs.h"
int foo(int x) { return 0; }
int main() {
return foo(10);
; return 0; }
EOF
-if { (eval echo configure:1417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_have_prototypes=yes
else
@@ -1434,12 +1539,12 @@ EOF
fi
echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
-echo "configure:1438: checking for variable length prototypes and stdarg.h" >&5
+echo "configure:1543: checking for variable length prototypes and stdarg.h" >&5
if eval "test \"`echo '$''{'rb_cv_stdarg'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1443 "configure"
+#line 1548 "configure"
#include "confdefs.h"
#include <stdarg.h>
@@ -1456,7 +1561,7 @@ int main() {
return foo(10, "", 3.14);
; return 0; }
EOF
-if { (eval echo configure:1460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_stdarg=yes
else
@@ -1477,19 +1582,19 @@ EOF
fi
echo $ac_n "checking for gcc attribute noreturn""... $ac_c" 1>&6
-echo "configure:1481: checking for gcc attribute noreturn" >&5
+echo "configure:1586: checking for gcc attribute noreturn" >&5
if eval "test \"`echo '$''{'rb_cv_have_attr_noreturn'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1486 "configure"
+#line 1591 "configure"
#include "confdefs.h"
void exit(int x) __attribute__ ((noreturn));
int main() {
; return 0; }
EOF
-if { (eval echo configure:1493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_have_attr_noreturn=yes
else
@@ -1518,7 +1623,7 @@ beos*) ;;
*) LIBS="-lm $LIBS";;
esac
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:1522: checking for crypt in -lcrypt" >&5
+echo "configure:1627: checking for crypt in -lcrypt" >&5
ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1526,7 +1631,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1530 "configure"
+#line 1635 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1537,7 +1642,7 @@ int main() {
crypt()
; return 0; }
EOF
-if { (eval echo configure:1541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1565,7 +1670,7 @@ else
fi
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:1569: checking for dlopen in -ldl" >&5
+echo "configure:1674: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1573,7 +1678,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1577 "configure"
+#line 1682 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1584,7 +1689,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1612,7 +1717,7 @@ else
fi
# Dynamic linking for SunOS/Solaris and SYSV
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:1616: checking for shl_load in -ldld" >&5
+echo "configure:1721: checking for shl_load in -ldld" >&5
ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1620,7 +1725,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1624 "configure"
+#line 1729 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1631,7 +1736,7 @@ int main() {
shl_load()
; return 0; }
EOF
-if { (eval echo configure:1635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1659,7 +1764,7 @@ else
fi
# Dynamic linking for HP-UX
echo $ac_n "checking for setlocale in -lxpg4""... $ac_c" 1>&6
-echo "configure:1663: checking for setlocale in -lxpg4" >&5
+echo "configure:1768: checking for setlocale in -lxpg4" >&5
ac_lib_var=`echo xpg4'_'setlocale | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1667,7 +1772,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lxpg4 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1671 "configure"
+#line 1776 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1678,7 +1783,7 @@ int main() {
setlocale()
; return 0; }
EOF
-if { (eval echo configure:1682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1711,12 +1816,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:1715: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1820: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1720 "configure"
+#line 1825 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -1724,7 +1829,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:1728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -1749,7 +1854,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:1753: checking for opendir in -ldir" >&5
+echo "configure:1858: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1757,7 +1862,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1761 "configure"
+#line 1866 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1768,7 +1873,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:1772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1790,7 +1895,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1794: checking for opendir in -lx" >&5
+echo "configure:1899: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1798,7 +1903,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1802 "configure"
+#line 1907 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1809,7 +1914,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:1813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1832,12 +1937,12 @@ fi
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1836: checking for ANSI C header files" >&5
+echo "configure:1941: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1841 "configure"
+#line 1946 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1845,7 +1950,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1862,7 +1967,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1866 "configure"
+#line 1971 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1880,7 +1985,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1884 "configure"
+#line 1989 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1901,7 +2006,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1905 "configure"
+#line 2010 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1912,7 +2017,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1941,17 +2046,17 @@ for ac_hdr in stdlib.h unistd.h limits.h sys/file.h sys/ioctl.h pwd.h \
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1945: checking for $ac_hdr" >&5
+echo "configure:2050: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1950 "configure"
+#line 2055 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1979,12 +2084,12 @@ done
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:1983: checking for uid_t in sys/types.h" >&5
+echo "configure:2088: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1988 "configure"
+#line 2093 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -2013,12 +2118,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2017: checking for size_t" >&5
+echo "configure:2122: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2022 "configure"
+#line 2127 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2046,12 +2151,12 @@ EOF
fi
echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
-echo "configure:2050: checking for st_blksize in struct stat" >&5
+echo "configure:2155: checking for st_blksize in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2055 "configure"
+#line 2160 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -2059,7 +2164,7 @@ int main() {
struct stat s; s.st_blksize;
; return 0; }
EOF
-if { (eval echo configure:2063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blksize=yes
else
@@ -2081,12 +2186,12 @@ fi
save_LIBOJBS="$LIBOBJS"
echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
-echo "configure:2085: checking for st_blocks in struct stat" >&5
+echo "configure:2190: checking for st_blocks in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2090 "configure"
+#line 2195 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -2094,7 +2199,7 @@ int main() {
struct stat s; s.st_blocks;
; return 0; }
EOF
-if { (eval echo configure:2098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blocks=yes
else
@@ -2118,12 +2223,12 @@ fi
LIBOBJS="$save_LIBOBJS"
echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
-echo "configure:2122: checking for st_rdev in struct stat" >&5
+echo "configure:2227: checking for st_rdev in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2127 "configure"
+#line 2232 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -2131,7 +2236,7 @@ int main() {
struct stat s; s.st_rdev;
; return 0; }
EOF
-if { (eval echo configure:2135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_rdev=yes
else
@@ -2153,7 +2258,7 @@ fi
echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
-echo "configure:2157: checking type of array argument to getgroups" >&5
+echo "configure:2262: checking type of array argument to getgroups" >&5
if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2161,7 +2266,7 @@ else
ac_cv_type_getgroups=cross
else
cat > conftest.$ac_ext <<EOF
-#line 2165 "configure"
+#line 2270 "configure"
#include "confdefs.h"
/* Thanks to Mike Rendell for this test. */
@@ -2186,7 +2291,7 @@ main()
}
EOF
-if { (eval echo configure:2190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_type_getgroups=gid_t
else
@@ -2200,7 +2305,7 @@ fi
if test $ac_cv_type_getgroups = cross; then
cat > conftest.$ac_ext <<EOF
-#line 2204 "configure"
+#line 2309 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
@@ -2224,12 +2329,12 @@ EOF
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2228: checking return type of signal handlers" >&5
+echo "configure:2333: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2233 "configure"
+#line 2338 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -2246,7 +2351,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:2250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -2267,19 +2372,19 @@ EOF
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:2271: checking for working alloca.h" >&5
+echo "configure:2376: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2276 "configure"
+#line 2381 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:2283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -2300,12 +2405,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2304: checking for alloca" >&5
+echo "configure:2409: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2309 "configure"
+#line 2414 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -2333,7 +2438,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:2337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -2365,12 +2470,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2369: checking whether alloca needs Cray hooks" >&5
+echo "configure:2474: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2374 "configure"
+#line 2479 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2395,12 +2500,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2399: checking for $ac_func" >&5
+echo "configure:2504: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2404 "configure"
+#line 2509 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2423,7 +2528,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2450,7 +2555,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2454: checking stack direction for C alloca" >&5
+echo "configure:2559: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2458,7 +2563,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2462 "configure"
+#line 2567 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2477,7 +2582,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -2499,12 +2604,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:2503: checking for pid_t" >&5
+echo "configure:2608: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2508 "configure"
+#line 2613 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2533,17 +2638,17 @@ fi
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:2537: checking for vfork.h" >&5
+echo "configure:2642: checking for vfork.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2542 "configure"
+#line 2647 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2568,18 +2673,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:2572: checking for working vfork" >&5
+echo "configure:2677: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:2578: checking for vfork" >&5
+echo "configure:2683: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2583 "configure"
+#line 2688 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -2602,7 +2707,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:2606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
@@ -2624,7 +2729,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 2628 "configure"
+#line 2733 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -2719,7 +2824,7 @@ main() {
}
}
EOF
-if { (eval echo configure:2723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_vfork_works=yes
else
@@ -2742,7 +2847,7 @@ EOF
fi
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:2746: checking for 8-bit clean memcmp" >&5
+echo "configure:2851: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2750,7 +2855,7 @@ else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 2754 "configure"
+#line 2859 "configure"
#include "confdefs.h"
main()
@@ -2760,7 +2865,7 @@ main()
}
EOF
-if { (eval echo configure:2764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
@@ -2781,12 +2886,12 @@ for ac_func in dup2 memmove mkdir strcasecmp strerror strftime\
strchr strstr strtoul strdup crypt flock vsnprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2785: checking for $ac_func" >&5
+echo "configure:2890: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2790 "configure"
+#line 2895 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2809,7 +2914,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2842,12 +2947,12 @@ for ac_func in fmod killpg drand48 random wait4 waitpid syscall getcwd\
dlopen sigprocmask sigaction _setjmp setpgrp setsid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2846: checking for $ac_func" >&5
+echo "configure:2951: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2851 "configure"
+#line 2956 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2870,7 +2975,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2896,12 +3001,12 @@ done
if test "$ac_cv_func_strftime" = no; then
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:2900: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:3005: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2905 "configure"
+#line 3010 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
@@ -2909,7 +3014,7 @@ int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:2913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
@@ -2930,12 +3035,12 @@ EOF
fi
echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:2934: checking for tm_zone in struct tm" >&5
+echo "configure:3039: checking for tm_zone in struct tm" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2939 "configure"
+#line 3044 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_cv_struct_tm>
@@ -2943,7 +3048,7 @@ int main() {
struct tm tm; tm.tm_zone;
; return 0; }
EOF
-if { (eval echo configure:2947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm_zone=yes
else
@@ -2963,12 +3068,12 @@ EOF
else
echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:2967: checking for tzname" >&5
+echo "configure:3072: checking for tzname" >&5
if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2972 "configure"
+#line 3077 "configure"
#include "confdefs.h"
#include <time.h>
#ifndef tzname /* For SGI. */
@@ -2978,7 +3083,7 @@ int main() {
atoi(*tzname);
; return 0; }
EOF
-if { (eval echo configure:2982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_var_tzname=yes
else
@@ -3000,14 +3105,14 @@ EOF
fi
cat > conftest.$ac_ext <<EOF
-#line 3004 "configure"
+#line 3109 "configure"
#include "confdefs.h"
int main() {
extern int daylight; int i = daylight;
; return 0; }
EOF
-if { (eval echo configure:3011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_DAYLIGHT 1
@@ -3027,7 +3132,7 @@ EOF
else
echo $ac_n "checking for BSD signal semantics""... $ac_c" 1>&6
-echo "configure:3031: checking for BSD signal semantics" >&5
+echo "configure:3136: checking for BSD signal semantics" >&5
if eval "test \"`echo '$''{'rb_cv_bsd_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3035,7 +3140,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3039 "configure"
+#line 3144 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3057,7 +3162,7 @@ main()
}
EOF
-if { (eval echo configure:3061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
rb_cv_bsd_signal=yes
else
@@ -3091,19 +3196,19 @@ EOF
else
echo $ac_n "checking whether getpgrp() has arg""... $ac_c" 1>&6
-echo "configure:3095: checking whether getpgrp() has arg" >&5
+echo "configure:3200: checking whether getpgrp() has arg" >&5
if eval "test \"`echo '$''{'rb_cv_bsdgetpgrp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3100 "configure"
+#line 3205 "configure"
#include "confdefs.h"
#include <unistd.h>
int main() {
getpgrp(0);
; return 0; }
EOF
-if { (eval echo configure:3107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_bsdgetpgrp=yes
else
@@ -3124,19 +3229,19 @@ EOF
fi
echo $ac_n "checking whether setpgrp() has args""... $ac_c" 1>&6
-echo "configure:3128: checking whether setpgrp() has args" >&5
+echo "configure:3233: checking whether setpgrp() has args" >&5
if eval "test \"`echo '$''{'rb_cv_bsdsetpgrp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3133 "configure"
+#line 3238 "configure"
#include "confdefs.h"
#include <unistd.h>
int main() {
setpgrp(1, 1);
; return 0; }
EOF
-if { (eval echo configure:3140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_bsdsetpgrp=yes
else
@@ -3158,14 +3263,14 @@ EOF
fi
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3162: checking whether byte ordering is bigendian" >&5
+echo "configure:3267: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 3169 "configure"
+#line 3274 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3176,11 +3281,11 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 3184 "configure"
+#line 3289 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3191,7 +3296,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
@@ -3211,7 +3316,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3215 "configure"
+#line 3320 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
@@ -3224,7 +3329,7 @@ main () {
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:3228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
@@ -3248,14 +3353,14 @@ EOF
fi
echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
-echo "configure:3252: checking whether char is unsigned" >&5
+echo "configure:3357: checking whether char is unsigned" >&5
if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$GCC" = yes; then
# GCC predefines this symbol on systems where it applies.
cat > conftest.$ac_ext <<EOF
-#line 3259 "configure"
+#line 3364 "configure"
#include "confdefs.h"
#ifdef __CHAR_UNSIGNED__
yes
@@ -3277,7 +3382,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3281 "configure"
+#line 3386 "configure"
#include "confdefs.h"
/* volatile prevents gcc2 from optimizing the test away on sparcs. */
#if !defined(__STDC__) || __STDC__ != 1
@@ -3287,7 +3392,7 @@ main() {
volatile char c = 255; exit(c < 0);
}
EOF
-if { (eval echo configure:3291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_char_unsigned=yes
else
@@ -3312,7 +3417,7 @@ fi
echo $ac_n "checking whether right shift preserve sign bit""... $ac_c" 1>&6
-echo "configure:3316: checking whether right shift preserve sign bit" >&5
+echo "configure:3421: checking whether right shift preserve sign bit" >&5
if eval "test \"`echo '$''{'rb_cv_rshift_sign'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3320,7 +3425,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3324 "configure"
+#line 3429 "configure"
#include "confdefs.h"
int
@@ -3332,7 +3437,7 @@ main()
}
EOF
-if { (eval echo configure:3336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
rb_cv_rshift_sign=yes
else
@@ -3360,19 +3465,19 @@ EOF
fi
echo $ac_n "checking count field in FILE structures""... $ac_c" 1>&6
-echo "configure:3364: checking count field in FILE structures" >&5
+echo "configure:3469: checking count field in FILE structures" >&5
if eval "test \"`echo '$''{'rb_cv_fcnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3369 "configure"
+#line 3474 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_cnt = 0;
; return 0; }
EOF
-if { (eval echo configure:3376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="_cnt"
else
@@ -3382,14 +3487,14 @@ fi
rm -f conftest*
if test "$rb_cv_fcnt" = ""; then
cat > conftest.$ac_ext <<EOF
-#line 3386 "configure"
+#line 3491 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->__cnt = 0;
; return 0; }
EOF
-if { (eval echo configure:3393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="__cnt"
else
@@ -3400,14 +3505,14 @@ rm -f conftest*
fi
if test "$rb_cv_fcnt" = ""; then
cat > conftest.$ac_ext <<EOF
-#line 3404 "configure"
+#line 3509 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_r = 0;
; return 0; }
EOF
-if { (eval echo configure:3411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="_r"
else
@@ -3418,14 +3523,14 @@ rm -f conftest*
fi
if test "$rb_cv_fcnt" = ""; then
cat > conftest.$ac_ext <<EOF
-#line 3422 "configure"
+#line 3527 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->readCount = 0;
; return 0; }
EOF
-if { (eval echo configure:3429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_fcnt="readCount"
else
@@ -3464,15 +3569,15 @@ fi
case "$host_os" in
linux*)
echo $ac_n "checking whether ELF binaries are produced""... $ac_c" 1>&6
-echo "configure:3468: checking whether ELF binaries are produced" >&5
- if eval "test \"`echo '$''{'rb_cv_linux_elf'+set}'`\" = set"; then
+echo "configure:3573: checking whether ELF binaries are produced" >&5
+ if eval "test \"`echo '$''{'rb_cv_binary_elf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 3476 "configure"
+#line 3581 "configure"
#include "confdefs.h"
/* Test for whether ELF binaries are produced */
@@ -3492,24 +3597,24 @@ main() {
}
EOF
-if { (eval echo configure:3496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
- rb_cv_linux_elf=yes
+ rb_cv_binary_elf=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
- rb_cv_linux_elf=no
+ rb_cv_binary_elf=no
fi
rm -fr conftest*
fi
fi
- echo "$ac_t""$rb_cv_linux_elf" 1>&6
- if test "$rb_cv_linux_elf" = no; then
+ echo "$ac_t""$rb_cv_binary_elf" 1>&6
+ if test "$rb_cv_binary_elf" = no; then
with_dln_a_out=yes
- host_os=linux-a.out
+ host_os=${host_os}-a_out
else
LDFLAGS="-rdynamic"
fi;;
@@ -3522,7 +3627,7 @@ STATIC=
if test "$with_dln_a_out" != yes; then
rb_cv_dlopen=unknown
echo $ac_n "checking whether OS depend dynamic link works""... $ac_c" 1>&6
-echo "configure:3526: checking whether OS depend dynamic link works" >&5
+echo "configure:3631: checking whether OS depend dynamic link works" >&5
if test "$GCC" = yes; then
case "$host_os" in
nextstep*) ;;
@@ -3559,10 +3664,8 @@ echo "configure:3526: checking whether OS depend dynamic link works" >&5
rb_cv_dlopen=yes ;;
linux*) LDSHARED="gcc -shared"
rb_cv_dlopen=yes ;;
- freebsd3*) LDSHARED="ld -Bshareable"
- LDFLAGS="-rdynamic"
- rb_cv_dlopen=yes ;;
- freebsd*) LDSHARED="ld -Bshareable"
+ freebsd*) LDSHARED="gcc -shared"
+ test -x /usr/bin/objformat && LDFLAGS="-rdynamic"
rb_cv_dlopen=yes ;;
netbsd*) LDSHARED="ld -Bshareable"
rb_cv_dlopen=yes ;;
@@ -3606,13 +3709,13 @@ dln_a_out_works=no
if test "$ac_cv_header_a_out_h" = yes; then
if test "$with_dln_a_out" = yes || test "$rb_cv_dlopen" = unknown; then
echo $ac_n "checking whether matz's dln works""... $ac_c" 1>&6
-echo "configure:3610: checking whether matz's dln works" >&5
+echo "configure:3713: checking whether matz's dln works" >&5
cat confdefs.h > config.h
if eval "test \"`echo '$''{'rb_cv_dln_a_out'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3616 "configure"
+#line 3719 "configure"
#include "confdefs.h"
#define USE_DLN_A_OUT
@@ -3622,7 +3725,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:3626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
rb_cv_dln_a_out=yes
else
@@ -3724,7 +3827,7 @@ fi
case "$host_os" in
human*)
echo $ac_n "checking for _harderr in -lsignal""... $ac_c" 1>&6
-echo "configure:3728: checking for _harderr in -lsignal" >&5
+echo "configure:3831: checking for _harderr in -lsignal" >&5
ac_lib_var=`echo signal'_'_harderr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3732,7 +3835,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsignal $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3736 "configure"
+#line 3839 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3743,7 +3846,7 @@ int main() {
_harderr()
; return 0; }
EOF
-if { (eval echo configure:3747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3771,7 +3874,7 @@ else
fi
echo $ac_n "checking for hmemset in -lhmem""... $ac_c" 1>&6
-echo "configure:3775: checking for hmemset in -lhmem" >&5
+echo "configure:3878: checking for hmemset in -lhmem" >&5
ac_lib_var=`echo hmem'_'hmemset | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3779,7 +3882,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lhmem $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3783 "configure"
+#line 3886 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3790,7 +3893,7 @@ int main() {
hmemset()
; return 0; }
EOF
-if { (eval echo configure:3794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3820,12 +3923,12 @@ fi
for ac_func in select
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3824: checking for $ac_func" >&5
+echo "configure:3927: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3829 "configure"
+#line 3932 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3848,7 +3951,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3873,7 +3976,7 @@ fi
done
echo $ac_n "checking whether PD libc _dtos18 fail to convert big number""... $ac_c" 1>&6
-echo "configure:3877: checking whether PD libc _dtos18 fail to convert big number" >&5
+echo "configure:3980: checking whether PD libc _dtos18 fail to convert big number" >&5
if eval "test \"`echo '$''{'rb_cv_missing__dtos18'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3881,7 +3984,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3885 "configure"
+#line 3988 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3893,7 +3996,7 @@ main ()
}
EOF
-if { (eval echo configure:3897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
rb_cv_missing__dtos18=yes
else
@@ -3915,7 +4018,7 @@ EOF
fi
echo $ac_n "checking whether PD libc fconvert fail to round""... $ac_c" 1>&6
-echo "configure:3919: checking whether PD libc fconvert fail to round" >&5
+echo "configure:4022: checking whether PD libc fconvert fail to round" >&5
if eval "test \"`echo '$''{'rb_cv_missing_fconvert'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3923,7 +4026,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3927 "configure"
+#line 4030 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3936,7 +4039,7 @@ main ()
}
EOF
-if { (eval echo configure:3940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
rb_cv_missing_fconvert=yes
else
@@ -3985,12 +4088,13 @@ if test "$fat_binary" = yes ; then
CFLAGS="$CFLAGS $ARCH_FLAG"
fi
-LIBRUBY='libruby.a'
-LIBRUBYARG='libruby.a'
+LIBRUBY_A='libruby.a'
+LIBRUBY='$(LIBRUBY_A)'
+LIBRUBYARG='$(LIBRUBY_A)'
SOLIBS=
if test "$host_os" = "beos"; then
CFLAGS="$CFLAGS -relax_pointers"
- LIBRUBY='libruby.so'
+ LIBRUBY='$(LIBRUBY_SO)'
LIBRUBYARG='-lruby'
SOLIBS='-lnet'
echo creating ruby.def
@@ -4005,9 +4109,25 @@ if test "$host_os" = "beos"; then
esac
fi
+
+
+LIBRUBY_SO='libruby.so.$(MAJOR).$(MINOR).$(TEENY)'
+LIBRUBY_ALIASES='libruby.so'
if test "$enable_shared" = 'yes'; then
- LIBRUBY='libruby.so'
+ LIBRUBY='$(LIBRUBY_SO)'
LIBRUBYARG='-L./ -lruby'
+ CFLAGS="$CFLAGS $CCDLFLAGS"
+ case "$host_os" in
+ freebsd2*|sunos4*)
+ LIBRUBY_ALIASES='libruby.so.$(MAJOR).$(MINOR) libruby.so'
+ ;;
+ hpux*)
+ LIBRUBY_SO='libruby.sl.$(MAJOR).$(MINOR).$(TEENY)'
+ LIBRUBY_ALIASES='libruby.sl.$(MAJOR).$(MINOR) libruby.sl'
+ ;;
+ *)
+ ;;
+ esac
fi
case "$host_os" in
@@ -4029,6 +4149,9 @@ esac
+
+
+
ri_prefix=
test "$program_prefix" != NONE &&
ri_prefix=$program_prefix
@@ -4236,6 +4359,9 @@ s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
+s%@MAJOR@%$MAJOR%g
+s%@MINOR@%$MINOR%g
+s%@TEENY@%$TEENY%g
s%@host@%$host%g
s%@host_alias@%$host_alias%g
s%@host_cpu@%$host_cpu%g
@@ -4249,6 +4375,7 @@ s%@AR@%$AR%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@LN_S@%$LN_S%g
s%@SET_MAKE@%$SET_MAKE%g
s%@LIBOBJS@%$LIBOBJS%g
s%@ALLOCA@%$ALLOCA%g
@@ -4261,6 +4388,10 @@ s%@STRIP@%$STRIP%g
s%@EXTSTATIC@%$EXTSTATIC%g
s%@binsuffix@%$binsuffix%g
s%@setup@%$setup%g
+s%@LIBSUFFIX@%$LIBSUFFIX%g
+s%@LIBRUBY_A@%$LIBRUBY_A%g
+s%@LIBRUBY_SO@%$LIBRUBY_SO%g
+s%@LIBRUBY_ALIASES@%$LIBRUBY_ALIASES%g
s%@LIBRUBY@%$LIBRUBY%g
s%@LIBRUBYARG@%$LIBRUBYARG%g
s%@SOLIBS@%$SOLIBS%g
diff --git a/configure.in b/configure.in
index 0477ade03e..8b9708becb 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,12 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(ruby.h)
+MAJOR=1
+MINOR=3
+TEENY=1
+AC_SUBST(MAJOR)
+AC_SUBST(MINOR)
+AC_SUBST(TEENY)
dnl checks for alternative programs
AC_ARG_WITH(gcc, [--without-gcc never use gcc], [
case $withval in
@@ -85,6 +91,7 @@ AC_PROG_RANLIB
AC_SUBST(AR)
AC_CHECK_PROGS(AR, ar aal, ar)
AC_PROG_INSTALL
+AC_PROG_LN_S
AC_PROG_MAKE_SET
# checks for UNIX variants that set C preprocessor variables
@@ -93,6 +100,8 @@ AC_MINIX
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(void*)
+AC_CHECK_SIZEOF(float)
+AC_CHECK_SIZEOF(double)
AC_MSG_CHECKING(for prototypes)
AC_CACHE_VAL(rb_cv_have_prototypes,
@@ -297,7 +306,7 @@ AC_ARG_WITH(dln-a-out, [--with-dln-a-out use dln_a_out if possible], [
case "$host_os" in
linux*)
AC_MSG_CHECKING(whether ELF binaries are produced)
- AC_CACHE_VAL(rb_cv_linux_elf,
+ AC_CACHE_VAL(rb_cv_binary_elf,
[AC_TRY_RUN([
/* Test for whether ELF binaries are produced */
#include <fcntl.h>
@@ -315,13 +324,13 @@ main() {
exit(0); /* succeed (yes, it's ELF) */
}
],
- rb_cv_linux_elf=yes,
- rb_cv_linux_elf=no,
+ rb_cv_binary_elf=yes,
+ rb_cv_binary_elf=no,
[:])])
- AC_MSG_RESULT($rb_cv_linux_elf)
- if test "$rb_cv_linux_elf" = no; then
+ AC_MSG_RESULT($rb_cv_binary_elf)
+ if test "$rb_cv_binary_elf" = no; then
with_dln_a_out=yes
- host_os=linux-a.out
+ host_os=${host_os}-a_out
else
LDFLAGS="-rdynamic"
fi;;
@@ -375,10 +384,8 @@ if test "$with_dln_a_out" != yes; then
rb_cv_dlopen=yes ;;
linux*) LDSHARED="gcc -shared"
rb_cv_dlopen=yes ;;
- freebsd3*) LDSHARED="ld -Bshareable"
- LDFLAGS="-rdynamic"
- rb_cv_dlopen=yes ;;
- freebsd*) LDSHARED="ld -Bshareable"
+ freebsd*) LDSHARED="gcc -shared"
+ test -x /usr/bin/objformat && LDFLAGS="-rdynamic"
rb_cv_dlopen=yes ;;
netbsd*) LDSHARED="ld -Bshareable"
rb_cv_dlopen=yes ;;
@@ -565,12 +572,13 @@ if test "$fat_binary" = yes ; then
CFLAGS="$CFLAGS $ARCH_FLAG"
fi
-LIBRUBY='libruby.a'
-LIBRUBYARG='libruby.a'
+LIBRUBY_A='libruby.a'
+LIBRUBY='$(LIBRUBY_A)'
+LIBRUBYARG='$(LIBRUBY_A)'
SOLIBS=
if test "$host_os" = "beos"; then
CFLAGS="$CFLAGS -relax_pointers"
- LIBRUBY='libruby.so'
+ LIBRUBY='$(LIBRUBY_SO)'
LIBRUBYARG='-lruby'
SOLIBS='-lnet'
echo creating ruby.def
@@ -585,9 +593,25 @@ if test "$host_os" = "beos"; then
esac
fi
+AC_SUBST(LIBSUFFIX)
+
+LIBRUBY_SO='libruby.so.$(MAJOR).$(MINOR).$(TEENY)'
+LIBRUBY_ALIASES='libruby.so'
if test "$enable_shared" = 'yes'; then
- LIBRUBY='libruby.so'
+ LIBRUBY='$(LIBRUBY_SO)'
LIBRUBYARG='-L./ -lruby'
+ CFLAGS="$CFLAGS $CCDLFLAGS"
+ case "$host_os" in
+ freebsd2*|sunos4*)
+ LIBRUBY_ALIASES='libruby.so.$(MAJOR).$(MINOR) libruby.so'
+ ;;
+ hpux*)
+ LIBRUBY_SO='libruby.sl.$(MAJOR).$(MINOR).$(TEENY)'
+ LIBRUBY_ALIASES='libruby.sl.$(MAJOR).$(MINOR) libruby.sl'
+ ;;
+ *)
+ ;;
+ esac
fi
case "$host_os" in
@@ -605,6 +629,9 @@ case "$host_os" in
esac
+AC_SUBST(LIBRUBY_A)
+AC_SUBST(LIBRUBY_SO)
+AC_SUBST(LIBRUBY_ALIASES)
AC_SUBST(LIBRUBY)
AC_SUBST(LIBRUBYARG)
AC_SUBST(SOLIBS)
diff --git a/defines.h b/defines.h
index fb10d628b4..d9b744b71f 100644
--- a/defines.h
+++ b/defines.h
@@ -31,7 +31,7 @@
#endif /* NeXT */
#ifdef NT
-#include "missing/nt.h"
+#include "win32/win32.h"
#endif
#ifndef EXTERN
@@ -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_PATH_SEP ";"
#else
#define RUBY_PATH_SEP ":"
diff --git a/dir.c b/dir.c
index 51d7f9e344..c77294cd3b 100644
--- a/dir.c
+++ b/dir.c
@@ -6,7 +6,7 @@
$Date$
created at: Wed Jan 5 09:51:01 JST 1994
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
diff --git a/dln.c b/dln.c
index 858291d5b7..63b608815b 100644
--- a/dln.c
+++ b/dln.c
@@ -6,7 +6,7 @@
$Date$
created at: Tue Jan 18 17:05:06 JST 1994
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
@@ -64,6 +64,7 @@ char *getenv();
# include <TextUtils.h>
# include <CodeFragments.h>
# include <Aliases.h>
+# include "macruby_private.h"
#endif
#ifdef __BEOS__
@@ -1522,8 +1523,13 @@ dln_find_file(fname, path)
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__)
@@ -1561,14 +1567,17 @@ dln_find_1(fname, path, exe_flag)
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;
@@ -1580,7 +1589,6 @@ dln_find_1(fname, path, exe_flag)
return fname;
if (exe_flag && strchr(fname, '\\')) return fname;
#endif
-#endif /* __MACOS__ */
for (dp = path;; dp = ++ep) {
register int l;
@@ -1632,11 +1640,7 @@ dln_find_1(fname, path, exe_flag)
/* add a "/" between directory and filename */
if (ep[-1] != '/')
-#ifdef __MACOS__
- *bp++ = ':';
-#else
*bp++ = '/';
-#endif
}
/* now append the file name */
@@ -1651,11 +1655,19 @@ dln_find_1(fname, path, exe_flag)
}
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[] = {
@@ -1679,8 +1691,13 @@ dln_find_1(fname, path, exe_flag)
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__ */
diff --git a/enum.c b/enum.c
index 2b4b904018..72353ff8a6 100644
--- a/enum.c
+++ b/enum.c
@@ -6,7 +6,7 @@
$Date$
created at: Fri Oct 1 15:15:19 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
diff --git a/error.c b/error.c
index 44ca067472..55397a4587 100644
--- a/error.c
+++ b/error.c
@@ -6,7 +6,7 @@
$Date$
created at: Mon Aug 9 16:11:34 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
@@ -283,7 +283,7 @@ exc_initialize(argc, argv, exc)
}
static VALUE
-exc_new(argc, argv, self)
+exc_exception(argc, argv, self)
int argc;
VALUE *argv;
VALUE self;
@@ -412,12 +412,12 @@ exception(argc, argv)
#ifdef __BEOS__
typedef struct {
VALUE *list;
- size_t n;
+ int n;
} syserr_list_entry;
typedef struct {
int ix;
- size_t n;
+ int n;
} syserr_index_entry;
static VALUE syserr_list_b_general[16+1];
@@ -533,7 +533,8 @@ void
Init_Exception()
{
rb_eException = rb_define_class("Exception", rb_cObject);
- rb_define_method(rb_eException, "new", exc_new, -1);
+ rb_define_singleton_method(rb_eException, "exception", rb_class_new_instance, -1);
+ rb_define_method(rb_eException, "exception", exc_exception, -1);
rb_define_method(rb_eException, "initialize", exc_initialize, -1);
rb_define_method(rb_eException, "to_s", exc_to_s, 0);
rb_define_method(rb_eException, "to_str", exc_to_s, 0);
diff --git a/eval.c b/eval.c
index a7da313fbe..541a6286f1 100644
--- a/eval.c
+++ b/eval.c
@@ -6,7 +6,7 @@
$Date$
created at: Thu Jun 10 14:22:17 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
@@ -38,6 +38,10 @@ char *strrchr _((char*,char));
#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_init()
ruby_frame->self = ruby_top_self;
ruby_frame->cbase = (VALUE)rb_node_newnode(NODE_CREF,rb_cObject,0,0);
rb_define_global_const("TOPLEVEL_BINDING", rb_f_binding(ruby_top_self));
+#ifdef __MACOS__
+ _macruby_init();
+#endif
ruby_prog_init();
}
POP_TAG();
@@ -3028,32 +3035,34 @@ rb_f_raise(argc, argv)
int argc;
VALUE *argv;
{
- VALUE arg1, arg2, arg3;
VALUE mesg;
int n;
mesg = Qnil;
- switch (n = rb_scan_args(argc, argv, "03", &arg1, &arg2, &arg3)) {
+ switch (argc) {
+ case 0:
+ mesg = Qnil;
+ break;
case 1:
- mesg = arg1;
+ if (NIL_P(argv[0])) break;
+ if (TYPE(argv[0]) == T_STRING) {
+ mesg = rb_exc_new3(rb_eRuntimeError, argv[0]);
+ break;
+ }
+ mesg = rb_funcall(argv[0], rb_intern("exception"), 0, 0);
break;
case 3:
case 2:
- mesg = arg2;
+ mesg = rb_funcall(argv[0], rb_intern("exception"), 1, argv[1]);
+ break;
+ default:
+ rb_raise(rb_eArgError, "wrong # of arguments");
break;
}
-
if (!NIL_P(mesg)) {
- if (n == 1 && TYPE(mesg) == T_STRING) {
- mesg = rb_exc_new3(rb_eRuntimeError, mesg);
- }
- else {
- mesg = rb_funcall(arg1, rb_intern("new"), 1, mesg);
- }
- if (!rb_obj_is_kind_of(mesg, rb_eException)) {
+ if (!rb_obj_is_kind_of(mesg, rb_eException))
rb_raise(rb_eTypeError, "exception object expected");
- }
- set_backtrace(mesg, arg3);
+ set_backtrace(mesg, (argc>2)?argv[2]:Qnil);
}
PUSH_FRAME(); /* fake frame */
@@ -3675,13 +3684,14 @@ rb_call0(klass, recv, id, argc, argv, body, nosuper)
break;
}
+#if 0
if ((++tick & 0x3ff) == 0) {
CHECK_INTS; /* better than nothing */
if (stack_length() > STACK_LEVEL_MAX) {
rb_raise(rb_eSysStackError, "stack level too deep");
}
}
-
+#endif
PUSH_ITER(itr);
PUSH_FRAME();
@@ -4394,6 +4404,16 @@ is_absolute_path(path)
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;
@@ -4402,6 +4422,16 @@ find_file(file)
volatile VALUE vpath;
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");
@@ -4447,11 +4477,9 @@ rb_load(fname, wrap)
else {
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", RSTRING(fname)->ptr);
@@ -4609,7 +4637,7 @@ rb_f_require(obj, fname)
if (strcmp(".rb", ext) == 0) {
feature = file = RSTRING(fname)->ptr;
file = find_file(file);
- if (file) goto rb_load;
+ if (file) goto load_rb;
}
else if (strcmp(".so", ext) == 0 || strcmp(".o", ext) == 0) {
file = feature = RSTRING(fname)->ptr;
@@ -4621,12 +4649,12 @@ rb_f_require(obj, fname)
file = feature = buf;
}
file = find_file(file);
- if (file) goto dyna_load;
+ if (file) goto load_dyna;
}
else if (strcmp(DLEXT, ext) == 0) {
feature = RSTRING(fname)->ptr;
file = find_file(feature);
- if (file) goto dyna_load;
+ if (file) goto load_dyna;
}
}
buf = ALLOCA_N(char, strlen(RSTRING(fname)->ptr) + 5);
@@ -4636,19 +4664,19 @@ rb_f_require(obj, fname)
if (file) {
fname = rb_str_new2(file);
feature = buf;
- goto rb_load;
+ goto load_rb;
}
strcpy(buf, RSTRING(fname)->ptr);
strcat(buf, DLEXT);
file = find_file(buf);
if (file) {
feature = buf;
- goto dyna_load;
+ goto load_dyna;
}
rb_raise(rb_eLoadError, "No such file to load -- %s",
RSTRING(fname)->ptr);
- dyna_load:
+ load_dyna:
#ifdef USE_THREAD
if (rb_thread_loading(feature)) return Qfalse;
else {
@@ -4669,7 +4697,7 @@ rb_f_require(obj, fname)
#endif
return Qtrue;
- rb_load:
+ load_rb:
#ifdef USE_THREAD
if (rb_thread_loading(feature)) return Qfalse;
else {
diff --git a/ext/Win32API/Win32API.c b/ext/Win32API/Win32API.c
index f4cb5c726f..d7aa0a6149 100644
--- a/ext/Win32API/Win32API.c
+++ b/ext/Win32API/Win32API.c
@@ -54,35 +54,35 @@ Win32API_initialize(self, dllname, proc, import, export)
if (!hdll) {
hdll = LoadLibrary(RSTRING(dllname)->ptr);
if (!hdll)
- Fail("LoadLibrary: %s\n", RSTRING(dllname)->ptr);
+ rb_raise(rb_eRuntimeError, "LoadLibrary: %s\n", RSTRING(dllname)->ptr);
Data_Wrap_Struct(self, 0, Win32API_FreeLibrary, hdll);
}
hproc = GetProcAddress(hdll, RSTRING(proc)->ptr);
if (!hproc) {
- str = str_new3(proc);
- str = str_cat(str, "A", 1);
+ str = rb_str_new3(proc);
+ str = rb_str_cat(str, "A", 1);
hproc = GetProcAddress(hdll, RSTRING(str)->ptr);
if (!hproc)
- Fail("GetProcAddress: %s or %s\n",
+ rb_raise(rb_eRuntimeError, "GetProcAddress: %s or %s\n",
RSTRING(proc)->ptr, RSTRING(str)->ptr);
}
rb_iv_set(self, "__dll__", INT2NUM((int)hdll));
rb_iv_set(self, "__dllname__", dllname);
rb_iv_set(self, "__proc__", INT2NUM((int)hproc));
- a_import = ary_new();
+ a_import = rb_ary_new();
ptr = RARRAY(import)->ptr;
for (i = 0, len = RARRAY(import)->len; i < len; i++) {
int c = *(char *)RSTRING(ptr[i])->ptr;
switch (c) {
case 'N': case 'n': case 'L': case 'l':
- ary_push(a_import, INT2FIX(_T_NUMBER));
+ rb_ary_push(a_import, INT2FIX(_T_NUMBER));
break;
case 'P': case 'p':
- ary_push(a_import, INT2FIX(_T_POINTER));
+ rb_ary_push(a_import, INT2FIX(_T_POINTER));
break;
case 'I': case 'i':
- ary_push(a_import, INT2FIX(_T_INTEGER));
+ rb_ary_push(a_import, INT2FIX(_T_INTEGER));
break;
}
}
@@ -146,18 +146,18 @@ Win32API_Call(argc, argv, obj)
texport = FIX2INT(obj_export);
if (items != nimport)
- Fail("Wrong number of parameters: expected %d, got %d.\n",
+ rb_raise(rb_eRuntimeError, "Wrong number of parameters: expected %d, got %d.\n",
nimport, items);
if (0 < nimport) {
for (i = nimport - 1; 0 <= i; i--) {
VALUE str;
- import_type = ary_entry(obj_import, i);
+ import_type = rb_ary_entry(obj_import, i);
timport = FIX2INT(import_type);
switch (timport) {
case _T_NUMBER:
case _T_INTEGER:
- lParam = NUM2INT(ary_entry(args, i));
+ lParam = NUM2INT(rb_ary_entry(args, i));
#if defined(_MSC_VER) || defined(__LCC__)
_asm {
mov eax, lParam
@@ -170,9 +170,9 @@ Win32API_Call(argc, argv, obj)
#endif
break;
case _T_POINTER:
- str = ary_entry(args, i);
+ str = rb_ary_entry(args, i);
Check_Type(str, T_STRING);
- str_modify(str);
+ rb_str_modify(str);
pParam = RSTRING(str)->ptr;
#if defined(_MSC_VER) || defined(__LCC__)
_asm {
@@ -197,7 +197,7 @@ Win32API_Call(argc, argv, obj)
break;
case _T_POINTER:
ApiFunctionPointer = (ApiPointer *) ApiFunction;
- Return = str_new2((char *)ApiFunctionPointer());
+ Return = rb_str_new2((char *)ApiFunctionPointer());
break;
case _T_INTEGER:
ApiFunctionInteger = (ApiInteger *) ApiFunction;
@@ -216,7 +216,7 @@ Win32API_Call(argc, argv, obj)
void
Init_Win32API()
{
- VALUE cWin32API = rb_define_class("Win32API", cObject);
+ VALUE cWin32API = rb_define_class("Win32API", rb_cObject);
rb_define_method(cWin32API, "initialize", Win32API_initialize, 4);
rb_define_method(cWin32API, "call", Win32API_Call, -1);
rb_define_alias(cWin32API, "Call", "call");
diff --git a/ext/etc/MANIFEST b/ext/etc/MANIFEST
index a0f521b386..79fb1ff34c 100644
--- a/ext/etc/MANIFEST
+++ b/ext/etc/MANIFEST
@@ -1,5 +1,6 @@
MANIFEST
etc.c
-etc.doc
+etc.txt
+etc.txt.jp
depend
extconf.rb
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index 058c144f94..d729fd8467 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -288,7 +288,7 @@ CC = @CC@
prefix = @prefix@
CFLAGS = %s -I#{$topdir} -I#{$top_srcdir} -I@includedir@ #{CFLAGS} #$CFLAGS %s
-DLDFLAGS = #$DLDFLAGS @LDFLAGS@ #$LDFLAGS
+DLDFLAGS = #$DLDFLAGS #$LDFLAGS
LDSHARED = @LDSHARED@
", if $static then "" else "@CCDLFLAGS@" end, $defs.join(" ")
diff --git a/ext/md5/MANIFEST b/ext/md5/MANIFEST
index e4f0004b4a..8057ebb06c 100644
--- a/ext/md5/MANIFEST
+++ b/ext/md5/MANIFEST
@@ -1,6 +1,7 @@
MANIFEST
depend
-md5.doc
+md5.txt
+md5.txt.jp
md5.h
md5c.c
md5init.c
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb
index e32723be96..bd896639fc 100644
--- a/ext/tk/lib/tk.rb
+++ b/ext/tk/lib/tk.rb
@@ -2412,6 +2412,9 @@ class TkMenubutton<TkLabel
end
module TkComposite
+ include Tk
+ extend Tk
+
def initialize(parent=nil, *args)
@frame = TkFrame.new(parent)
@path = @epath = @frame.path
diff --git a/ext/tk/lib/tkscrollbox.rb b/ext/tk/lib/tkscrollbox.rb
index 8d129b2f4b..be7799240e 100644
--- a/ext/tk/lib/tkscrollbox.rb
+++ b/ext/tk/lib/tkscrollbox.rb
@@ -8,7 +8,7 @@ require 'tk.rb'
class TkScrollbox<TkListbox
include TkComposite
- def initialize_composite
+ def initialize_composite(keys=nil)
list = TkListbox.new(@frame)
scroll = TkScrollbar.new(@frame)
@path = list.path
@@ -23,5 +23,7 @@ class TkScrollbox<TkListbox
delegate('background', list, scroll)
delegate('borderwidth', @frame)
delegate('relief', @frame)
+
+ configure keys if keys
end
end
diff --git a/file.c b/file.c
index 11a8dedf14..f636d4b244 100644
--- a/file.c
+++ b/file.c
@@ -6,7 +6,7 @@
$Date$
created at: Mon Nov 15 12:24:34 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
@@ -58,6 +58,7 @@ char *strrchr _((char*,char));
#include "macruby_missing.h"
extern int fileno(FILE *stream);
extern int utimes();
+ char* strdup(char*);
#endif
VALUE rb_cFile;
diff --git a/gc.c b/gc.c
index 31ed11196a..614b485835 100644
--- a/gc.c
+++ b/gc.c
@@ -6,7 +6,7 @@
$Date$
created at: Tue Oct 5 09:44:46 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
diff --git a/hash.c b/hash.c
index 9141406410..1dc62885d8 100644
--- a/hash.c
+++ b/hash.c
@@ -6,7 +6,7 @@
$Date$
created at: Mon Nov 22 18:51:18 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
@@ -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
@@ -841,7 +845,6 @@ rb_hash_update(hash1, hash2)
return hash1;
}
-#ifndef __MACOS__ /* no environment variables on MacOS. */
static int path_tainted = -1;
#ifndef NT
@@ -1363,8 +1366,6 @@ env_to_hash(obj)
return hash;
}
-#endif /* ifndef __MACOS__ no environment variables on MacOS. */
-
void
Init_Hash()
{
diff --git a/inits.c b/inits.c
index 3708edc03a..170912d443 100644
--- a/inits.c
+++ b/inits.c
@@ -6,7 +6,7 @@
$Date$
created at: Tue Dec 28 16:01:58 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
@@ -31,6 +31,7 @@ void Init_marshal _((void));
void Init_Numeric _((void));
void Init_Object _((void));
void Init_pack _((void));
+void Init_Precision _((void));
void Init_sym _((void));
void Init_process _((void));
void Init_Random _((void));
@@ -51,6 +52,7 @@ rb_call_inits()
Init_Object();
Init_Comparable();
Init_Enumerable();
+ Init_Precision();
Init_eval();
Init_String();
Init_Exception();
diff --git a/instruby.rb b/instruby.rb
index d489e0f838..1c2610a59a 100644
--- a/instruby.rb
+++ b/instruby.rb
@@ -29,11 +29,22 @@ for dll in Dir['*.dll']
File.install dll, "#{destdir}#{bindir}/#{dll}", 0755, true
end
File.makedirs "#{destdir}#{libdir}", true
-for lib in ["libruby.so", "libruby.so.LIB"]
+for lib in ["libruby.so.LIB", CONFIG["LIBRUBY_SO"]]
if File.exist? lib
File.install lib, "#{destdir}#{libdir}", 0644, true
end
end
+pwd = Dir.pwd
+Dir.chdir libdir
+if File.exist? CONFIG["LIBRUBY_SO"]
+ for alias in [CONFIG["LIBRUBY_SO"]]
+ if File.exist? alias
+ File.delete alias
+ end
+ File.symlink CONFIG["LIBRUBY_SO"], alias
+ print "link #{CONFIG['LIBRUBY_SO']} -> #{alias}\n"
+end
+Dir.chdir pwd
File.makedirs "#{destdir}#{pkglibdir}", true
File.makedirs "#{destdir}#{archdir}", true
Dir.chdir "ext"
diff --git a/intern.h b/intern.h
index 8b88751469..0628477821 100644
--- a/intern.h
+++ b/intern.h
@@ -6,18 +6,18 @@
void rb_mem_clear _((register VALUE*, register size_t));
VALUE rb_assoc_new _((VALUE, VALUE));
VALUE rb_ary_new _((void));
-VALUE rb_ary_new2 _((size_t));
-VALUE rb_ary_new3 __((size_t,...));
-VALUE rb_ary_new4 _((size_t, VALUE *));
+VALUE rb_ary_new2 _((int));
+VALUE rb_ary_new3 __((int,...));
+VALUE rb_ary_new4 _((int, VALUE *));
VALUE rb_ary_freeze _((VALUE));
VALUE rb_ary_aref _((int, VALUE*, VALUE));
-void rb_ary_store _((VALUE, size_t, VALUE));
+void rb_ary_store _((VALUE, int, VALUE));
VALUE rb_ary_to_s _((VALUE));
VALUE rb_ary_push _((VALUE, VALUE));
VALUE rb_ary_pop _((VALUE));
VALUE rb_ary_shift _((VALUE));
VALUE rb_ary_unshift _((VALUE, VALUE));
-VALUE rb_ary_entry _((VALUE, size_t));
+VALUE rb_ary_entry _((VALUE, int));
VALUE rb_ary_each _((VALUE));
VALUE rb_ary_join _((VALUE, VALUE));
VALUE rb_ary_print_on _((VALUE, VALUE));
@@ -230,7 +230,7 @@ VALUE rb_reg_last_match _((VALUE));
VALUE rb_reg_match_pre _((VALUE));
VALUE rb_reg_match_post _((VALUE));
VALUE rb_reg_match_last _((VALUE));
-VALUE rb_reg_new _((char*, size_t, int));
+VALUE rb_reg_new _((char*, int, int));
VALUE rb_reg_match _((VALUE, VALUE));
VALUE rb_reg_match2 _((VALUE));
int rb_reg_options _((VALUE));
@@ -238,6 +238,7 @@ char*rb_get_kcode _((void));
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));
@@ -257,23 +258,23 @@ void rb_trap_exec _((void));
/* sprintf.c */
VALUE rb_f_sprintf _((int, VALUE*));
/* string.c */
-VALUE rb_str_new _((char*, size_t));
+VALUE rb_str_new _((char*, int));
VALUE rb_str_new2 _((char*));
VALUE rb_str_new3 _((VALUE));
VALUE rb_str_new4 _((VALUE));
-VALUE rb_tainted_str_new _((char*, size_t));
+VALUE rb_tainted_str_new _((char*, int));
VALUE rb_tainted_str_new2 _((char*));
VALUE rb_obj_as_string _((VALUE));
VALUE rb_str_to_str _((VALUE));
VALUE rb_str_dup _((VALUE));
VALUE rb_str_plus _((VALUE, VALUE));
VALUE rb_str_times _((VALUE, VALUE));
-VALUE rb_str_substr _((VALUE, size_t, size_t));
+VALUE rb_str_substr _((VALUE, int, int));
void rb_str_modify _((VALUE));
VALUE rb_str_freeze _((VALUE));
VALUE rb_str_dup_frozen _((VALUE));
-VALUE rb_str_resize _((VALUE, size_t));
-VALUE rb_str_cat _((VALUE, char*, size_t));
+VALUE rb_str_resize _((VALUE, int));
+VALUE rb_str_cat _((VALUE, char*, int));
VALUE rb_str_concat _((VALUE, VALUE));
int rb_str_hash _((VALUE));
int rb_str_cmp _((VALUE, VALUE));
diff --git a/io.c b/io.c
index 5573e76a64..d43286d085 100644
--- a/io.c
+++ b/io.c
@@ -6,7 +6,7 @@
$Date$
created at: Fri Oct 15 18:08:59 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
@@ -54,6 +54,7 @@ struct timeval {
#include <sys/errno.h>
#include <unix.mac.h>
#include <compat.h>
+ extern char* strdup(const char*);
#endif
extern void Init_File _((void));
@@ -99,7 +100,7 @@ static VALUE lineno;
#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();
@@ -1014,9 +1015,9 @@ rb_io_binmode(io)
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
@@ -2550,7 +2551,7 @@ arg_read(argc, argv)
VALUE *argv;
{
VALUE tmp, str;
- size_t len;
+ int len;
if (argc == 1) len = NUM2INT(argv[0]);
str = Qnil;
diff --git a/main.c b/main.c
index 5fd27cba4c..ff1437a719 100644
--- a/main.c
+++ b/main.c
@@ -18,6 +18,10 @@ unsigned int _stklen = 0x100000;
int _stacksize = 131072;
#endif
+#if defined(__MACOS__) && defined(__MWERKS__)
+#include <console.h>
+#endif
+
int
main(argc, argv, envp)
int argc;
@@ -26,6 +30,9 @@ main(argc, argv, envp)
#if defined(NT)
NtInitialize(&argc, &argv);
#endif
+#if defined(__MACOS__) && defined(__MWERKS__)
+ argc = ccommand(&argv);
+#endif
ruby_init();
ruby_options(argc, argv);
diff --git a/math.c b/math.c
index 3ea30bdbba..978a23c73c 100644
--- a/math.c
+++ b/math.c
@@ -6,7 +6,7 @@
$Date$
created at: Tue Jan 25 14:12:56 JST 1994
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
diff --git a/missing/vsnprintf.c b/missing/vsnprintf.c
index f0e9e8c672..22feac5f15 100644
--- a/missing/vsnprintf.c
+++ b/missing/vsnprintf.c
@@ -58,9 +58,6 @@
*/
#include <sys/types.h>
-#ifdef NT
-typedef unsigned int size_t;
-#endif
#define u_long unsigned long
#define u_short unsigned short
#define u_int unsigned int
@@ -104,6 +101,9 @@ typedef unsigned int size_t;
#define __const
#endif /* People who don't like const sys_error */
+#ifdef NT
+typedef long size_t;
+#endif
#ifndef NULL
#define NULL 0
@@ -179,32 +179,6 @@ typedef struct __sFILE {
#define EOF (-1)
-/*
- * The __sfoo macros are here so that we can
- * define function versions in the C library.
- */
-#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++))
-#if defined(__GNUC__) && defined(__STDC__)
-static __inline int __sputc(int _c, FILE *_p) {
- if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
- return (*_p->_p++ = _c);
- else
- return (__swbuf(_c, _p));
-}
-#else
-/*
- * This has been tuned to generate reasonable code on the vax using pcc.
- */
-#define __sputc(c, p) \
- (--(p)->_w < 0 ? \
- (p)->_w >= (p)->_lbfsize ? \
- (*(p)->_p = (c)), *(p)->_p != '\n' ? \
- (int)*(p)->_p++ : \
- __swbuf('\n', p) : \
- __swbuf((int)(c), p) : \
- (*(p)->_p = (c), (int)*(p)->_p++))
-#endif
-
#define __sfeof(p) (((p)->_flags & __SEOF) != 0)
#define __sferror(p) (((p)->_flags & __SERR) != 0)
#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF)))
@@ -218,11 +192,6 @@ static __inline int __sputc(int _c, FILE *_p) {
#define fileno(p) __sfileno(p)
#endif
-#ifndef lint
-#define getc(fp) __sgetc(fp)
-#define putc(x, fp) __sputc(x, fp)
-#endif /* lint */
-
#if defined(__hpux) && !defined(__GNUC__)
#include <string.h>
diff --git a/node.h b/node.h
index c1923fba75..a9b5c92e25 100644
--- a/node.h
+++ b/node.h
@@ -6,7 +6,7 @@
$Date$
created at: Fri May 28 15:14:02 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
diff --git a/numeric.c b/numeric.c
index e8ea6075a9..6bc2e4478e 100644
--- a/numeric.c
+++ b/numeric.c
@@ -6,7 +6,7 @@
$Date$
created at: Fri Aug 13 18:33:09 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
@@ -778,6 +778,27 @@ int_chr(num)
}
static VALUE
+rb_fix_induced_from(klass, x)
+ VALUE klass, x;
+{
+ return rb_funcall(x, rb_intern("to_i"), 0);
+}
+
+static VALUE
+rb_int_induced_from(klass, x)
+ VALUE klass, x;
+{
+ return rb_funcall(x, rb_intern("to_i"), 0);
+}
+
+static VALUE
+rb_flo_induced_from(klass, x)
+ VALUE klass, x;
+{
+ return rb_funcall(x, rb_intern("to_f"), 0);
+}
+
+static VALUE
fix_uminus(num)
VALUE num;
{
@@ -1380,11 +1401,15 @@ Init_Numeric()
rb_define_method(rb_cInteger, "downto", int_downto, 1);
rb_define_method(rb_cInteger, "step", int_step, 2);
rb_define_method(rb_cInteger, "times", int_dotimes, 0);
+ rb_include_module(rb_cInteger, rb_mPrecision);
rb_define_method(rb_cInteger, "succ", int_succ, 0);
rb_define_method(rb_cInteger, "next", int_succ, 0);
rb_define_method(rb_cInteger, "chr", int_chr, 0);
rb_cFixnum = rb_define_class("Fixnum", rb_cInteger);
+ rb_include_module(rb_cFixnum, rb_mPrecision);
+ rb_define_singleton_method(rb_cFixnum, "induced_from", rb_fix_induced_from, 1);
+ rb_define_singleton_method(rb_cInteger, "induced_from", rb_int_induced_from, 1);
rb_undef_method(CLASS_OF(rb_cFixnum), "new");
@@ -1437,6 +1462,9 @@ Init_Numeric()
rb_undef_method(CLASS_OF(rb_cFloat), "new");
+ rb_define_singleton_method(rb_cFloat, "induced_from", rb_flo_induced_from, 1);
+ rb_include_module(rb_cFloat, rb_mPrecision);
+
rb_define_method(rb_cFloat, "to_s", flo_to_s, 0);
rb_define_method(rb_cFloat, "coerce", flo_coerce, 1);
rb_define_method(rb_cFloat, "-@", flo_uminus, 0);
diff --git a/object.c b/object.c
index 15e757d054..ac361e0df6 100644
--- a/object.c
+++ b/object.c
@@ -6,7 +6,7 @@
$Date$
created at: Thu Jul 15 12:01:24 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
@@ -583,8 +583,6 @@ rb_module_s_new(klass)
return mod;
}
-VALUE rb_class_new_instance();
-
static VALUE
rb_class_s_new(argc, argv)
int argc;
diff --git a/pack.c b/pack.c
index dc393b83fe..d14f95afaf 100644
--- a/pack.c
+++ b/pack.c
@@ -6,7 +6,7 @@
$Date$
created at: Thu Feb 10 15:17:05 JST 1994
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
diff --git a/parse.c b/parse.c
index 8c3bcc545a..1dd5e70c46 100644
--- a/parse.c
+++ b/parse.c
@@ -4645,6 +4645,10 @@ normalize_newline(line)
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
diff --git a/parse.y b/parse.y
index a4142bbe20..71ca654305 100644
--- a/parse.y
+++ b/parse.y
@@ -6,7 +6,7 @@
$Date$
created at: Fri May 28 18:02:42 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
@@ -1745,6 +1745,10 @@ normalize_newline(line)
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
diff --git a/process.c b/process.c
index d3e6559ca3..3318e556c2 100644
--- a/process.c
+++ b/process.c
@@ -6,7 +6,7 @@
$Date$
created at: Tue Aug 10 14:30:50 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
@@ -138,7 +138,7 @@ rb_waitpid(pid, flags, st)
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 @@ static VALUE
rb_f_fork(obj)
VALUE obj;
{
-#if !defined(__human68k__)
+#if !defined(__human68k__) && !defined(__MACOS__)
int pid;
rb_secure(2);
@@ -670,7 +670,10 @@ rb_f_system(argc, argv)
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 @@ rb_f_system(argc, argv)
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 @@ Init_process()
#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 @@ Init_process()
#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);
diff --git a/random.c b/random.c
index 7b57d472cd..137b34d579 100644
--- a/random.c
+++ b/random.c
@@ -6,7 +6,7 @@
$Date$
created at: Fri Dec 24 16:39:21 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
diff --git a/range.c b/range.c
index 9fc363e2a8..e3d44a4fba 100644
--- a/range.c
+++ b/range.c
@@ -6,7 +6,7 @@
$Date$
created at: Thu Aug 19 17:46:47 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
diff --git a/re.c b/re.c
index 287c6c1bd4..35663bd71a 100644
--- a/re.c
+++ b/re.c
@@ -5,7 +5,7 @@
$Author$
created at: Mon Aug 9 18:24:49 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
@@ -330,7 +330,7 @@ rb_reg_kcode_method(re)
static Regexp*
make_regexp(s, len, flag)
char *s;
- size_t len, flag;
+ int len, flag;
{
Regexp *rp;
char *err;
@@ -653,7 +653,7 @@ static VALUE
rb_reg_new_1(klass, s, len, options)
VALUE klass;
char *s;
- size_t len;
+ int len;
int options; /* CASEFOLD = 1 */
/* EXTENDED = 2 */
/* CODE_NONE = 4 */
@@ -711,7 +711,7 @@ rb_reg_new_1(klass, s, len, options)
VALUE
rb_reg_new(s, len, options)
char *s;
- size_t len;
+ int len;
int options;
{
return rb_reg_new_1(rb_cRegexp, s, len, options);
@@ -837,7 +837,7 @@ rb_reg_s_new(argc, argv, self)
}
else {
char *p;
- size_t len;
+ int len;
p = str2cstr(src, &len);
return rb_reg_new_1(self, p, len, flag);
diff --git a/re.h b/re.h
index 4d7220b5e6..dc4cd17354 100644
--- a/re.h
+++ b/re.h
@@ -6,7 +6,7 @@
$Date$
created at: Thu Sep 30 14:18:32 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
diff --git a/regex.c b/regex.c
index 924f32b836..4789349110 100644
--- a/regex.c
+++ b/regex.c
@@ -1022,7 +1022,7 @@ calculate_must_string(start, end)
char *
re_compile_pattern(pattern, size, bufp)
char *pattern;
- size_t size;
+ int size;
struct re_pattern_buffer *bufp;
{
register char *b = bufp->buffer;
@@ -1084,10 +1084,10 @@ re_compile_pattern(pattern, size, bufp)
Fourth, the value of regnum.
Fifth, the type of the paren. */
- size_t *stackb = RE_TALLOC(40, size_t);
- size_t *stackp = stackb;
- size_t *stacke = stackb + 40;
- size_t *stackt;
+ int *stackb = RE_TALLOC(40, int);
+ int *stackp = stackb;
+ int *stacke = stackb + 40;
+ int *stackt;
/* Counts ('s as they are encountered. Remembered for the matching ),
where it becomes the register number to put in the stop_memory
@@ -2754,7 +2754,7 @@ int
re_search(bufp, string, size, startpos, range, regs)
struct re_pattern_buffer *bufp;
char *string;
- size_t size, startpos, range;
+ int size, startpos, range;
struct re_registers *regs;
{
register char *fastmap = bufp->fastmap;
@@ -3145,7 +3145,7 @@ int
re_match(bufp, string_arg, size, pos, regs)
struct re_pattern_buffer *bufp;
char *string_arg;
- size_t size, pos;
+ int size, pos;
struct re_registers *regs;
{
register unsigned char *p = (unsigned char*)bufp->buffer;
diff --git a/regex.h b/regex.h
index f61b980648..ed3365c0ca 100644
--- a/regex.h
+++ b/regex.h
@@ -76,8 +76,8 @@ void re_mbcinit ();
struct re_pattern_buffer
{
char *buffer; /* Space holding the compiled pattern commands. */
- size_t allocated; /* Size of space that `buffer' points to. */
- size_t used; /* Length of portion of buffer actually occupied */
+ int allocated; /* Size of space that `buffer' points to. */
+ int used; /* Length of portion of buffer actually occupied */
char *fastmap; /* Pointer to fastmap, if any, or zero if none. */
/* re_search uses the fastmap, if there is one,
to skip over totally implausible characters. */
@@ -113,8 +113,8 @@ typedef struct re_pattern_buffer regex_t;
struct re_registers
{
- size_t allocated;
- size_t num_regs;
+ int allocated;
+ int num_regs;
int *beg;
int *end;
};
@@ -138,13 +138,13 @@ typedef struct
#ifdef __STDC__
-extern char *re_compile_pattern (char *, size_t, struct re_pattern_buffer *);
+extern char *re_compile_pattern (char *, int, struct re_pattern_buffer *);
void re_free_pattern (struct re_pattern_buffer *);
/* Is this really advertised? */
extern void re_compile_fastmap (struct re_pattern_buffer *);
-extern int re_search (struct re_pattern_buffer *, char*, size_t, size_t, size_t,
+extern int re_search (struct re_pattern_buffer *, char*, int, int, int,
struct re_registers *);
-extern int re_match (struct re_pattern_buffer *, char *, size_t, size_t,
+extern int re_match (struct re_pattern_buffer *, char *, int, int,
struct re_registers *);
extern void re_set_casetable (char *table);
extern void re_copy_registers (struct re_registers*, struct re_registers*);
diff --git a/ruby.c b/ruby.c
index 9bf28022e8..7ccfe6984d 100644
--- a/ruby.c
+++ b/ruby.c
@@ -6,7 +6,7 @@
$Date$
created at: Tue Aug 10 12:47:31 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
@@ -743,9 +743,6 @@ ruby_prog_init()
#if defined(_WIN32) || defined(DJGPP)
addpath(ruby_libpath());
#endif
-#ifdef __MACOS__
- setup_macruby_libpath();
-#endif
#ifdef RUBY_ARCHLIB
addpath(RUBY_ARCHLIB);
diff --git a/ruby.h b/ruby.h
index 44c1abd2c6..ae1a568721 100644
--- a/ruby.h
+++ b/ruby.h
@@ -3,10 +3,9 @@
ruby.h -
$Author$
- $Date$
created at: Thu Jun 10 14:26:32 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
*************************************************/
@@ -245,21 +244,21 @@ struct RFloat {
struct RString {
struct RBasic basic;
- size_t len;
+ int len;
char *ptr;
VALUE orig;
};
struct RArray {
struct RBasic basic;
- size_t len, capa;
+ int len, capa;
VALUE *ptr;
};
struct RRegexp {
struct RBasic basic;
struct re_pattern_buffer *ptr;
- size_t len;
+ int len;
char *str;
};
@@ -304,14 +303,14 @@ VALUE rb_data_object_alloc _((VALUE,void*,void (*)(),void (*)()));
struct RStruct {
struct RBasic basic;
- size_t len;
+ int len;
VALUE *ptr;
};
struct RBignum {
struct RBasic basic;
char sign;
- size_t len;
+ int len;
unsigned short *digits;
};
@@ -447,6 +446,7 @@ void ruby_run _((void));
EXTERN VALUE rb_mKernel;
EXTERN VALUE rb_mComparable;
EXTERN VALUE rb_mEnumerable;
+EXTERN VALUE rb_mPrecision;
EXTERN VALUE rb_mErrno;
EXTERN VALUE rb_mFileTest;
EXTERN VALUE rb_mGC;
diff --git a/rubyio.h b/rubyio.h
index 5b8baf0f15..036f24426c 100644
--- a/rubyio.h
+++ b/rubyio.h
@@ -7,7 +7,7 @@
$Date$
created at: Fri Nov 12 16:47:09 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
diff --git a/signal.c b/signal.c
index d7ce4921b2..b9bc9b2944 100644
--- a/signal.c
+++ b/signal.c
@@ -507,7 +507,7 @@ trap_ensure(arg)
void
rb_trap_restore_mask()
{
-#ifndef NT
+#if !defined(NT) && !defined(USE_CWGUSI)
# ifdef HAVE_SIGPROCMASK
sigprocmask(SIG_SETMASK, &trap_last_mask, NULL);
# else
diff --git a/sprintf.c b/sprintf.c
index 3c09a8ed2a..c3e2639626 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -6,14 +6,18 @@
$Date$
created at: Fri Oct 15 10:39:26 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
#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)
diff --git a/string.c b/string.c
index e5f0dd2a63..e54998e4a5 100644
--- a/string.c
+++ b/string.c
@@ -6,7 +6,7 @@
$Date$
created at: Mon Aug 9 17:12:58 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
@@ -32,7 +32,7 @@ extern VALUE rb_rs;
VALUE
rb_str_new(ptr, len)
char *ptr;
- size_t len;
+ int len;
{
NEWOBJ(str, struct RString);
OBJSETUP(str, rb_cString, T_STRING);
@@ -58,7 +58,7 @@ rb_str_new2(ptr)
VALUE
rb_tainted_str_new(ptr, len)
char *ptr;
- size_t len;
+ int len;
{
return rb_obj_taint(rb_str_new(ptr, len));
}
@@ -249,7 +249,7 @@ rb_str_times(str, times)
VALUE times;
{
VALUE str2;
- size_t i, len;
+ int i, len;
len = NUM2INT(times);
if (len < 0) {
@@ -292,7 +292,7 @@ rb_str_format(str, arg)
VALUE
rb_str_substr(str, start, len)
VALUE str;
- size_t start, len;
+ int start, len;
{
VALUE str2;
@@ -315,9 +315,9 @@ rb_str_substr(str, start, len)
static VALUE
rb_str_subseq(str, beg, end)
VALUE str;
- size_t beg, end;
+ int beg, end;
{
- size_t len;
+ int len;
if ((beg > 0 && end > 0 || beg < 0 && end < 0) && beg > end) {
rb_raise(rb_eIndexError, "end smaller than beg [%d..%d]", beg, end);
@@ -399,7 +399,7 @@ rb_str_dup_frozen(str)
VALUE
rb_str_resize(str, len)
VALUE str;
- size_t len;
+ int len;
{
rb_str_modify(str);
@@ -417,7 +417,7 @@ VALUE
rb_str_cat(str, ptr, len)
VALUE str;
char *ptr;
- size_t len;
+ int len;
{
if (len > 0) {
rb_str_modify(str);
@@ -449,7 +449,7 @@ int
rb_str_hash(str)
VALUE str;
{
- register size_t len = RSTRING(str)->len;
+ register int len = RSTRING(str)->len;
register char *p = RSTRING(str)->ptr;
register int key = 0;
@@ -482,8 +482,7 @@ int
rb_str_cmp(str1, str2)
VALUE str1, str2;
{
- size_t len;
- int retval;
+ int len, retval;
if (ruby_ignorecase) {
return rb_str_cicmp(str1, str2);
@@ -531,7 +530,7 @@ rb_str_match(x, y)
VALUE x, y;
{
VALUE reg;
- size_t start;
+ int start;
switch (TYPE(y)) {
case T_REGEXP:
@@ -557,13 +556,13 @@ rb_str_match2(str)
return rb_reg_match2(rb_reg_regcomp(str));
}
-static size_t
+static int
rb_str_index(str, sub, offset)
VALUE str, sub;
- size_t offset;
+ int offset;
{
char *s, *e, *p;
- size_t len;
+ int len;
if (RSTRING(str)->len - offset < RSTRING(sub)->len) return -1;
s = RSTRING(str)->ptr+offset;
@@ -576,7 +575,7 @@ rb_str_index(str, sub, offset)
}
s++;
}
- return (size_t)-1;
+ return -1;
}
static VALUE
@@ -587,10 +586,10 @@ rb_str_index_method(argc, argv, str)
{
VALUE sub;
VALUE initpos;
- size_t pos;
+ int pos;
if (rb_scan_args(argc, argv, "11", &sub, &initpos) == 2) {
- pos = NUM2UINT(initpos);
+ pos = NUM2INT(initpos);
}
else {
pos = 0;
@@ -608,7 +607,7 @@ rb_str_index_method(argc, argv, str)
case T_FIXNUM:
{
int c = FIX2INT(sub);
- size_t len = RSTRING(str)->len;
+ int len = RSTRING(str)->len;
char *p = RSTRING(str)->ptr;
for (;pos<len;pos++) {
@@ -634,11 +633,11 @@ rb_str_rindex(argc, argv, str)
{
VALUE sub;
VALUE initpos;
- size_t pos, len;
+ int pos, len;
char *s, *sbeg, *t;
if (rb_scan_args(argc, argv, "11", &sub, &initpos) == 2) {
- pos = NUM2UINT(initpos);
+ pos = NUM2INT(initpos);
if (pos >= RSTRING(str)->len) pos = RSTRING(str)->len;
}
else {
@@ -780,7 +779,7 @@ rb_str_aref(str, indx)
VALUE str;
VALUE indx;
{
- size_t idx;
+ int idx;
switch (TYPE(indx)) {
case T_FIXNUM:
@@ -800,13 +799,13 @@ rb_str_aref(str, indx)
return Qnil;
case T_STRING:
- if (rb_str_index(str, indx, 0) != (size_t)-1) return indx;
+ if (rb_str_index(str, indx, 0) != -1) return indx;
return Qnil;
default:
/* check if indx is Range */
{
- size_t beg, end;
+ int beg, end;
if (rb_range_beg_end(indx, &beg, &end)) {
return rb_str_subseq(str, beg, end);
}
@@ -833,7 +832,8 @@ rb_str_aref_method(argc, argv, str)
static void
rb_str_replace(str, beg, len, val)
VALUE str, val;
- size_t beg, len;
+ int beg;
+ int len;
{
if (len < RSTRING(val)->len) {
/* expand string */
@@ -857,9 +857,9 @@ rb_str_replace(str, beg, len, val)
static void
rb_str_replace2(str, beg, end, val)
VALUE str, val;
- size_t beg, end;
+ int beg, end;
{
- size_t len;
+ int len;
if ((beg > 0 && end > 0 || beg < 0 && end < 0) && beg > end) {
rb_raise(rb_eIndexError, "end smaller than beg [%d..%d]", beg, end);
@@ -898,11 +898,12 @@ rb_str_aset(str, indx, val)
VALUE str;
VALUE indx, val;
{
- size_t idx, beg, end;
+ int idx;
+ int beg, end;
switch (TYPE(indx)) {
case T_FIXNUM:
- idx = NUM2UINT(indx);
+ idx = NUM2INT(indx);
if (idx < 0) {
idx = RSTRING(str)->len + idx;
}
@@ -929,7 +930,7 @@ rb_str_aset(str, indx, val)
case T_STRING:
beg = rb_str_index(str, indx, 0);
- if (beg != (size_t)-1) {
+ if (beg != -1) {
end = beg + RSTRING(indx)->len - 1;
rb_str_replace2(str, beg, end, val);
}
@@ -938,7 +939,7 @@ rb_str_aset(str, indx, val)
default:
/* check if indx is Range */
{
- size_t beg, end;
+ int beg, end;
if (rb_range_beg_end(indx, &beg, &end)) {
if (TYPE(val) != T_STRING) val = rb_str_to_str(val);
rb_str_replace2(str, beg, end, val);
@@ -960,15 +961,16 @@ rb_str_aset_method(argc, argv, str)
rb_str_modify(str);
if (rb_scan_args(argc, argv, "21", &arg1, &arg2, &arg3) == 3) {
- size_t beg, len;
+ int beg;
+ int len;
if (TYPE(arg3) != T_STRING) arg3 = rb_str_to_str(arg3);
- beg = NUM2UINT(arg1);
+ beg = NUM2INT(arg1);
if (beg < 0) {
beg = RSTRING(str)->len + beg;
if (beg < 0) beg = 0;
}
- len = NUM2UINT(arg2);
+ len = NUM2INT(arg2);
if (len < 0) rb_raise(rb_eIndexError, "negative length %d", len);
if (beg + len > RSTRING(str)->len) {
len = RSTRING(str)->len - beg;
@@ -1007,7 +1009,7 @@ rb_str_sub_bang(argc, argv, str)
VALUE pat, repl, match;
struct re_registers *regs;
int iter = 0;
- size_t plen;
+ int plen;
if (argc == 1 && rb_iterator_p()) {
iter = 1;
@@ -1070,10 +1072,10 @@ rb_str_gsub_bang(argc, argv, str)
{
VALUE pat, val, repl, match;
struct re_registers *regs;
- int beg, offset, n;
+ int beg, n;
int iter = 0;
char *buf, *bp, *cp;
- size_t blen, len;
+ int offset, blen, len;
if (argc == 1 && rb_iterator_p()) {
iter = 1;
@@ -1278,11 +1280,11 @@ static VALUE
rb_str_include(str, arg)
VALUE str, arg;
{
- size_t i;
+ int i;
if (FIXNUM_P(arg)) {
int c = FIX2INT(arg);
- size_t len = RSTRING(str)->len;
+ int len = RSTRING(str)->len;
char *p = RSTRING(str)->ptr;
for (i=0; i<len; i++) {
@@ -1296,7 +1298,7 @@ rb_str_include(str, arg)
if (TYPE(arg) != T_STRING) arg = rb_str_to_str(arg);
i = rb_str_index(str, arg, 0);
- if (i == (size_t)-1) return Qfalse;
+ if (i == -1) return Qfalse;
return INT2FIX(i);
}
@@ -1418,7 +1420,7 @@ static VALUE
rb_str_dump(str)
VALUE str;
{
- size_t len;
+ int len;
char *p, *pend;
char *q, *qend;
VALUE result;
@@ -1990,7 +1992,7 @@ rb_str_split_method(argc, argv, str)
beg = 0;
if (char_sep >= 0) {
char *ptr = RSTRING(str)->ptr;
- size_t len = RSTRING(str)->len;
+ int len = RSTRING(str)->len;
char *eptr = ptr + len;
if (char_sep == ' ') { /* AWK emulation */
@@ -2031,9 +2033,9 @@ rb_str_split_method(argc, argv, str)
}
}
else {
- size_t start = beg;
+ int start = beg;
int last_null = 0;
- size_t idx;
+ int idx;
struct re_registers *regs;
while ((end = rb_reg_search(spat, str, start, 0)) >= 0) {
@@ -2109,7 +2111,7 @@ rb_str_each_line(argc, argv, str)
int rslen;
char *p = RSTRING(str)->ptr, *pend = p + RSTRING(str)->len, *s;
char *ptr = p;
- size_t len = RSTRING(str)->len;
+ int len = RSTRING(str)->len;
VALUE line;
if (rb_scan_args(argc, argv, "01", &rs) == 0) {
@@ -2158,7 +2160,7 @@ static VALUE
rb_str_each_byte(str)
struct RString* str;
{
- size_t i;
+ int i;
for (i=0; i<RSTRING(str)->len; i++) {
rb_yield(INT2FIX(RSTRING(str)->ptr[i] & 0xff));
@@ -2223,7 +2225,7 @@ rb_str_chomp_bang(argc, argv, str)
int newline;
int rslen;
char *p = RSTRING(str)->ptr;
- size_t len = RSTRING(str)->len;
+ int len = RSTRING(str)->len;
if (rb_scan_args(argc, argv, "01", &rs) == 0) {
rs = rb_rs;
@@ -2335,11 +2337,11 @@ rb_str_strip(str)
static VALUE
scan_once(str, pat, start)
VALUE str, pat;
- size_t *start;
+ int *start;
{
VALUE result, match;
struct re_registers *regs;
- size_t i;
+ int i;
if (rb_reg_search(pat, str, *start, 0) >= 0) {
match = rb_backref_get();
@@ -2371,7 +2373,7 @@ rb_str_scan(str, pat)
VALUE str, pat;
{
VALUE result;
- size_t start = 0;
+ int start = 0;
pat = get_pat(pat);
if (!rb_iterator_p()) {
@@ -2484,7 +2486,7 @@ rb_str_ljust(str, w)
VALUE str;
VALUE w;
{
- size_t width = NUM2UINT(w);
+ int width = NUM2INT(w);
VALUE res;
char *p, *pend;
@@ -2503,7 +2505,7 @@ rb_str_rjust(str, w)
VALUE str;
VALUE w;
{
- size_t width = NUM2UINT(w);
+ int width = NUM2INT(w);
VALUE res;
char *p, *pend;
@@ -2522,10 +2524,10 @@ rb_str_center(str, w)
VALUE str;
VALUE w;
{
- size_t width = NUM2UINT(w);
+ int width = NUM2INT(w);
VALUE res;
char *p, *pend;
- size_t n;
+ int n;
if (width < 0 || RSTRING(str)->len >= width) return str;
res = rb_str_new(0, width);
diff --git a/time.c b/time.c
index fc14d8e5b6..e58fc4cf70 100644
--- a/time.c
+++ b/time.c
@@ -6,7 +6,7 @@
$Date$
created at: Tue Dec 28 14:31:59 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
@@ -79,8 +79,10 @@ time_new_internal(klass, sec, usec)
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;
diff --git a/util.c b/util.c
index ae0914d217..d90fd08b19 100644
--- a/util.c
+++ b/util.c
@@ -6,7 +6,7 @@
$Date$
created at: Fri Mar 10 17:22:34 JST 1995
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
@@ -19,6 +19,10 @@
#define RUBY_NO_INLINE
#include "ruby.h"
+#ifdef USE_CWGUSI
+extern char* mktemp(char*);
+#endif
+
VALUE
rb_class_of(obj)
VALUE obj;
diff --git a/util.h b/util.h
index 756daeeac6..52ac5e18d0 100644
--- a/util.h
+++ b/util.h
@@ -6,7 +6,7 @@
$Date$
created at: Thu Mar 9 11:55:53 JST 1995
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
#ifndef UTIL_H
diff --git a/version.c b/version.c
index 22393f0f4a..0e21322ab4 100644
--- a/version.c
+++ b/version.c
@@ -7,7 +7,7 @@
$Date$
created at: Thu Sep 30 20:08:01 JST 1993
- Copyright (C) 1993-1998 Yukihiro Matsumoto
+ Copyright (C) 1993-1999 Yukihiro Matsumoto
************************************************/
@@ -31,6 +31,6 @@ ruby_show_version()
void
ruby_show_copyright()
{
- fprintf(stderr, "ruby - Copyright (C) 1993-1998 Yukihiro Matsumoto\n");
+ fprintf(stderr, "ruby - Copyright (C) 1993-1999 Yukihiro Matsumoto\n");
exit(0);
}
diff --git a/win32/config.h b/win32/config.h
index 8385154cd5..56aade0e35 100644
--- a/win32/config.h
+++ b/win32/config.h
@@ -27,7 +27,7 @@
#define vfork fork
#define HAVE_FMOD 1
/* #define HAVE_RANDOM 1 */
-/* #define HAVE_WAITPID 1 */
+#define HAVE_WAITPID 1
#define HAVE_GETCWD 1
/* #define HAVE_TRUNCATE 1 */
#define HAVE_CHSIZE 1
@@ -37,6 +37,8 @@
/* #define HAVE_SETITIMER 1 */
#define HAVE_GETGROUPS 1
/* #define HAVE_SIGPROCMASK 1 */
+#define HAVE_GETLOGIN 1
+
#define RSHIFT(x,y) ((x)>>y)
#define FILE_COUNT _cnt
#define DLEXT ".dll"
@@ -44,27 +46,3 @@
#define RUBY_ARCHLIB "/usr/local/lib/ruby/i386-mswin32"
#define RUBY_PLATFORM "i386-mswin32"
-/* NNN */
-#define strcasecmp _strcmpi
-#define popen _popen
-#define pclose _pclose
-#define pipe _pipe
-#define bzero(x, y) memset(x, 0, y)
-#define snprintf _snprintf
-#define vsnprintf _vsnprintf
-
-
-#define S_IFMT _S_IFMT
-#define S_IFDIR _S_IFDIR
-#define S_IFCHR _S_IFCHR
-#define S_IFREG _S_IFREG
-#define S_IREAD _S_IREAD
-#define S_IWRITE _S_IWRITE
-#define S_IEXEC _S_IEXEC
-#define S_IFIFO _S_IFIFO
-
-#define UIDTYPE int
-#define GIDTYPE int
-#define pid_t int
-#define WNOHANG -1
-//#define NT
diff --git a/win32/win32.c b/win32/win32.c
index 46489c4e08..54e7e7f7af 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -23,7 +23,7 @@
#include <windows.h>
#include <winbase.h>
#include <wincon.h>
-#include "nt.h"
+#include "win32.h"
#include "dir.h"
#ifndef index
#define index(x, y) strchr((x), (y))
diff --git a/win32/win32.h b/win32/win32.h
index a3d1f21aa5..9f0dcfbba0 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -95,9 +95,10 @@
#include <sys/types.h>
#include <sys/utime.h>
-//
-// Grrr...
-//
+#define UIDTYPE int
+#define GIDTYPE int
+#define pid_t int
+#define WNOHANG -1
#define access _access
#define chmod _chmod
@@ -113,6 +114,7 @@
#define lseek _lseek
#define mktemp _mktemp
#define open _open
+#define perror _perror
#define read _read
#define setmode _setmode
#define sopen _sopen
@@ -129,6 +131,7 @@
#define execvp _execvp
#define execvpe _execvpe
#define getpid _getpid
+#define sleep(x) Sleep((x)*1000)
#define spawnl _spawnl
#define spawnle _spawnle
#define spawnlp _spawnlp
@@ -141,9 +144,7 @@
#define fileno _fileno
#endif
#define utime _utime
-//#define pipe _pipe
-#define perror _perror
-
+#define vsnprintf _vsnprintf
/* these are defined in nt.c */
@@ -186,14 +187,7 @@ extern struct servent * mygetservbyport(int, char *);
//
// stubs
//
-// extern int ioctl (int, unsigned int, char *);
extern int ioctl (int, unsigned int, long);
-#if 0
-extern void sleep (unsigned int);
-#else
-#define sleep(x) Sleep(x*1000)
-#endif
-
extern UIDTYPE getuid (void);
extern UIDTYPE geteuid (void);
extern GIDTYPE getgid (void);
@@ -202,8 +196,6 @@ extern int setuid (int);
extern int setgid (int);
-#undef IN /* confict in parse.c */
-
#if 0
extern int sys_nerr;
extern char *sys_errlist[];
@@ -214,11 +206,6 @@ extern char *mystrerror(int);
#define PIPE_BUF 1024
-#define HAVE_STDLIB_H 1
-#define HAVE_GETLOGIN 1
-#define HAVE_WAITPID 1
-#define HAVE_GETCWD 1
-
#define LOCK_SH 1
#define LOCK_EX 2
#define LOCK_NB 4
@@ -227,7 +214,9 @@ extern char *mystrerror(int);
#define EWOULDBLOCK 10035 /* EBASEERR + 35 (winsock.h) */
#endif
+#ifndef O_BINARY
#define O_BINARY 0x8000
+#endif
#ifdef popen
#undef popen