Regard to "[ruby-list:9301] ruby 1.1c3 released"
有馬@FITECです。
WATCOM C/C++ 10.5J, Borland C++Builder 1.0 でコンパイルエラーを
消すために加えた処置です。diff を使ってみました。wcl386 では
nt.c, parse,c に、bcc32 では nt.c にまだ手を加える必要があります。
既に報告済みの分は除いたつもりです。
ベンダごとのコンパイラやライブラリの差違って大きいですねぇ。
--- ../ruby-1.1c3/dir.c Mon Jul 13 13:38:20 1998
+++ dir.c Mon Aug 31 23:04:46 1998
@@ -39,7 +42,7 @@
# if HAVE_NDIR_H
# include <ndir.h>
# endif
-# ifdef NT
+# if defined(NT) && defined(_MSC_VER)
# include "missing/dir.h"
# endif
#endif
--- ../ruby-1.1c3/dir.c Mon Jul 13 13:38:20 1998
+++ dir.c Mon Aug 31 23:04:46 1998
@@ -27,6 +27,9 @@
#if HAVE_DIRENT_H
# include <dirent.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
+#elif HAVE_DIRECT_H
+# include <direct.h>
+# define NAMLEN(dirent) strlen((dirent)->d_name)
#else
# define dirent direct
# define NAMLEN(dirent) (dirent)->d_namlen
@@ -39,7 +42,7 @@
# if HAVE_NDIR_H
# include <ndir.h>
# endif
-# ifdef NT
+# if defined(NT) && defined(_MSC_VER)
# include "missing/dir.h"
# endif
#endif
--- ../ruby-1.1c3/error.c Mon Aug 10 14:41:12 1998
+++ error.c Mon Aug 31 23:35:10 1998
@@ -696,7 +696,9 @@
#endif
char *err;
char *buf;
+#ifndef __WATCOMC__
extern int errno; /* なぜ通らない? */
+#endif
int n = errno;
VALUE ee;
--- ../ruby-1.1c3/file.c Mon Jul 13 13:38:22 1998
+++ file.c Wed Sep 02 00:27:48 1998
@@ -966,8 +966,14 @@
#ifndef HAVE_UTIME_H
# ifdef NT
+# if defined(__BORLANDC__)
+# include <utime.h>
+# else
# include <sys/utime.h>
+# endif
+# if defined(_MSC_VER)
# define utimbuf _utimbuf
+# endif
# else
struct utimbuf {
long actime;
--- ../ruby-1.1c3/glob.c Fri Jun 26 18:14:18 1998
+++ glob.c Mon Aug 31 23:55:18 1998
@@ -46,6 +46,9 @@
#if defined (HAVE_DIRENT_H)
# include <dirent.h>
# define D_NAMLEN(d) strlen ((d)->d_name)
+#elif HAVE_DIRECT_H
+# include <direct.h>
+# define D_NAMLEN(d) strlen ((d)->d_name)
#else /* !HAVE_DIRENT_H */
# define D_NAMLEN(d) ((d)->d_namlen)
# if defined (HAVE_SYS_NDIR_H)
@@ -66,6 +69,8 @@
/* Posix does not require that the d_ino field be present, and some
systems do not provide it. */
# define REAL_DIR_ENTRY(dp) 1
+#elif defined (__BORLANDC__)
+# define REAL_DIR_ENTRY(dp) 1
#else
# define REAL_DIR_ENTRY(dp) (dp->d_ino != 0)
#endif /* _POSIX_SOURCE */
@@ -111,7 +116,7 @@
extern int interrupt_state;
#endif /* SHELL */
-#if defined(NT)
+#if defined(NT) && defined(_MSC_VER)
#include "missing/dir.h"
#endif
--- ../ruby-1.1c3/marshal.c Fri Jul 24 13:38:00 1998
+++ marshal.c Wed Sep 02 00:32:16 1998
@@ -665,7 +665,7 @@
}
big = RBIGNUM(big_norm((VALUE)big));
if (TYPE(big) == T_BIGNUM) {
- r_regist(big, arg);
+ r_regist((VALUE)big, arg);
}
return (VALUE)big;
}
--- ../ruby-1.1c3/re.c Thu Aug 27 12:55:26 1998
+++ re.c Wed Sep 02 00:32:56 1998
@@ -648,7 +648,7 @@
break;
}
- kcode_set_option(re);
+ kcode_set_option((VALUE)re);
if (RTEST(ignorecase)) {
options |= RE_OPTION_IGNORECASE;
FL_SET(re, REG_CASESTATE);
--
有馬 康弘 <fit0298 / fitec.co.jp>