diff options
Diffstat (limited to '')
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | Str.c | 3 | ||||
-rw-r--r-- | config.h.dist | 1 | ||||
-rwxr-xr-x | configure | 48 | ||||
-rw-r--r-- | mktable.c | 12 |
5 files changed, 69 insertions, 11 deletions
@@ -1,3 +1,17 @@ +2001-12-22 Fumitoshi UKAI <ukai@debian.or.jp> + + * [w3m-dev 02692] w3m on linux/ia64 + * mktable.c: #include "config.h" + * mktable.c: #include "stdint.h" or uintptr_t typedef + * mktable.c: use uintptr_t instead of unsigned int + * configure: check pthread on linux + * configure: add gc_cflags for linux/ia64,alpha,s390 + * configure: check stdint.h + * configure (config.h): add $pthreadlib to GCLIB + * configure (config.h): add $def_have_stdint_h + * config.h.dist (HAVE_STDINT_H): added + * Str.c: add #include <stdlib.h> for exit() on some platform (ia64) + 2001-12-22 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp> * [w3m-dev 02690] RC_DIR in scripts @@ -1405,4 +1419,4 @@ * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.157 2001/12/21 20:30:54 ukai Exp $ +$Id: ChangeLog,v 1.158 2001/12/21 21:37:12 ukai Exp $ @@ -1,4 +1,4 @@ -/* $Id: Str.c,v 1.6 2001/11/29 09:34:14 ukai Exp $ */ +/* $Id: Str.c,v 1.7 2001/12/21 21:37:12 ukai Exp $ */ /* * String manipulation library for Boehm GC * @@ -14,6 +14,7 @@ * results obtained from use of this software. */ #include <stdio.h> +#include <stdlib.h> #include <gc.h> #include <stdarg.h> #include <string.h> diff --git a/config.h.dist b/config.h.dist index 64307e9..f539069 100644 --- a/config.h.dist +++ b/config.h.dist @@ -174,6 +174,7 @@ MODEL=Linux.i686-monster-ja #define JMP_BUF sigjmp_buf #define HAVE_FLOAT_H #define HAVE_SYS_SELECT_H +#undef HAVE_STDINT_H typedef void MySignalHandler; #define SIGNAL_ARG int _dummy @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: configure,v 1.43 2001/12/21 20:30:54 ukai Exp $ +# $Id: configure,v 1.44 2001/12/21 21:37:12 ukai Exp $ # Configuration. # @@ -945,6 +945,22 @@ else inflate= fi +## Search pthread, Linux requires this (at least ia64,alpha,s390?). +## Other platform? +pthreadlib= +case $sysname in +Linux|linux|LINUX) + for tlibdir in /lib /usr/lib + do + if [ -f $tlibdir/libpthread.a -o -f $tlibdir/libpthread.$so_ext ]; then + echo "$tlibdir/libpthread found" + pthreadlib="-L$tlibdir -lpthread" + break + fi + done + ;; +esac + gclib='' gcinclude='' gctarget='' @@ -1045,19 +1061,22 @@ if [ -z "$gclib" -o -z "$gcinclude" ]; then gctarget="$gclib" fi -# Apply patch. +# arch specific flags for libgc gc_cflags='' -if [ "$gclib" = "gc/gc.a" -a ! -f patch_done ]; then +if [ "$gclib" = "gc/gc.a" ]; then patchfile="" case "$platform:$sysname" in + ia64:Linux|alpha:Linux|s390*:Linux) + gc_cflags="-DGC_LINUX_THREADS -D_REENTRANT" + ;; R3000:*System_V*|R4000:UNIX_SYSV|R*000:UNIX_SV) # EWS-4800 # patchfile=Patches/ews4800 gc_cflags=-Dmips ;; esac - - if [ -n "$patchfile" -a -f "$patchfile" ]; then + # Apply patch. + if [ ! -f patch_done -a -n "$patchfile" -a -f "$patchfile" ]; then patch -lp0 < $patchfile echo "dpatch='$patch'" >> config.param touch patch_done @@ -1682,6 +1701,22 @@ else def_have_sys_select_h='#undef HAVE_SYS_SELECT_H' fi +####### check for stdint.h +cat > _zmachdep.c <<EOF +#include <stdint.h> +main() +{ + ; +} +EOF +if $cc $cflags -c _zmachdep.c > /dev/null 2>&1 +then + echo "You have stdint.h." + def_have_stdint_h='#define HAVE_STDINT_H' +else + def_have_stdint_h='#undef HAVE_STDINT_H' +fi + ####### setpgrp(pid, pgrp) or setpgrp() ? cat > _zmachdep.c << EOF #include <unistd.h> @@ -1965,7 +2000,7 @@ Z_CFLAGS=$z_cflags ZLIB=$zlib EXT_TARGETS=\$(BOOKMARKER) \$(HELPER) $inflate GC_CFLAGS=$gc_cflags -GCLIB=$gclib +GCLIB=$gclib $pthreadlib GCTARGET=$gctarget RANLIB=$ranlib_cmd MKDIR=$MKDIR @@ -2056,6 +2091,7 @@ $def_longjmp $def_jmpbuf $def_have_float_h $def_have_sys_select_h +$def_have_stdint_h $def_sighandler $def_sig_arg @@ -1,7 +1,13 @@ -/* $Id: mktable.c,v 1.3 2001/11/24 02:01:26 ukai Exp $ */ +/* $Id: mktable.c,v 1.4 2001/12/21 21:37:12 ukai Exp $ */ +#include "config.h" #include <stdio.h> #include <stdlib.h> #include <ctype.h> +#ifdef HAVE_STDINT_H +#include "stdint.h" +#else +typedef unsigned int uintptr_t; +#endif #include "hash.h" #include "Str.h" #include <gc.h> @@ -10,9 +16,9 @@ defhash(HashItem_ss *, int, hss_i) #define keycomp(x,y) ((x)==(y)) - static unsigned int hashfunc(HashItem_ss * x) + static uintptr_t hashfunc(HashItem_ss * x) { - return (unsigned int)x; + return (uintptr_t)x; } defhashfunc(HashItem_ss *, int, hss_i) |