flagflag  If you want to see English page, please click "English" Button at Left.
1: 2017-02-18 (土) 15:17:34 macsatou ソース
Line 1: Line 1:
 +*W3mコンパイル [#j478421b]
 +CentOS7でインストールできないため、ソールからインストール。
 +**手順 [#j802e581]
 + # tar xzfv w3m-0.5.3.tar.gz
 + # cd w3m-0.5.3
 + # ./configure
 + # make
 +ここでエラー
 +
 + gcc  -I. -I. -g -O2 -I./libwc  -I/usr/local/openssl/include/openssl -I/usr/local/openssl/include  -DHAVE_CONFIG_H -DAUXBIN_DIR=\"/usr/local/libexec/w3m\" -DCGIBIN_DIR=\"/usr/local/libexec/w3m/cgi-bin\" -DHELP_DIR=\"/usr/local/share/w3m\" -DETC_DIR=\"/usr/local/etc\" -DCONF_DIR=\"/usr/local/etc/w3m\" -DRC_DIR=\"~/.w3m\" -DLOCALEDIR=\"/usr/local/share/locale\"  -c -o main.o main.c
 + In file included from html.h:10:0,
 +                 from fm.h:39,
 +                 from main.c:3:
 + istream.h:23:8: error: redefinition of 'struct file_handle'
 +  struct file_handle {
 +         ^
 + In file included from /usr/include/bits/fcntl.h:61:0,
 +                 from /usr/include/fcntl.h:35,
 +                 from istream.h:14,
 +                 from html.h:10,
 +                 from fm.h:39,
 +                 from main.c:3:
 + /usr/include/bits/fcntl-linux.h:300​:8: note: originally defined here
 +  struct file_handle
 +         ^
 + main.c: In function 'main':
 + main.c:836:23: error: void value not ignored as it ought to be
 +     orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc);
 +                       ^
 + main.c: In function 'getChar':
 + main.c:2264:5: warning: passing argument 1 of 'wtf_parse1' from incompatible pointer type [enabled by default]
 +     return wc_any_to_ucs(wtf_parse1(&p));
 +     ^
 + In file included from fm.h:44:0,
 +                 from main.c:3:
 + ./libwc/wtf.h:71:19: note: expected 'wc_uchar **' but argument is of type 'char **'
 +  extern wc_wchar_t wtf_parse1(wc_uchar **p);
 +                   ^
 + gmake: *** [main.o] Error 1
 +
 +調べた結果以下を参照し、パッチをDL
 +https://build.opensuse.org/package/view_​file?file=w3m-fh-def.patch&package=w3m&p​roject=network&rev=02bc48adba1f62318d8c9​3eacb2aaab6
 +
 + --- istream.c.orig
 + +++ istream.c
 + @@ -22,8 +22,8 @@
 +  static void basic_close(int *handle);
 +  static int basic_read(int *handle, char *buf, int len);
 +
 + -static void file_close(struct file_handle *handle);
 + -static int file_read(struct file_handle *handle, char *buf, int len);
 + +static void file_close(struct w3m_file_handle *handle);
 + +static int file_read(struct w3m_file_handle *handle, char *buf, int len);
 +
 +  static int str_read(Str handle, char *buf, int len);
 +
 + @@ -114,7 +114,7 @@ newFileStream(FILE * f, void (*closep) (
 +     stream = New(union input_stream);
 +     init_base_stream(&stream->base, STREAM_BUF_SIZE);
 +     stream->file.type = IST_FILE;
 + -    stream->file.handle = New(struct file_handle);
 + +    stream->file.handle = New(struct w3m_file_handle);
 +     stream->file.handle->f = f;
 +     if (closep)
 +  stream->file.handle->close = closep;
 + @@ -658,13 +658,13 @@ basic_read(int *handle, char *buf, int l
 +  }
 +
 +  static void
 + -file_close(struct file_handle *handle)
 + +file_close(struct w3m_file_handle *handle)
 +  {
 +     handle->close(handle->f);
 +  }
 +
 +  static int
 + -file_read(struct file_handle *handle, char *buf, int len)
 + +file_read(struct w3m_file_handle *handle, char *buf, int len)
 +  {
 +     return fread(buf, 1, len, handle->f);
 +  }
 + --- istream.h.orig
 + +++ istream.h
 + @@ -20,7 +20,7 @@ struct stream_buffer {
 +
 +  typedef struct stream_buffer *StreamBuffer;
 +
 + -struct file_handle {
 + +struct w3m_file_handle {
 +     FILE *f;
 +     void (*close) ();
 +  };
 + @@ -53,7 +53,7 @@ struct base_stream {
 +
 +  struct file_stream {
 +     struct stream_buffer stream;
 + -    struct file_handle *handle;
 + +    struct w3m_file_handle *handle;
 +     char type;
 +     char iseos;
 +     int (*read) ();
 +
 +https://lists.freebsd.org/pipermail/svn-​ports-head/2013-October/032845.html
 +
 + --- www/w3m/files/patch-main.c (revision 0)
 + +++ www/w3m/files/patch-main.c (working copy)
 + @@ -0,0 +1,15 @@
 + +--- main.c
 + ++++ main.c
 + +@@ -833,7 +833,12 @@ main(int argc, char **argv, char **envp)
 + +    mySignal(SIGPIPE, SigPipe);
 + + #endif
 + +
 + ++#if GC_VERSION_MAJOR >= 7 && GC_VERSION_MINOR >= 2
 + ++    orig_GC_warn_proc = GC_get_warn_proc();
 + ++    GC_set_warn_proc(wrap_GC_warn_proc);
 + ++#else
 + +    orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc);
 + ++#endif
 + +    err_msg = Strnew();
 + +    if (load_argc == 0) {
 + + /* no URL specified */


トップ   新規 ページ一覧 単語検索 最終更新   ヘルプ   最終更新のRSS 1.0 最終更新のRSS 2.0 最終更新のRSS Atom

サイト内 検索

ログイン

ユーザー名:

パスワード:


パスワード紛失
新規登録

サブ メニュー

ミニカレンダー

前月2024年 5月翌月
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
<今日>

オンライン状況

89 人のユーザが現在オンラインです。 (17 人のユーザが xpwiki を参照しています。)

登録ユーザ: 0
ゲスト: 89

もっと...

アクセスカウンタ

今日 : 9089908990899089
昨日 : 1412914129141291412914129
総計 : 2345469923454699234546992345469923454699234546992345469923454699
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com