[#19011] open-uri - very easy net access library — Tanaka Akira <akr@...17n.org>

HTTP, FTP に簡単にアクセスするための open-uri というライブラリを作って

19 messages 2002/12/06

[#19066] ruby 1.6.9 preview4 予告 — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

41 messages 2002/12/13
[#19079] Re: ruby 1.6.9 preview4 予告 — "Akinori MUSHA" <knu@...> 2002/12/16

At Fri, 13 Dec 2002 15:28:47 +0900,

[#19086] Re: ruby 1.6.9 preview4 予告 — UENO Katsuhiro <unnie@...> 2002/12/17

うえのです。

[#19087] Re: ruby 1.6.9 preview4 予告 — matz@... (Yukihiro Matsumoto) 2002/12/17

まつもと ゆきひろです

[#19083] Re: [ruby-cvs] ruby: * file.c (utimbuf): need to define for VC++. — WATANABE Hirofumi <eban@...>

わたなべです。

11 messages 2002/12/16

[#19127] Re: 1.6.8-preview4 build failed (on Vine Linux 2.1.5) (PR#373) — nobu.nakada@...

なかだです。

16 messages 2002/12/19
[#19129] Re: 1.6.8-preview4 build failed (on Vine Linux 2.1.5) (PR#373) — WATANABE Hirofumi <eban@...> 2002/12/19

わたなべです。

[#19198] ruby-1.8.0 / yield(nil)とyield()のちがい — m_seki@...

38 messages 2002/12/25
[#19209] Re: ruby-1.8.0 / yield(nil)とyield()のちがい — matz@... (Yukihiro Matsumoto) 2002/12/27

まつもと ゆきひろです

[#19218] Re: ruby-1.8.0 / yield(nil)とyield()のちがい — m_seki@... 2002/12/27

[#19219] Re: ruby-1.8.0 / yield(nil)とyield()のちがい — matz@... (Yukihiro Matsumoto) 2002/12/27

まつもと ゆきひろです

[#19264] Re: ruby-1.8.0 / yield(nil)とyield()のちがい — matz@... (Yukihiro Matsumoto) 2003/01/01

まつもと ゆきひろです

[#19266] Re: ruby-1.8.0 / yield(nil)とyield()のちがい — Tanaka Akira <akr@...17n.org> 2003/01/01

In article <1041383157.631472.21307.nullmailer@picachu.netlab.jp>,

[#19271] Re: ruby-1.8.0 / yield(nil)とyield()のちがい — matz@... (Yukihiro Matsumoto) 2003/01/01

まつもと ゆきひろです

[#19272] Re: ruby-1.8.0 / yield(nil)とyield()のちがい — Tanaka Akira <akr@...17n.org> 2003/01/01

In article <1041394108.920587.21729.nullmailer@picachu.netlab.jp>,

[#19276] Re: ruby-1.8.0 / yield(nil)とyield()のちがい — matz@... (Yukihiro Matsumoto) 2003/01/01

まつもと ゆきひろです

[#19278] Re: ruby-1.8.0 / yield(nil)とyield()のちがい — Tanaka Akira <akr@...17n.org> 2003/01/01

In article <1041420724.492653.22355.nullmailer@picachu.netlab.jp>,

[ruby-dev:19031] Re: NT -> _WIN32 patch

From: nobu.nakada@...
Date: 2002-12-07 14:05:43 UTC
List: ruby-dev #19031
なかだです。

At Sat, 7 Dec 2002 20:03:31 +0900,
uema2@cjb <mail@uema2.cjb.net> wrote:
> mingw, mswin, bcc 等の Win32 系 OS で、-DNT が
> 必要なくなるよう、NT を _WIN32 に書き換えたパッチを
> 作成いたしました。
> # 一部、WinCE 用に変更した箇所もありますが。
> 
> 一応、私の手元では、mswin32 でコンパイルが通ることを
> 確認いたしましたが、他の環境でもちゃんと通るかどうか、
> 確認いただけないでしょうか。

追加です。mingwとbccの対応、struct utimeの整理、ドライブレター
関係の分離など。

あとはIMPORT/EXPORTとoldnamesかな。


diff -ru2p bcc32/Makefile.sub bcc32/Makefile.sub
--- bcc32/Makefile.sub	Thu Nov 14 22:51:19 2002
+++ bcc32/Makefile.sub	Thu Nov 14 23:01:31 2002
@@ -88,6 +88,6 @@ DESTDIR = $(prefix)
 !endif
 !ifndef CFLAGS
-CFLAGS = -q -DNT=1 $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) -w-
+CFLAGS = -q $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) -w-
 !endif
 !ifndef CPPFLAGS
diff -ru2p configure.in configure.in
--- configure.in	Mon Dec  2 16:57:15 2002
+++ configure.in	Sat Dec  7 20:54:56 2002
@@ -349,5 +349,5 @@ AC_CHECK_HEADERS(stdlib.h string.h unist
 		 fcntl.h sys/fcntl.h sys/select.h sys/time.h sys/times.h sys/param.h\
 		 syscall.h pwd.h a.out.h utime.h memory.h direct.h sys/resource.h \
-		 sys/mkdev.h)
+		 sys/mkdev.h sys/utime.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
@@ -1151,6 +1151,6 @@ case "$target_os" in
 	    COMMON_MACROS="WIN32_LEAN_AND_MEAN="
 	    COMMON_HEADERS="windows.h winsock.h"
-	    CFLAGS="-DNT -D__NO_ISOCEXT $CFLAGS"
+	    CFLAGS="-D__NO_ISOCEXT $CFLAGS"
 	    CCDLFLAGS=-DIMPORT ;;
 	esac
diff -ru2p defines.h defines.h
--- defines.h	Sat Dec  7 20:53:55 2002
+++ defines.h	Sat Dec  7 22:16:28 2002
@@ -87,7 +87,14 @@ void xfree _((void*));
 #endif
 
+#if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__)
+#define DOSISH 1
+#ifndef _WIN32_WCE
+# define DOSISH_DRIVE_LETTER
+#endif
+#endif
+
 /* define RUBY_USE_EUC/SJIS for default kanji-code */
 #ifndef DEFAULT_KCODE
-#if defined(MSDOS) || defined(__CYGWIN__) || defined(__human68k__) || defined(__MACOS__) || defined(__EMX__) || defined(OS2) || defined(_WIN32)
+#if defined(DOSISH) || defined(__CYGWIN__) || defined(__MACOS__) || defined(OS2)
 #define DEFAULT_KCODE KCODE_SJIS
 #else
@@ -107,4 +114,7 @@ void xfree _((void*));
 #endif /* NeXT */
 
+#ifdef __CYGWIN__
+#undef _WIN32
+#endif
 #ifdef _WIN32
 #include "win32/win32.h"
@@ -138,10 +148,6 @@ void xfree _((void*));
 #endif 
 
-#if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__)
-#define DOSISH 1
-#endif
-
-#if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(OS2)
+#if defined(DOSISH)
 #define PATH_SEP ";"
 #elif defined(riscos)
diff -ru2p dir.c dir.c
--- dir.c	Sat Dec  7 20:53:55 2002
+++ dir.c	Sat Dec  7 22:17:35 2002
@@ -80,8 +80,5 @@ char *strchr _((char*,char));
 # endif
 #endif
-#ifdef _WIN32_WCE
-#undef CharNext
-#define CharNext CharNextA
-#endif
+
 #if defined DOSISH
 #define isdirsep(c) ((c) == '/' || (c) == '\\')
@@ -608,5 +605,5 @@ extract_path(p, pend)
     memcpy(alloc, p, len);
     if (len > 1 && pend[-1] == '/'
-#if defined DOSISH
+#if defined DOSISH_DRIVE_LETTER
     && pend[-2] != ':'
 #endif
@@ -767,8 +764,8 @@ glob_helper(path, sub, flags, func, arg)
 	    }
 	    
-#if defined DOSISH
+#if defined DOSISH_DRIVE_LETTER
 #define BASE (*base && !((isdirsep(*base) && !base[1]) || (base[1] == ':' && isdirsep(base[2]) && !base[3])))
 #else
-#define BASE (*base && !(*base == '/' && !base[1]))
+#define BASE (*base && !(isdirsep(*base) && !base[1]))
 #endif
 
diff -ru2p dln.c dln.c
--- dln.c	Sat Dec  7 20:53:55 2002
+++ dln.c	Sat Dec  7 21:27:52 2002
@@ -1670,7 +1670,9 @@ dln_find_1(fname, path, exe_flag)
       return fname;
     if (exe_flag && strchr(fname, '/')) return fname;
-#if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__)
+#ifdef DOSISH
     if (fname[0] == '\\') return fname;
+# ifdef DOSISH_DRIVE_LETTER
     if (strlen(fname) > 2 && fname[1] == ':') return fname;
+# endif
     if (strncmp(".\\", fname, 2) == 0 || strncmp("..\\", fname, 3) == 0)
       return fname;
@@ -1702,5 +1704,5 @@ dln_find_1(fname, path, exe_flag)
 
 	    if (*dp == '~' && (l == 1 ||
-#if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__)
+#if defined(DOSISH)
 			       dp[1] == '\\' || 
 #endif
@@ -1760,6 +1762,6 @@ dln_find_1(fname, path, exe_flag)
 	}
 #endif
-#if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__)
+#if defined(DOSISH)
 	if (exe_flag) {
 	    static const char *extension[] = {
diff -ru2p file.c file.c
--- file.c	Sat Dec  7 20:53:55 2002
+++ file.c	Sat Dec  7 22:17:54 2002
@@ -41,14 +41,4 @@ int flock _((int, int));
 
 #include <time.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#else
-#ifndef _WIN32
-struct timeval {
-        long    tv_sec;         /* seconds */
-        long    tv_usec;        /* and microseconds */
-};
-#endif /* _WIN32 */
-#endif
 
 VALUE rb_time_new _((time_t, time_t));
@@ -56,4 +46,6 @@ VALUE rb_time_new _((time_t, time_t));
 #ifdef HAVE_UTIME_H
 #include <utime.h>
+#elif defined HAVE_SYS_UTIME_H
+#include <sys/utime.h>
 #endif
 
@@ -77,9 +69,4 @@ char *strrchr _((const char*,const char)
 #endif
 
-#ifdef _WIN32_WCE
-#undef CharNext
-#define CharNext CharNextA
-#endif
-
 VALUE rb_cFile;
 VALUE rb_mFileTest;
@@ -116,8 +103,4 @@ rb_file_path(obj)
 }
 
-#ifdef _WIN32
-#include "missing/file.h"
-#endif
-
 static VALUE
 stat_new_0(klass, st)
@@ -1213,20 +1196,9 @@ rb_file_s_utime(argc, argv)
 #else
 
-#ifndef HAVE_UTIME_H
-# ifdef _WIN32
-#   if defined(__BORLANDC__)
-#     include <utime.h>
-#   else
-#  include <sys/utime.h>
-#   endif
-#   if defined(_MSC_VER) || defined __MINGW32__
-#  define utimbuf _utimbuf
-#   endif
-# else
+#if !defined HAVE_UTIME_H && !defined HAVE_SYS_UTIME_H
 struct utimbuf {
     long actime;
     long modtime;
 };
-# endif
 #endif
 
@@ -1475,5 +1447,5 @@ rb_file_s_expand_path(argc, argv)
 	}
     }
-#if defined DOSISH || defined __CYGWIN__
+#if defined DOSISH_DRIVE_LETTER || defined __CYGWIN__
     /* skip drive letter */
     else if (ISALPHA(s[0]) && s[1] == ':' && isdirsep(s[2])) {
@@ -1573,5 +1545,5 @@ rb_file_s_expand_path(argc, argv)
 	p += s-b;
     }
-#if defined DOSISH || defined __CYGWIN__
+#if defined DOSISH_DRIVE_LETTER || defined __CYGWIN__
     else if (ISALPHA(buf[0]) && (buf[1] == ':') && isdirsep(buf[2])) {
 	/* root directory needs a trailing backslash,
@@ -2340,6 +2312,8 @@ is_absolute_path(path)
     const char *path;
 {
-#if defined DOSISH || defined __CYGWIN__
+#if defined DOSISH_DRIVE_LETTER || defined __CYGWIN__
     if (ISALPHA(path[0]) && path[1] == ':' && isdirsep(path[2])) return 1;
+#endif
+#if defined DOSISH || defined __CYGWIN__
     if (isdirsep(path[0]) && isdirsep(path[1])) return 1;
 #endif
diff -ru2p win32/win32.h win32/win32.h
--- win32/win32.h	Fri Oct 11 06:07:16 2002
+++ win32/win32.h	Sat Dec  7 22:17:41 2002
@@ -34,4 +34,12 @@
 #undef OpenFile
 #endif
+
+#define NT 1			/* deprecated */
+
+#ifdef _WIN32_WCE
+#undef CharNext
+#define CharNext CharNextA
+#endif
+
 //
 // We're not using Microsoft's "extensions" to C for


-- 
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
    中田 伸悦

In This Thread