[Mew-dist 07910] Re: imget fsync() error with Perl5.005_54

Takeshi ITOH titou at example.com
1999年 3月 6日 (土) 15:08:18 JST


伊藤@Bitsです。

glibc2 も experimental な perl も使ってないのではずしているかも。

>>>>> 松田 == Keni Matsuda <kmatsuda at example.com> さんは
>>>>> "[Mew-dist 07880] imget fsync() error with Perl5.005_54" の中で書きました。

> 昨日何気なく Perl 5.005_54 をインストールしたところ、imls と imget が
> 以下のエラーを出して動かなくなってしまいました。(以下は適当に改行をい
> れています)
(略)
> (2) imget
>   imget: Getting new messages from local mailbox into +inbox....
>   imget: ERROR: Can't find a way to fsync(). Set NoSync=yes in your
>   Config file and be careful on file system overflow if your mail
>   folders are on NFS.

perl 5.004 -> 5.005 で ヘッダファイル中の #error の扱いが変りまし
た。perl5.004 では #error は無視されていましたが perl5.005 では 
die するようになりました。また linux では /usr/include/*.h の一部
で

#if defined(__i386__)
  あれこれ
#elif defined(__mc68000__)
  あーだこーだ
#else
# error architecture not supported by Linux C library
#endif 

のようになっているところがあります。従ってアーキテクチャ定義のマク
ロが無い場合 #error によってそれ以降のヘッダは読まれません。

解決策は

1. .ph は作らない。 .ph が無ければ im は /usr/include から値を推測
   するハズ。
2. .ph の適当なところを書き換えて __i386__ を define する。例えば

*** features.ph.org	Sat Oct 24 00:38:33 1998
--- features.ph	Sat Oct 24 00:38:28 1998
***************
*** 7,12 ****
--- 7,13 ----
      undef(&__USE_MISC) if defined(&__USE_MISC);
      undef(&__USE_GNU) if defined(&__USE_GNU);
      undef(&__FAVOR_BSD) if defined(&__FAVOR_BSD);
+ eval 'sub __i386__ (){1;}' unless defined(&__i386__);
      if((!defined( &_GNU_SOURCE)  && !defined( &__STRICT_ANSI__)  && !defined( &_POSIX_SOURCE)  && !defined( &_POSIX_C_SOURCE)  && !defined( &_BSD_SOURCE)  && !defined( &_SVID_SOURCE))) {
  	eval 'sub _GNU_SOURCE () {1;}' unless defined(&_GNU_SOURCE);
      }

linux-users で過去に教えてもらったことがあります。mew perl5.005 で 
ML検索 (たとえば http://his.ktarn.or.jp/ML/ )してみてください。

-- 
(株)ビッツ マイコン開発部ファーム課
伊藤 剛 titou at example.com





Mew-dist メーリングリストの案内