[#41278] [BUG:1.9] BINARY should not be ASCII-compatible — Yugui <yugui@...>

WXVndWkbJEIkRyQ5ISMbKEIKCgo+IBskQiRHISIkKiQqJGAkTSQzJDMkXiRHJE41RE9AJEclKyVQ

15 messages 2010/05/11

[#41407] [Bug #3339] win32ole test failure — Usaku NAKAMURA <redmine@...>

Bug #3339: win32ole test failure

20 messages 2010/05/25
[#41411] Re: [Bug #3339] win32ole test failure — Masaki Suketa <masaki.suketa@...> 2010/05/25

助田です。

[#41412] Re: [Bug #3339] win32ole test failure — "U.Nakamura" <usa@...> 2010/05/25

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

[ruby-dev:41219] [ruby_1_9_2] コンパイルエラー

From: Takahiro Kambe <taca@...>
Date: 2010-05-08 04:22:22 UTC
List: ruby-dev #41219
ruby_1_9_2ブランチのコンパイルでエラーが起きます。

gcc -I. -I.ext/include/i386-netbsdelf5.99.29 -I./include -I.   -DONIG_ENC_REGISTER=rb_enc_register -fPIC -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -pipe -o enc/cp949.o -c ./enc/cp949.c
./enc/cp949.c:56: error: 'A' undeclared here (not in a function)
./enc/cp949.c:56: error: 'F' undeclared here (not in a function)
./enc/cp949.c:68: error: expected ',' or ';' before '}' token
./enc/cp949.c: In function 'cp949_mbc_enc_len':
./enc/cp949.c:76: error: 'state_t' undeclared (first use in this function)
./enc/cp949.c:76: error: (Each undeclared identifier is reported only once
./enc/cp949.c:76: error: for each function it appears in.)
./enc/cp949.c:76: error: expected ';' before 's'
./enc/cp949.c:80: error: 's' undeclared (first use in this function)
./enc/cp949.c:80: error: 'ACCEPT' undeclared (first use in this function)
./enc/cp949.c:82: error: 'trans' undeclared (first use in this function)
*** Error code 1

Stop.
make: stopped in /usr/local/src/ruby_1_9_2
*** Error code 1
...

単純なコードの追加ミスと思います。

Index: enc/cp949.c
===================================================================
--- enc/cp949.c	(リビジョン 27668)
+++ enc/cp949.c	(作業コピー)
@@ -48,6 +48,8 @@
   2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1
 };
 
+#define A ACCEPT
+#define F FAILURE
 static const char CP949_CAN_BE_TRAIL_TABLE[256] = {
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,


ところで、この A とか F といったマクロですが、

% egrep 'define[ \t]A[ \t]' enc/*
enc/big5.c:#define A ACCEPT
enc/emacs_mule.c:#define A ACCEPT
enc/euc_jp.c:#define A ACCEPT
enc/euc_kr.c:#define A ACCEPT
enc/euc_tw.c:#define A ACCEPT
enc/gb18030.c:#define A ACCEPT
enc/gbk.c:#define A ACCEPT
enc/shift_jis.c:#define A ACCEPT
enc/utf_8.c:#define A ACCEPT

と、同じものが copy & paste されたように散在しています。何かまとめた
方が良いのではないでしょうか、今回のような誤りを防ぐ意味でも。

-- 
神戸 隆博 / Takahiro Kambe 


In This Thread

Prev Next