[#31143] m {|(*,(*)),|} — Tanaka Akira <akr@...>
m {|(*,(*)),|} で SEGV します。
[#31164] ruby_set_current_source remains in intern.h — Masahiro Sakai (酒井政裕) <masahiro.sakai@...>
酒井です。
[#31166] is_ruby_native_thread() — Masahiro Sakai (酒井政裕) <masahiro.sakai@...>
酒井です。
なかだです。
永井@知能.九工大です.
なかだです。
永井@知能.九工大です.
ささだです。
[#31168] 構造体オブジェクトのcloneメソッド呼び出しでメモリリーク発生 — m-ohkubo@... (Mitsuhiko OHKUBO)
大久保といいます。はじめまして。
なかだです。
大久保です。よろしくお願いします。
[#31190] 0x3fffffffffffffff.succ — Tanaka Akira <akr@...>
LP64 環境で 0x3fffffffffffffff.succ が -4611686018427387904
[#31214] Warning: OpenSSL::PKCS7::PKCS7 is deprecated after Ruby 1.9; use OpenSSL::PKCS7 instead — Kazuhiro NISHIYAMA <zn@...>
西山和広です。
[#31222] trunk: バグを指摘している警告 — pegacorn <subscriber.jp@...>
trunk で -Wall を付けてコンパイルしてみると、バグを指摘している警告が
From: pegacorn <subscriber.jp@gmail.com>
[#31242] p(65536**(1<<29)) stalls — "Yusuke ENDOH" <mame@...>
遠藤と申します。
[#31244] shift — Tanaka Akira <akr@...>
-O0 で、以下のようにすると SEGV になります。
なかだです。
In article <200707180743.l6I7hXic031558@sharui.nakada.kanuma.tochigi.jp>,
[#31285] p()#=>[] — eklerni <eklerni@...>
松尾といいます。
[#31292] ParseDate.parsedate("Tuesday, July 6th, 2007, 18:35:20 UTC") — Tanaka Akira <akr@...>
ParseDate のマニュアルにある以下の例を動かすと、示された結果
[#31298] retryの使い方 — eklerni <eklerni@...>
松尾といいます。
ささだです。
松尾です、返信ありがとうございます。
Yuguiといいます。
松尾といいます。
In article <46A909DD.1070405@for.mail-box.ne.jp>,
Tanaka Akira さんは書きました:
In article <46A92530.80507@for.mail-box.ne.jp>,
Tanaka Akira さんは書きました:
In article <46AD7A16.8080509@for.mail-box.ne.jp>,
松尾です。
ささだです。
From:eklerni
まつもと ゆきひろです
In article <E1ILDTi-0005T6-Be@x31>,
まつもと ゆきひろです
In article <E1ILKn6-0003Nv-0f@x31>,
まつもと ゆきひろです
In article <E1ILVN9-0006xJ-7I@x31>,
In article <E1ILq4x-0002Bs-Lg@x31>,
まつもと ゆきひろです
In article <E1ILweZ-00008I-Tu@x31>,
まつもと ゆきひろです
In article <E1ILyGa-0000ug-Qd@x31>,
まつもと ゆきひろです
In article <E1IM1W9-0001uC-Bz@x31>,
まつもと ゆきひろです
[ruby-dev:31239] Re: trunk: バグを指摘している警告(cygwin)
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