[#31166] is_ruby_native_thread() — Masahiro Sakai (酒井政裕) <masahiro.sakai@...>

酒井です。

16 messages 2007/07/08
[#31269] Re: is_ruby_native_thread() — Nobuyoshi Nakada <nobu@...> 2007/07/21

なかだです。

[#31270] Re: is_ruby_native_thread() — Hidetoshi NAGAI <nagai@...> 2007/07/22

永井@知能.九工大です.

[#31298] retryの使い方 — eklerni <eklerni@...>

松尾といいます。

52 messages 2007/07/25
[#31299] Re: retryの使い方 — SASADA Koichi <ko1@...> 2007/07/26

 ささだです。

[#31300] Re: retryの使い方 — eklerni <eklerni@...> 2007/07/26

松尾です、返信ありがとうございます。

[#31303] Re: retryの使い方 — Yugui <yugui@...> 2007/07/26

Yuguiといいます。

[#31306] Re: retryの使い方 — eklerni <eklerni@...> 2007/07/26

松尾といいます。

[#31308] Re: retryの使い方 — Tanaka Akira <akr@...> 2007/07/26

In article <46A909DD.1070405@for.mail-box.ne.jp>,

[#31310] Re: retryの使い方 — eklerni <eklerni@...> 2007/07/26

Tanaka Akira さんは書きました:

[#31314] Re: retryの使い方 — Tanaka Akira <akr@...> 2007/07/30

In article <46A92530.80507@for.mail-box.ne.jp>,

[#31315] Re: retryの使い方 — eklerni <eklerni@...> 2007/07/30

Tanaka Akira さんは書きました:

[#31316] Re: retryの使い方 — Tanaka Akira <akr@...> 2007/07/30

In article <46AD7A16.8080509@for.mail-box.ne.jp>,

[#31317] Re: retryの使い方 — eklerni <eklerni@...> 2007/07/31

松尾です。

[#31381] Re: retryの使い方 — SASADA Koichi <ko1@...> 2007/08/12

 ささだです。

[#31422] Re: retryの使い方 — Yukihiro Matsumoto <matz@...> 2007/08/15

まつもと ゆきひろです

[#31425] Re: retryの使い方 — Tanaka Akira <akr@...> 2007/08/15

In article <E1ILDTi-0005T6-Be@x31>,

[#31426] Re: retryの使い方 — Yukihiro Matsumoto <matz@...> 2007/08/15

まつもと ゆきひろです

[#31433] Re: retryの使い方 — Tanaka Akira <akr@...> 2007/08/16

In article <E1ILKn6-0003Nv-0f@x31>,

[#31435] Re: retryの使い方 — Yukihiro Matsumoto <matz@...> 2007/08/16

まつもと ゆきひろです

[#31447] Re: retryの使い方 — Tanaka Akira <akr@...> 2007/08/16

In article <E1ILVN9-0006xJ-7I@x31>,

[#31450] Re: retryの使い方 — Tanaka Akira <akr@...> 2007/08/17

In article <E1ILq4x-0002Bs-Lg@x31>,

[#31451] Re: retryの使い方 — Yukihiro Matsumoto <matz@...> 2007/08/17

まつもと ゆきひろです

[ruby-dev:31239] Re: trunk: バグを指摘している警告(cygwin)

From: pegacorn <subscriber.jp@...>
Date: 2007-07-16 12:23:01 UTC
List: ruby-dev #31239
 From: pegacorn <subscriber.jp@gmail.com>
 Date: Sat, 14 Jul 2007 20:00:01 +0900
 Message-Id: <20070714.195544.63132606.subscriber.jp@gmail.com>
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> trunk で -Wall を付けてコンパイルしてみると、バグを指摘している警告が
> いくつか見付かりました。

今度は、cygwin 環境で -Wall を付けてコンパイルしてみました。

gcc -g -O2 -Wall   -I. -I.ext/include/i386-cygwin -I./include -I.  -DRUBY_EXPORT  -c dln.c
dln.c: In function `conv_to_posix_path':
dln.c:1615: warning: implicit declaration of function `cygwin32_conv_to_posix_path'
gcc -g -O2 -Wall   -I. -I.ext/include/i386-cygwin -I./include -I.  -DRUBY_EXPORT  -c file.c
file.c: In function `rb_thread_flock':
file.c:3102: warning: implicit declaration of function `GetLastError'
gcc -g -O2 -Wall   -I. -I.ext/include/i386-cygwin -I./include -I.  -DRUBY_EXPORT  -c ruby.c
ruby.c: In function `ruby_push_include':
ruby.c:190: warning: implicit declaration of function `conv_to_posix_path'
gcc -g -O2 -Wall   -I. -I.ext/include/i386-cygwin -I./include -I.  -DRUBY_EXPORT  -c ./missing/strftime.c
./missing/strftime.c: In function `strftime':
./missing/strftime.c:448: warning: int format, long int arg (arg 3)
./missing/strftime.c:448: warning: int format, long int arg (arg 4)
compiling Win32API
gcc -I. -I../../.ext/include/i386-cygwin -I../.././include -I../.././ext/Win32API -DRUBY_EXTCONF_H=\"extconf.h\"  -g -O2 -Wall   -c Win32API.c
Win32API.c: In function `Win32API_initialize':
Win32API.c:111: warning: int format, long int arg (arg 3)
compiling socket
gcc -I. -I../../.ext/include/i386-cygwin -I../.././include -I../.././ext/socket -DRUBY_EXTCONF_H=\"extconf.h\" -I.  -g -O2 -Wall   -c getnameinfo.c
getnameinfo.c: In function `inet_ntop':
getnameinfo.c:126: warning: implicit declaration of function `snprintf'
compiling tk
gcc -I. -I../../.ext/include/i386-cygwin -I../.././include -I../.././ext/tk -DRUBY_EXTCONF_H=\"extconf.h\"  -D_WIN32 -DWITH_TCL_ENABLE_THREAD=0 -g -O2 -Wall   -c tcltklib.c
tcltklib.c: In function `eventloop_sleep':
tcltklib.c:1262: warning: implicit declaration of function `is_ruby_native_thread'
tcltklib.c: In function `ip_finalize':
tcltklib.c:4411: warning: long unsigned int format, pointer arg (arg 3)
compiling win32ole
gcc -I. -I../../.ext/include/i386-cygwin -I../.././include -I../.././ext/win32ole -DRUBY_EXTCONF_H=\"extconf.h\"  -g -O2 -Wall   -c win32ole.c
win32ole.c: In function `lcid_installed':
win32ole.c:2644: warning: unsigned int format, LCID arg (arg 4)


Index: dln.c
===================================================================
--- dln.c	(revision 12800)
+++ dln.c	(working copy)
@@ -69,6 +69,10 @@
 char *getenv();
 #endif
 
+#ifdef __CYGWIN32__
+#include <sys/cygwin.h>
+#endif
+
 #if defined(__VMS)
 #pragma builtins
 #include <dlfcn.h>
@@ -1602,21 +1606,23 @@
 
 #if defined(__CYGWIN32__)
 const char *
-conv_to_posix_path(char *win32, char *posix, int len)
+conv_to_posix_path(const char *win32, char *posix, int len)
 {
-    char *first = win32;
-    char *p = win32;
+    char *first;
+    char *p;
     char *dst = posix;
 
+    first = alloca(strlen(win32)+1);
+    strcpy(first, win32);
+
     posix[0] = '\0';
-    for (p = win32; *p; p++)
+    for (p = first; *p; p++)
 	if (*p == ';') {
 	    *p = 0;
 	    cygwin32_conv_to_posix_path(first, posix);
 	    posix += strlen(posix);
 	    *posix++ = ':';
 	    first = p + 1;
-	    *p = ';';
 	}
     if (len < strlen(first))
 	fprintf(stderr, "PATH length too long: %s\n", first);
Index: dln.h
===================================================================
--- dln.h	(revision 12800)
+++ dln.h	(working copy)
@@ -31,6 +31,9 @@
 
 char *dln_find_exe(const char*,const char*);
 char *dln_find_file(const char*,const char*);
+#ifdef __CYGWIN32__
+const char *conv_to_posix_path(const char *, char *, int);
+#endif
 
 #ifdef USE_DLN_A_OUT
 extern char *dln_argv0;
Index: ext/socket/getnameinfo.c
===================================================================
--- ext/socket/getnameinfo.c	(revision 12800)
+++ ext/socket/getnameinfo.c	(working copy)
@@ -62,6 +62,9 @@
 #include <stdio.h>
 #define snprintf _snprintf
 #endif
+#ifdef __CYGWIN__
+#include <stdio.h>
+#endif
 
 #include <string.h>
 #include <stddef.h>
Index: ext/tk/tcltklib.c
===================================================================
--- ext/tk/tcltklib.c	(revision 12800)
+++ ext/tk/tcltklib.c	(working copy)
@@ -4408,13 +4408,13 @@
     }
 
     if (Tcl_InterpDeleted(ip)) {
-        DUMP2("ip(%lx) is already deleted", ip);
+        DUMP2("ip(%p) is already deleted", ip);
         return;
     }
 
 #if TCL_NAMESPACE_DEBUG
     if (ip_null_namespace(ip)) {
-        DUMP2("ip(%lx) has null namespace", ip);
+        DUMP2("ip(%p) has null namespace", ip);
         return;
     }
 #endif
Index: ext/Win32API/Win32API.c
===================================================================
--- ext/Win32API/Win32API.c	(revision 12800)
+++ ext/Win32API/Win32API.c	(working copy)
@@ -108,7 +108,7 @@
     }
 
     if (16 < RARRAY_LEN(a_import)) {
-	rb_raise(rb_eRuntimeError, "too many parameters: %d\n", RARRAY_LEN(a_import));
+	rb_raise(rb_eRuntimeError, "too many parameters: %ld\n", RARRAY_LEN(a_import));
     }
 
     rb_iv_set(self, "__import__", a_import);
Index: ext/win32ole/win32ole.c
===================================================================
--- ext/win32ole/win32ole.c	(revision 12800)
+++ ext/win32ole/win32ole.c	(working copy)
@@ -2641,7 +2641,7 @@
 lcid_installed(LCID lcid)
 {
     g_lcid_installed = FALSE;
-    snprintf(g_lcid_to_check, sizeof(g_lcid_to_check), "%08x", lcid);
+    snprintf(g_lcid_to_check, sizeof(g_lcid_to_check), "%08lx", lcid);
     EnumSystemLocales(installed_lcid_proc, LCID_INSTALLED);
     return g_lcid_installed;
 }
Index: file.c
===================================================================
--- file.c	(revision 12800)
+++ file.c	(working copy)
@@ -66,6 +66,11 @@
 #define lstat stat
 #endif
 
+#ifdef __CYGWIN__
+#include <windows.h>
+#include <winerror.h>
+#endif
+
 #ifdef __BEOS__ /* should not change ID if -1 */
 static int
 be_chown(const char *path, uid_t owner, gid_t group)
@@ -2215,7 +2220,6 @@
 #endif
     if (rename(src, dst) < 0) {
 #if defined __CYGWIN__
-	extern unsigned long __attribute__((stdcall)) GetLastError(void);
 	if (errno == 0) {	/* This is a bug of old Cygwin */
 	    /* incorrect as cygwin errno, but the last resort */
 	    errno = GetLastError();
@@ -3086,10 +3090,6 @@
 #  define LOCK_UN 8
 # endif
 
-#ifdef __CYGWIN__
-#include <winerror.h>
-#endif
-
 static VALUE
 rb_thread_flock(rb_thread_t *th, void *data)
 {
Index: include/ruby/intern.h
===================================================================
--- include/ruby/intern.h	(revision 12800)
+++ include/ruby/intern.h	(working copy)
@@ -279,6 +279,7 @@
 VALUE rb_thread_local_aset(VALUE, ID, VALUE);
 void rb_thread_atfork(void);
 VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE);
+VALUE is_ruby_native_thread(void);
 /* file.c */
 VALUE rb_file_s_expand_path(int, VALUE *);
 VALUE rb_file_expand_path(VALUE, VALUE);
Index: missing/strftime.c
===================================================================
--- missing/strftime.c	(revision 12800)
+++ missing/strftime.c	(working copy)
@@ -445,7 +445,7 @@
 			} else {
 				tbuf[0] = '+';
 			}
-			sprintf(tbuf+1, "%02d%02d", off/60, off%60);
+			sprintf(tbuf+1, "%02ld%02ld", off/60, off%60);
 			break;
 #endif /* MAILHEADER_EXT */
 


--
pegacorn

In This Thread