[#27417] selector namespace — Shugo Maeda <shugo@...>

前田です。

17 messages 2005/10/13

[#27458] Matrix class is broken without mathn — akira yamada / やまだあきら <akira@...>

Debianユーザからrequire "mathn"しないときに

28 messages 2005/10/19
[#27461] Re: Matrix class is broken without mathn — Yukihiro Matsumoto <matz@...> 2005/10/19

まつもと ゆきひろです

[#27596] Re: Matrix class is broken without mathn — Masahiro Sakai (酒井政裕) <sakai@...> 2005/10/31

酒井といいます。

[#27601] Re: Matrix class is broken without mathn — Yukihiro Matsumoto <matz@...> 2005/10/31

まつもと ゆきひろです

[#27605] Re: Matrix class is broken without mathn — keiju@... (石塚圭樹) 2005/10/31

けいじゅ@いしつかです.

[#27691] Re: Matrix class is broken without mathn — Shin-ichiro HARA <sinara@...> 2005/11/12

原です。

[#27700] Re: Matrix class is broken without mathn — keiju@... (石塚圭樹) 2005/11/14

けいじゅ@いしつかです.

[#27484] 1.8.4 feature freeze? — "URABE Shyouhei aka. mput" <root@...>

卜部です。

19 messages 2005/10/23
[#27485] Re: 1.8.4 feature freeze? — Yukihiro Matsumoto <matz@...> 2005/10/23

まつもと ゆきひろです

[#27492] Re: [ ruby-Bugs-2613 ] building ruby 1.8.3 on Solaris — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>

山本です。

20 messages 2005/10/24
[#27493] Re: [ ruby-Bugs-2613 ] building ruby 1.8.3 on Solaris — Yukihiro Matsumoto <matz@...> 2005/10/24

まつもと ゆきひろです

[#27494] Re: [ ruby-Bugs-2613 ] building ruby 1.8.3 on Solaris — WATANABE Hirofumi <eban@...> 2005/10/24

わたなべです。

[#27495] Re: [ ruby-Bugs-2613 ] building ruby 1.8.3 on Solaris — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/10/24

山本です。

[#27503] Re: [ ruby-Bugs-2613 ] building ruby 1.8.3 on Solaris — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/10/25

山本です。

[#27504] Re: [ ruby-Bugs-2613 ] building ruby 1.8.3 on Solaris — "U.Nakamura" <usa@...> 2005/10/25

こんにちは、なかむら(う)です。

[#27505] Re: [ ruby-Bugs-2613 ] building ruby 1.8.3 on Solaris — nobuyoshi nakada <nobuyoshi.nakada@...> 2005/10/25

なかだです。

[#27551] 1.8.4 検証を(だれが|どのように)行うか — "URABE Shyouhei aka.mput" <root@...>

さて、 1.8.4-Preview1

41 messages 2005/10/28
[#27561] Re: 1.8.4 検証を(だれが|どのように)行うか — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/10/30

山本です。

[#27562] Re: 1.8.4 検証を(だれが�匹里茲Δ�)行うか — "URABE Shyouhei aka.mput" <root@...> 2005/10/30

卜部です。

[#27566] Re: 1.8.4 検証を(だれが|どのように)行うか — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/10/30

山本です。

[#27586] Re: 1.8.4 検証を(だれが|どのように)行うか — "U.Nakamura" <usa@...> 2005/10/31

こんにちは、なかむら(う)です。

[#27587] Re: 1.8.4 検証を(だれが|どのように)行うか — Yukihiro Matsumoto <matz@...> 2005/10/31

まつもと ゆきひろです

[ruby-dev:27610] Re: [win32] replaced symbols

From: nobuyoshi nakada <nobuyoshi.nakada@...>
Date: 2005-10-31 10:23:27 UTC
List: ruby-dev #27610
なかだです。

At Thu, 27 Oct 2005 20:55:05 +0900,
U.Nakamura wrote in [ruby-dev:27540]:
> | 以前からwin32/win32.hでの関数の置き換えが問題になることがありま
> | したが、外部に対してはDLL内のaliasで置き換えるようにしてみまし
> | た。
> 
> 1.8に入れる勇気は(私には)ないし、1.9なら後方互換性はまだ気に
> しなくてもいいと思うので、rb_w32__* を使わないものにして1.9に
> 入れてみるというのはどうでしょうか?

1.9専用にしてみました。ruby.cで先にwindows.hだけインクルードされると、
win32/win32.hでついでにwinsock2.hまでインクルードされなくなってしまって、
WSAAPIが未定義のままになってしまうんですが、これってなんででしたっけ。

> | また、Daniel Bergerが[ruby-talk:162672]でいっているように、最新
> | のMicrosoftのfree compilerにはdumpbinが入っていないとすると、
> | [ruby-talk:162690]のような修正が必要になります。
> 
> dumpbinがないバージョンがどれなんだかよくわかんないのですが、
> VC6のlink.exeにも-dumpオプションはあるようなので、1.9に関して
> は移行してもいいかもしれません。

どうなんですかねぇ。どういうバージョンのコンパイラ使ってるかもよく分か
らないし。


Index: configure.in
===================================================================
RCS file: /cvs/ruby/src/ruby/configure.in,v
retrieving revision 1.287
diff -U2 -p -r1.287 configure.in
--- configure.in	25 Oct 2005 16:59:14 -0000	1.287
+++ configure.in	28 Oct 2005 10:48:15 -0000
@@ -980,5 +980,5 @@ if test "$with_dln_a_out" != yes; then
 	cygwin*|mingw*)	: ${LDSHARED="${CC} -shared -s"}
 			XLDFLAGS="$XLDFLAGS -Wl,--stack,0x02000000"
-			DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-import,--export-all"
+			DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-import"
 			: ${LIBPATHENV=""}
 			rb_cv_dlopen=yes ;;
@@ -1367,9 +1367,16 @@ case "$target_os" in
 	;;
     cygwin*|mingw*)
+	if test x"$enable_shared" = xyes; then
+	    LIBRUBY='lib$(RUBY_SO_NAME).dll.a'
+	    LIBRUBY_DLDFLAGS='$(RUBYDEF)'
+	else
+	    LIBRUBY_SO=dummy
+	    LIBRUBY='lib$(RUBY_SO_NAME).a'
+	    LIBRUBYARG='-l$(RUBY_SO_NAME)'
+	fi
 	case "$target_os" in
 	cygwin*)
 	    if test x"$enable_shared" = xyes; then
 		LIBRUBY_SO='cyg$(RUBY_SO_NAME)'${MAJOR}${MINOR}.dll
-		LIBRUBY='lib$(RUBY_SO_NAME).dll.a'
 	    fi
 	    AC_LIBOBJ([strftime])
@@ -1379,5 +1386,4 @@ case "$target_os" in
 	    if test x"$enable_shared" = xyes; then
 		LIBRUBY_SO='$(RUBY_SO_NAME)'.dll
-		LIBRUBY='lib$(LIBRUBY_SO).a'
 	    fi
 	    AC_LIBOBJ([win32])
@@ -1391,9 +1397,4 @@ case "$target_os" in
 	FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in
 	SOLIBS='$(LIBS)'
-	if test x"$enable_shared" = xno; then
-	    LIBRUBY_SO=dummy
-	    LIBRUBY='lib$(RUBY_SO_NAME).a'
-	    LIBRUBYARG='-l$(RUBY_SO_NAME)'
-	fi
 	MINIOBJS=dmydln.o
 	;;
Index: ruby.c
===================================================================
RCS file: /cvs/ruby/src/ruby/ruby.c,v
retrieving revision 1.110
diff -U2 -p -r1.110 ruby.c
--- ruby.c	20 Oct 2005 02:22:48 -0000	1.110
+++ ruby.c	31 Oct 2005 08:42:34 -0000
@@ -13,5 +13,5 @@
 **********************************************************************/
 
-#if defined _WIN32 || defined __CYGWIN__
+#ifdef __CYGWIN__
 #include <windows.h>
 #endif
Index: bcc32/Makefile.sub
===================================================================
RCS file: /cvs/ruby/src/ruby/bcc32/Makefile.sub,v
retrieving revision 1.84
diff -U2 -p -r1.84 Makefile.sub
--- bcc32/Makefile.sub	25 Oct 2005 16:59:17 -0000	1.84
+++ bcc32/Makefile.sub	27 Oct 2005 03:52:56 -0000
@@ -432,5 +432,5 @@ $(LIBRUBY): $(LIBRUBY_SO)
 
 $(RUBYDEF):	$(LIBRUBY_A) $(PREP)
-		$(MINIRUBY) $(srcdir)bcc32/mkexports.rb -output=$@ -base=$(RUBY_SO_NAME) $(LIBRUBY_A)
+		$(MINIRUBY) $(srcdir)win32/mkexports.rb -output=$@ -base=$(RUBY_SO_NAME) $(LIBRUBY_A)
 
 $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: rbconfig.rb
Index: cygwin/GNUmakefile.in
===================================================================
RCS file: /cvs/ruby/src/ruby/cygwin/GNUmakefile.in,v
retrieving revision 1.34
diff -U2 -p -r1.34 GNUmakefile.in
--- cygwin/GNUmakefile.in	6 Sep 2005 23:22:37 -0000	1.34
+++ cygwin/GNUmakefile.in	31 Oct 2005 08:06:14 -0000
@@ -6,7 +6,9 @@ DLLWRAP = @DLLWRAP@ --target=@target_os@
 ifeq (@target_os@,cygwin)
   DLL_BASE_NAME := $(subst .dll,,$(LIBRUBY_SO))
+  WIN32H =
 else
   DLL_BASE_NAME := $(RUBY_SO_NAME)
   DLLWRAP += -mno-cygwin
+  WIN32H = win32/win32.h
   VPATH += $(srcdir)/win32
 endif
@@ -33,4 +35,11 @@ ruby: $(PROGRAM)
 rubyw: $(WPROGRAM)
 
+ifeq ($(WIN32H),)
+  DLDFLAGS += -Wl,--export-all
+else
+  DLDFLAGS += -Wl,--enable-stdcall-fixup
+  DLDOBJS += ruby.def
+endif
+
 $(LIBRUBY): $(RUBY_EXP) $(LIBRUBY_SO)
 $(RUBY_EXP) $(LIBRUBY_SO): $(DLL_BASE_NAME).res.@OBJEXT@
@@ -60,15 +69,11 @@ $(RUBY_EXP): $(LIBRUBY_A)
 GNUmakefile:	$(srcdir)/cygwin/GNUmakefile.in
 
-ifeq (@target_os@,mingw32)
-$(OBJS) $(MAINOBJ): win32/win32.h
-endif
+$(OBJS) $(MAINOBJ): $(WIN32H)
 
-ifeq (@target_os@,cygwin)
-cygwin-$(RUBY_INSTALL_NAME)$(MAJOR)$(MINOR).dll: $(LIBRUBY_A)
-	@NM@ --extern --defined $(LIBRUBY_A) | \
-	  $(MINIRUBY) -ne 'BEGIN{puts "EXPORTS"}; puts $$1+"=cyg$(RUBY_INSTALL_NAME)$(MAJOR)$(MINOR)."+$$1 if / [CDT] _(.*)$$/' >rubydll.def
-	@DLLWRAP@ -s --def=rubydll.def -o $@
-	@rm -f rubydll.def
-endif
+$(LIBRUBY_SO): $(if $(WIN32H),ruby.def)
+
+ruby.def:	$(LIBRUBY_A) $(PREP) $(RBCONFIG)
+	$(MINIRUBY) $(srcdir)/win32/mkexports.rb -output=$@ \
+		$(if $(WIN32H),-win32h=$(WIN32H)) $(LIBRUBY_A)
 
 clean-local::
Index: win32/Makefile.sub
===================================================================
RCS file: /cvs/ruby/src/ruby/win32/Makefile.sub,v
retrieving revision 1.105
diff -U2 -p -r1.105 Makefile.sub
--- win32/Makefile.sub	25 Oct 2005 16:59:17 -0000	1.105
+++ win32/Makefile.sub	31 Oct 2005 08:20:32 -0000
@@ -461,5 +461,5 @@ $(LIBRUBY_SO):	$(LIBRUBY_A) $(DLDOBJS) $
 
 $(RUBYDEF):	$(LIBRUBY_A) $(PREP)
-		$(MINIRUBY) $(srcdir)/win32/mkexports.rb -output=$@ $(LIBRUBY_A)
+		$(MINIRUBY) $(srcdir)/win32/mkexports.rb -output=$@ -win32h=$(srcdir)/win32/win32.h $(LIBRUBY_A)
 
 {$(srcdir)/win32}.def.lib:
Index: win32/win32.c
===================================================================
RCS file: /cvs/ruby/src/ruby/win32/win32.c,v
retrieving revision 1.177
diff -U2 -p -r1.177 win32.c
--- win32/win32.c	14 Oct 2005 13:06:44 -0000	1.177
+++ win32/win32.c	28 Oct 2005 08:26:48 -0000
@@ -2010,9 +2010,9 @@ is_readable_console(SOCKET sock) /* call
 
 static void catch_interrupt(void);
-static long 
+static int
 do_select(int nfds, fd_set *rd, fd_set *wr, fd_set *ex,
             struct timeval *timeout)
 {
-    long r = 0;
+    int r = 0;
 
     if (nfds == 0) {
@@ -2057,9 +2057,9 @@ subst(struct timeval *rest, const struct
 }
 
-long 
+int WSAAPI
 rb_w32_select(int nfds, fd_set *rd, fd_set *wr, fd_set *ex,
-	      struct timeval *timeout)
+	       struct timeval *timeout)
 {
-    long r;
+    int r;
     fd_set pipe_rd;
     fd_set cons_rd;
@@ -2195,5 +2195,5 @@ StartSockets(void)
 #undef accept
 
-int
+int WSAAPI
 rb_w32_accept(int s, struct sockaddr *addr, int *addrlen)
 {
@@ -2218,5 +2218,5 @@ rb_w32_accept(int s, struct sockaddr *ad
 #undef bind
 
-int 
+int WSAAPI
 rb_w32_bind(int s, const struct sockaddr *addr, int addrlen)
 {
@@ -2236,5 +2236,5 @@ rb_w32_bind(int s, const struct sockaddr
 #undef connect
 
-int 
+int WSAAPI
 rb_w32_connect(int s, const struct sockaddr *addr, int addrlen)
 {
@@ -2262,5 +2262,5 @@ rb_w32_connect(int s, const struct socka
 #undef getpeername
 
-int 
+int WSAAPI
 rb_w32_getpeername(int s, struct sockaddr *addr, int *addrlen)
 {
@@ -2279,5 +2279,5 @@ rb_w32_getpeername(int s, struct sockadd
 #undef getsockname
 
-int 
+int WSAAPI
 rb_w32_getsockname(int s, struct sockaddr *addr, int *addrlen)
 {
@@ -2294,5 +2294,5 @@ rb_w32_getsockname(int s, struct sockadd
 }
 
-int 
+int WSAAPI
 rb_w32_getsockopt(int s, int level, int optname, char *optval, int *optlen)
 {
@@ -2311,5 +2311,5 @@ rb_w32_getsockopt(int s, int level, int 
 #undef ioctlsocket
 
-int 
+int WSAAPI
 rb_w32_ioctlsocket(int s, long cmd, u_long *argp)
 {
@@ -2328,5 +2328,5 @@ rb_w32_ioctlsocket(int s, long cmd, u_lo
 #undef listen
 
-int 
+int WSAAPI
 rb_w32_listen(int s, int backlog)
 {
@@ -2345,5 +2345,5 @@ rb_w32_listen(int s, int backlog)
 #undef recv
 
-int 
+int WSAAPI
 rb_w32_recv(int s, char *buf, int len, int flags)
 {
@@ -2362,7 +2362,7 @@ rb_w32_recv(int s, char *buf, int len, i
 #undef recvfrom
 
-int 
-rb_w32_recvfrom(int s, char *buf, int len, int flags, 
-		struct sockaddr *from, int *fromlen)
+int WSAAPI
+rb_w32_recvfrom(int s, char *buf, int len, int flags,
+		 struct sockaddr *from, int *fromlen)
 {
     int r;
@@ -2380,5 +2380,5 @@ rb_w32_recvfrom(int s, char *buf, int le
 #undef send
 
-int 
+int WSAAPI
 rb_w32_send(int s, const char *buf, int len, int flags)
 {
@@ -2397,5 +2397,5 @@ rb_w32_send(int s, const char *buf, int 
 #undef sendto
 
-int 
+int WSAAPI
 rb_w32_sendto(int s, const char *buf, int len, int flags, 
 	      const struct sockaddr *to, int tolen)
@@ -2415,5 +2415,5 @@ rb_w32_sendto(int s, const char *buf, in
 #undef setsockopt
 
-int 
+int WSAAPI
 rb_w32_setsockopt(int s, int level, int optname, const char *optval, int optlen)
 {
@@ -2432,5 +2432,5 @@ rb_w32_setsockopt(int s, int level, int 
 #undef shutdown
 
-int 
+int WSAAPI
 rb_w32_shutdown(int s, int how)
 {
@@ -2489,5 +2489,5 @@ open_ifs_socket(int af, int type, int pr
 #undef socket
 
-int 
+int WSAAPI
 rb_w32_socket(int af, int type, int protocol)
 {
@@ -2513,6 +2513,6 @@ rb_w32_socket(int af, int type, int prot
 #undef gethostbyaddr
 
-struct hostent *
-rb_w32_gethostbyaddr (const char *addr, int len, int type)
+struct hostent * WSAAPI
+rb_w32_gethostbyaddr(const char *addr, int len, int type)
 {
     struct hostent *r;
@@ -2530,6 +2530,6 @@ rb_w32_gethostbyaddr (const char *addr, 
 #undef gethostbyname
 
-struct hostent *
-rb_w32_gethostbyname (const char *name)
+struct hostent * WSAAPI
+rb_w32_gethostbyname(const char *name)
 {
     struct hostent *r;
@@ -2547,6 +2547,6 @@ rb_w32_gethostbyname (const char *name)
 #undef gethostname
 
-int
-rb_w32_gethostname (char *name, int len)
+int WSAAPI
+rb_w32_gethostname(char *name, int len)
 {
     int r;
@@ -2564,6 +2564,6 @@ rb_w32_gethostname (char *name, int len)
 #undef getprotobyname
 
-struct protoent *
-rb_w32_getprotobyname (const char *name)
+struct protoent * WSAAPI
+rb_w32_getprotobyname(const char *name)
 {
     struct protoent *r;
@@ -2581,6 +2581,6 @@ rb_w32_getprotobyname (const char *name)
 #undef getprotobynumber
 
-struct protoent *
-rb_w32_getprotobynumber (int num)
+struct protoent * WSAAPI
+rb_w32_getprotobynumber(int num)
 {
     struct protoent *r;
@@ -2598,6 +2598,6 @@ rb_w32_getprotobynumber (int num)
 #undef getservbyname
 
-struct servent *
-rb_w32_getservbyname (const char *name, const char *proto)
+struct servent * WSAAPI
+rb_w32_getservbyname(const char *name, const char *proto)
 {
     struct servent *r;
@@ -2615,6 +2615,6 @@ rb_w32_getservbyname (const char *name, 
 #undef getservbyport
 
-struct servent *
-rb_w32_getservbyport (int port, const char *proto)
+struct servent * WSAAPI
+rb_w32_getservbyport(int port, const char *proto)
 {
     struct servent *r;
@@ -3446,4 +3446,10 @@ int
 rb_w32_sleep(unsigned long msec)
 {
+    return rb_w32_msleep(msec);
+}
+
+int WINAPI
+rb_w32_msleep(unsigned long msec)
+{
     DWORD ret;
     RUBY_CRITICAL(ret = wait_events(NULL, msec));
Index: win32/win32.h
===================================================================
RCS file: /cvs/ruby/src/ruby/win32/win32.h,v
retrieving revision 1.73
diff -U2 -p -r1.73 win32.h
--- win32/win32.h	14 Sep 2005 14:30:37 -0000	1.73
+++ win32/win32.h	28 Oct 2005 08:34:18 -0000
@@ -82,21 +82,20 @@ extern "C++" {
 #undef utime
 #define getc(_stream)		rb_w32_getc(_stream)
+#define getchar()		rb_w32_getc(stdin)
 #define putc(_c, _stream)	rb_w32_putc(_c, _stream)
+#define putchar(_c)		rb_w32_putc(_c, stdout)
+#ifdef RUBY_EXPORT
 #define fgetc(_stream)		getc(_stream)
 #define fputc(_c, _stream)	putc(_c, _stream)
-#define getchar()		rb_w32_getc(stdin)
-#define putchar(_c)		rb_w32_putc(_c, stdout)
 #define fgetchar()		getchar()
 #define fputchar(_c)		putchar(_c)
 #define utime(_p, _t)		rb_w32_utime(_p, _t)
 
-#define strcasecmp(s1, s2)	stricmp(s1, s2)
-#define strncasecmp(s1, s2, n)	strnicmp(s1, s2, n)
-
 #define pipe(p)			_pipe(p, 2048L, O_BINARY)
 #define close(h)		rb_w32_close(h)
 #define fclose(f)		rb_w32_fclose(f)
 #define getpid()		rb_w32_getpid()
-#define sleep(x)		rb_w32_sleep((x)*1000)
+#define sleep(x)		rb_w32_msleep((x)*1000)
+#define Sleep(msec)		(void)rb_w32_msleep(msec)
 #ifdef __BORLANDC__
 #define creat(p, m)		_creat(p, m)
@@ -105,5 +104,4 @@ extern "C++" {
 #define mktemp(t)		_mktemp(t)
 #define tell(h)			_tell(h)
-#define unlink(p)		_unlink(p)
 #define write(h, b, l)		_write(h, b, l)
 #define _open			_sopen
@@ -119,5 +117,4 @@ extern "C++" {
 #endif
 
-#define fsync(h)		_commit(h)
 #undef stat
 #define stat(path,st)		rb_w32_stat(path,st)
@@ -136,4 +133,8 @@ extern "C++" {
 #define unlink(p)		rb_w32_unlink(p)
 
+#define strcasecmp(s1, s2)	stricmp(s1, s2)
+#define strncasecmp(s1, s2, n)	strnicmp(s1, s2, n)
+#define fsync(h)		_commit(h)
+
 #ifdef __MINGW32__
 struct timezone {
@@ -147,31 +148,31 @@ extern rb_pid_t  rb_w32_pipe_exec(const 
 extern int    flock(int fd, int oper);
 extern int    rb_w32_is_socket(int);
-extern int    rb_w32_accept(int, struct sockaddr *, int *);
-extern int    rb_w32_bind(int, const struct sockaddr *, int);
-extern int    rb_w32_connect(int, const struct sockaddr *, int);
+extern int    WSAAPI rb_w32_accept(int, struct sockaddr *, int *);
+extern int    WSAAPI rb_w32_bind(int, const struct sockaddr *, int);
+extern int    WSAAPI rb_w32_connect(int, const struct sockaddr *, int);
 extern void   rb_w32_fdset(int, fd_set*);
 extern void   rb_w32_fdclr(int, fd_set*);
 extern int    rb_w32_fdisset(int, fd_set*);
-extern long   rb_w32_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
-extern int    rb_w32_getpeername(int, struct sockaddr *, int *);
-extern int    rb_w32_getsockname(int, struct sockaddr *, int *);
-extern int    rb_w32_getsockopt(int, int, int, char *, int *);
-extern int    rb_w32_ioctlsocket(int, long, u_long *);
-extern int    rb_w32_listen(int, int);
-extern int    rb_w32_recv(int, char *, int, int);
-extern int    rb_w32_recvfrom(int, char *, int, int, struct sockaddr *, int *);
-extern int    rb_w32_send(int, const char *, int, int);
-extern int    rb_w32_sendto(int, const char *, int, int, const struct sockaddr *, int);
-extern int    rb_w32_setsockopt(int, int, int, const char *, int);
-extern int    rb_w32_shutdown(int, int);
-extern int    rb_w32_socket(int, int, int);
+extern int    WSAAPI rb_w32_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
+extern int    WSAAPI rb_w32_getpeername(int, struct sockaddr *, int *);
+extern int    WSAAPI rb_w32_getsockname(int, struct sockaddr *, int *);
+extern int    WSAAPI rb_w32_getsockopt(int, int, int, char *, int *);
+extern int    WSAAPI rb_w32_ioctlsocket(int, long, u_long *);
+extern int    WSAAPI rb_w32_listen(int, int);
+extern int    WSAAPI rb_w32_recv(int, char *, int, int);
+extern int    WSAAPI rb_w32_recvfrom(int, char *, int, int, struct sockaddr *, int *);
+extern int    WSAAPI rb_w32_send(int, const char *, int, int);
+extern int    WSAAPI rb_w32_sendto(int, const char *, int, int, const struct sockaddr *, int);
+extern int    WSAAPI rb_w32_setsockopt(int, int, int, const char *, int);
+extern int    WSAAPI rb_w32_shutdown(int, int);
+extern int    WSAAPI rb_w32_socket(int, int, int);
 extern SOCKET rb_w32_get_osfhandle(int);
-extern struct hostent * rb_w32_gethostbyaddr(const char *, int, int);
-extern struct hostent * rb_w32_gethostbyname(const char *);
-extern int    rb_w32_gethostname(char *, int);
-extern struct protoent * rb_w32_getprotobyname(const char *);
-extern struct protoent * rb_w32_getprotobynumber(int);
-extern struct servent  * rb_w32_getservbyname(const char *, const char *);
-extern struct servent  * rb_w32_getservbyport(int, const char *);
+extern struct hostent *WSAAPI rb_w32_gethostbyaddr(const char *, int, int);
+extern struct hostent *WSAAPI rb_w32_gethostbyname(const char *);
+extern int    WSAAPI rb_w32_gethostname(char *, int);
+extern struct protoent *WSAAPI rb_w32_getprotobyname(const char *);
+extern struct protoent *WSAAPI rb_w32_getprotobynumber(int);
+extern struct servent  *WSAAPI rb_w32_getservbyname(const char *, const char *);
+extern struct servent  *WSAAPI rb_w32_getservbyport(int, const char *);
 extern int    rb_w32_socketpair(int, int, int, int *);
 extern char * rb_w32_getenv(const char *);
@@ -289,5 +290,7 @@ extern int       setgid (rb_gid_t);
 extern char *rb_w32_strerror(int);
 
+#ifdef RUBY_EXPORT
 #define strerror(e) rb_w32_strerror(e)
+#endif
 
 #define PIPE_BUF 1024
@@ -352,19 +355,4 @@ extern char *rb_w32_strerror(int);
 #define O_NONBLOCK 1
 
-#ifdef accept
-#undef accept
-#endif
-#define accept(s, a, l)		rb_w32_accept(s, a, l)
-
-#ifdef bind
-#undef bind
-#endif
-#define bind(s, a, l)		rb_w32_bind(s, a, l)
-
-#ifdef connect
-#undef connect
-#endif
-#define connect(s, a, l)	rb_w32_connect(s, a, l)
-
 #undef FD_SET
 #define FD_SET(f, s)		rb_w32_fdset(f, s)
@@ -376,127 +364,93 @@ extern char *rb_w32_strerror(int);
 #define FD_ISSET(f, s)		rb_w32_fdisset(f, s)
 
+#ifdef RUBY_EXPORT
+#undef accept
+#define accept(s, a, l)		rb_w32_accept(s, a, l)
+
+#undef bind
+#define bind(s, a, l)		rb_w32_bind(s, a, l)
+
+#undef connect
+#define connect(s, a, l)	rb_w32_connect(s, a, l)
+
 #undef select
 #define select(n, r, w, e, t)	rb_w32_select(n, r, w, e, t)
 
-#ifdef getpeername
 #undef getpeername
-#endif
 #define getpeername(s, a, l)	rb_w32_getpeername(s, a, l)
 
-#ifdef getsockname
 #undef getsockname
-#endif
 #define getsockname(s, a, l)	rb_w32_getsockname(s, a, l)
 
-#ifdef getsockopt
 #undef getsockopt
-#endif
 #define getsockopt(s, v, n, o, l) rb_w32_getsockopt(s, v, n, o, l)
 
-#ifdef ioctlsocket
 #undef ioctlsocket
-#endif
 #define ioctlsocket(s, c, a)	rb_w32_ioctlsocket(s, c, a)
 
-#ifdef listen
 #undef listen
-#endif
 #define listen(s, b)		rb_w32_listen(s, b)
 
-#ifdef recv
 #undef recv
-#endif
 #define recv(s, b, l, f)	rb_w32_recv(s, b, l, f)
 
-#ifdef recvfrom
 #undef recvfrom
-#endif
 #define recvfrom(s, b, l, f, fr, frl) rb_w32_recvfrom(s, b, l, f, fr, frl)
 
-#ifdef send
 #undef send
-#endif
 #define send(s, b, l, f)	rb_w32_send(s, b, l, f)
 
-#ifdef sendto
 #undef sendto
-#endif
 #define sendto(s, b, l, f, t, tl) rb_w32_sendto(s, b, l, f, t, tl)
 
-#ifdef setsockopt
 #undef setsockopt
-#endif
 #define setsockopt(s, v, n, o, l) rb_w32_setsockopt(s, v, n, o, l)
 
-#ifdef shutdown
 #undef shutdown
-#endif
 #define shutdown(s, h)		rb_w32_shutdown(s, h)
 
-#ifdef socket
 #undef socket
-#endif
 #define socket(s, t, p)		rb_w32_socket(s, t, p)
 
-#ifdef gethostbyaddr
 #undef gethostbyaddr
-#endif
 #define gethostbyaddr(a, l, t)	rb_w32_gethostbyaddr(a, l, t)
 
-#ifdef gethostbyname
 #undef gethostbyname
-#endif
 #define gethostbyname(n)	rb_w32_gethostbyname(n)
 
-#ifdef gethostname
 #undef gethostname
-#endif
 #define gethostname(n, l)	rb_w32_gethostname(n, l)
 
-#ifdef getprotobyname
 #undef getprotobyname
-#endif
 #define getprotobyname(n)	rb_w32_getprotobyname(n)
 
-#ifdef getprotobynumber
 #undef getprotobynumber
-#endif
 #define getprotobynumber(n)	rb_w32_getprotobynumber(n)
 
-#ifdef getservbyname
 #undef getservbyname
-#endif
 #define getservbyname(n, p)	rb_w32_getservbyname(n, p)
 
-#ifdef getservbyport
 #undef getservbyport
-#endif
 #define getservbyport(p, pr)	rb_w32_getservbyport(p, pr)
 
-#ifdef socketpair
 #undef socketpair
-#endif
 #define socketpair(a, t, p, s)	rb_w32_socketpair(a, t, p, s)
 
-#ifdef get_osfhandle
 #undef get_osfhandle
-#endif
 #define get_osfhandle(h)	rb_w32_get_osfhandle(h)
 
-#ifdef getcwd
 #undef getcwd
-#endif
 #define getcwd(b, s)		rb_w32_getcwd(b, s)
 
-#ifdef getenv
 #undef getenv
-#endif
 #define getenv(n)		rb_w32_getenv(n)
 
-#ifdef rename
 #undef rename
-#endif
 #define rename(o, n)		rb_w32_rename(o, n)
 
+#undef times
+#define times(t)		rb_w32_times(t)
+#endif
+
 struct tms {
 	long	tms_utime;
@@ -506,8 +460,4 @@ struct tms {
 };
 
-#ifdef times
-#undef times
-#endif
-#define times(t) rb_w32_times(t)
 int rb_w32_times(struct tms *);
 
@@ -523,5 +473,5 @@ int  rb_w32_close(int);
 int  rb_w32_fclose(FILE*);
 int  rb_w32_utime(const char *, const struct utimbuf *);
-#define Sleep(msec) (void)rb_w32_sleep(msec)
+int  WINAPI rb_w32_msleep(unsigned long msec);
 
 /*
Index: wince/Makefile.sub
===================================================================
RCS file: /cvs/ruby/src/ruby/wince/Makefile.sub,v
retrieving revision 1.45
diff -U2 -p -r1.45 Makefile.sub
--- wince/Makefile.sub	25 Oct 2005 16:59:18 -0000	1.45
+++ wince/Makefile.sub	26 Oct 2005 00:40:31 -0000
@@ -443,5 +443,5 @@ $(LIBRUBY):	$(RUBYDEF)
 $(LIBRUBY_SO):	$(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res
 		@echo. $(DLDOBJS)
-		$(LDSHARED) $(MAINOBJ) $(DLDOBJS) $(LIBRUBY_A) \
+		$(LDSHARED) $(INITOBJS) $(DLDOBJS) $(LIBRUBY_A) \
 			$(RUBY_SO_NAME).res $(LIBS) -Fe$@ $(LDFLAGS) \
 			$(LIBRUBY_DLDFLAGS)


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

In This Thread