[w3m-dev 02920] don't use inttypes.h and/or stdint.h

* mktable.c: remove inttypes.h, uintptr_t, use unsigned long instead
* configure: remove inttypes.h detection
* config.h.dist: remove HAVE_INTTYPES_H
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
This commit is contained in:
Fumitoshi UKAI
2002-01-29 16:23:37 +00:00
parent 3db3a9da5f
commit 80727e4b02
4 changed files with 13 additions and 29 deletions

View File

@@ -1,3 +1,10 @@
2002-01-30 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 02920] don't use inttypes.h and/or stdint.h
* mktable.c: remove inttypes.h, uintptr_t, use unsigned long instead
* configure: remove inttypes.h detection
* config.h.dist: remove HAVE_INTTYPES_H
2002-01-29 Fumitoshi UKAI <ukai@debian.or.jp> 2002-01-29 Fumitoshi UKAI <ukai@debian.or.jp>
* [w3m-dev 02921] use inttypes.h instead of stdint.h * [w3m-dev 02921] use inttypes.h instead of stdint.h
@@ -2339,4 +2346,4 @@
* release-0-2-1 * release-0-2-1
* import w3m-0.2.1 * import w3m-0.2.1
$Id: ChangeLog,v 1.269 2002/01/29 03:23:43 ukai Exp $ $Id: ChangeLog,v 1.270 2002/01/29 16:23:37 ukai Exp $

View File

@@ -185,7 +185,6 @@ MODEL=Linux.i686-monster-ja
#define JMP_BUF sigjmp_buf #define JMP_BUF sigjmp_buf
#define HAVE_FLOAT_H #define HAVE_FLOAT_H
#define HAVE_SYS_SELECT_H #define HAVE_SYS_SELECT_H
#undef HAVE_INTTYPES_H
typedef void MySignalHandler; typedef void MySignalHandler;
#define SIGNAL_ARG int _dummy #define SIGNAL_ARG int _dummy

20
configure vendored
View File

@@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# $Id: configure,v 1.56 2002/01/29 03:23:44 ukai Exp $ # $Id: configure,v 1.57 2002/01/29 16:23:37 ukai Exp $
# Configuration. # Configuration.
# #
@@ -1717,23 +1717,6 @@ else
def_have_sys_select_h='#undef HAVE_SYS_SELECT_H' def_have_sys_select_h='#undef HAVE_SYS_SELECT_H'
fi fi
####### check for inttypes
cat > _zmachdep.c <<EOF
#include <inttypes.h>
main()
{
uintptr_t p;
;
}
EOF
if $cc $cflags -c _zmachdep.c > /dev/null 2>&1
then
echo "You have inttypes.h."
def_have_inttypes_h='#define HAVE_INTTYPES_H'
else
def_have_inttypes_h='#undef HAVE_INTTYPES_H'
fi
####### setpgrp(pid, pgrp) or setpgrp() ? ####### setpgrp(pid, pgrp) or setpgrp() ?
cat > _zmachdep.c << EOF cat > _zmachdep.c << EOF
#include <unistd.h> #include <unistd.h>
@@ -2135,7 +2118,6 @@ $def_longjmp
$def_jmpbuf $def_jmpbuf
$def_have_float_h $def_have_float_h
$def_have_sys_select_h $def_have_sys_select_h
$def_have_inttypes_h
$def_sighandler $def_sighandler
$def_sig_arg $def_sig_arg

View File

@@ -1,13 +1,8 @@
/* $Id: mktable.c,v 1.6 2002/01/29 03:23:44 ukai Exp $ */ /* $Id: mktable.c,v 1.7 2002/01/29 16:23:37 ukai Exp $ */
#include "config.h" #include "config.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h> #include <ctype.h>
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#else
typedef unsigned long uintptr_t;
#endif
#include "hash.h" #include "hash.h"
#include "Str.h" #include "Str.h"
#include <gc.h> #include <gc.h>
@@ -20,10 +15,11 @@ defhash(HashItem_ss *, int, hss_i)
#define keycomp(x,y) ((x)==(y)) #define keycomp(x,y) ((x)==(y))
static uintptr_t /* XXX: we assume sizeof(unsigned long) >= sizeof(void *) */
static unsigned long
hashfunc(HashItem_ss * x) hashfunc(HashItem_ss * x)
{ {
return (uintptr_t) x; return (unsigned long) x;
} }
/* *INDENT-OFF* */ /* *INDENT-OFF* */