w3m, v0.5.3, fails to build with glibc, v2.14 (and probably versions thereafter). The error which occurs is as follows:
(echo '#define DEFUN(x,y,z) x y';\
sed -ne '/^DEFUN/{p;n;/^[ ]/p;}' ./main.c ./menu.c) | gcc -E - | \
awk '$1 ~ /^[_A-Za-z]/ { \
for (i=2;i<=NF;i++) { print $i, $1} \
}' > funcname.tab.tmp
funcname.tab updated
sort funcname.tab | gawk -f ./funcname1.awk > funcname1.h
gcc -I. -I. -O2 -fPIC -I./libwc -DHAVE_CONFIG_H -DAUXBIN_DIR=\"/usr/libexec/w3m\" -DCGIBIN_DIR=\"/usr/libexec/w3m/cgi-bin\" -DHELP_DIR=\"/usr/share/w3m\" -DETC_DIR=\"/etc\" -DCONF_DIR=\"/etc/w3m\" -DRC_DIR=\"~/.w3m\" -DLOCALEDIR=\"/usr/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'
/usr/include/bits/fcntl.h:254:8: note: originally defined here
A patch against the istream.{h,c} files is attached.
Diff of istream.{h,c} to deal with file_handle error
Fixed the version of glibc against which the w3m build breaks.
Forgot to mention what my system is running (just in case one or more of the below is contributing to the problem).
slackware-current x86_64
kernel-2.6.38.7
glibc-2.14.1
gcc-4.5.3
autoconf-2.68
auotmake-1.11.1
m4-1.4.16
make-3.82
Same as https://sourceforge.net/p/w3m/patches/62/.
Fixed in Debian w3m 0.5.3-6.
http://anonscm.debian.org/gitweb/?p=collab-maint/w3m.git