• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Révision15a790d2c7c0f5cd54efa17fcbc09a82315364a1 (tree)
l'heure2006-03-13 04:20:47
AuteurDaniel Jacobowitz <drow@fals...>
CommiterDaniel Jacobowitz

Message de Log

Build SHA-1 support for checksumming.

Change Summary

Modification

--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -553,6 +553,7 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c \
553553 scm-exp.c scm-lang.c scm-valprint.c \
554554 sentinel-frame.c \
555555 serial.c ser-base.c ser-unix.c \
556+ sha1.c \
556557 solib.c solib-null.c source.c \
557558 stabsread.c stack.c std-regs.c symfile.c symfile-mem.c symmisc.c \
558559 symtab.c \
@@ -616,6 +617,7 @@ hashtab_h = $(INCLUDE_DIR)/hashtab.h
616617 config_h = config.h
617618 exc_request_U_h = exc_request_U.h
618619 exc_request_S_h = exc_request_S.h
620+gdb_stdint_h = gdb_stdint.h
619621 msg_reply_S_h = msg_reply_S.h
620622 msg_U_h = msg_U.h
621623 notify_S_h = notify_S.h
@@ -778,6 +780,7 @@ serial_h = serial.h
778780 ser_base_h = ser-base.h
779781 ser_tcp_h = ser-tcp.h
780782 ser_unix_h = ser-unix.h
783+sha1_h = sha1.h $(gdb_stdint_h)
781784 shnbsd_tdep_h = shnbsd-tdep.h
782785 sh_tdep_h = sh-tdep.h
783786 sim_regno_h = sim-regno.h
@@ -942,6 +945,7 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
942945 m2-lang.o p-lang.o p-typeprint.o p-valprint.o \
943946 scm-exp.o scm-lang.o scm-valprint.o \
944947 sentinel-frame.o \
948+ sha1.o \
945949 complaints.o typeprint.o \
946950 ada-typeprint.o c-typeprint.o f-typeprint.o m2-typeprint.o \
947951 ada-valprint.o c-valprint.o cp-valprint.o f-valprint.o m2-valprint.o \
@@ -1283,6 +1287,7 @@ distclean: clean
12831287 rm -f gdbserver/tm.h gdbserver/xm.h gdbserver/nm.h
12841288 rm -f gdbserver/Makefile gdbserver/config.cache
12851289 rm -f nm.h tm.h xm.h config.status config.h stamp-h .gdbinit
1290+ rm -f gdb_stdint.h
12861291 rm -f y.output yacc.acts yacc.tmp y.tab.h
12871292 rm -f config.log config.cache
12881293 rm -f Makefile
@@ -1320,15 +1325,31 @@ subdir_do: force
13201325 done
13211326
13221327 Makefile: Makefile.in config.status @frags@
1323- $(SHELL) config.status
1328+ # Regenerate the Makefile and the tm.h / nm.h links.
1329+ CONFIG_FILES=Makefile \
1330+ CONFIG_COMMANDS= \
1331+ CONFIG_HEADERS= \
1332+ $(SHELL) config.status
13241333
13251334 config.h: stamp-h ; @true
13261335 stamp-h: config.in config.status
1327- CONFIG_HEADERS=config.h:config.in $(SHELL) config.status
1336+ CONFIG_HEADERS=config.h:config.in \
1337+ CONFIG_COMMANDS=default \
1338+ CONFIG_FILES= \
1339+ CONFIG_LINKS= \
1340+ $(SHELL) config.status
13281341
13291342 config.status: configure configure.tgt configure.host
13301343 $(SHELL) config.status --recheck
13311344
1345+gdb_stdint.h: stamp-int ; @true
1346+stamp-int: config.status
1347+ CONFIG_COMMANDS=gdb_stdint.h \
1348+ CONFIG_FILES= \
1349+ CONFIG_HEADERS= \
1350+ CONFIG_LINKS= \
1351+ $(SHELL) config.status
1352+ echo stamp > stamp-int
13321353 force:
13331354
13341355 # Documentation!
@@ -2546,6 +2567,7 @@ ser-unix.o: ser-unix.c $(defs_h) $(serial_h) $(ser_base_h) $(ser_unix_h) \
25462567 $(terminal_h) $(gdb_select_h) $(gdb_string_h)
25472568 ser-mingw.o: ser-mingw.c $(defs_h) $(serial_h) $(ser_base_h) \
25482569 $(ser_tcp_h) $(gdb_assert_h) $(gdb_string_h)
2570+sha1.o: sha1.c $(config_h) $(sha1_h)
25492571 sh3-rom.o: sh3-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
25502572 $(serial_h) $(srec_h) $(arch_utils_h) $(regcache_h) $(gdb_string_h) \
25512573 $(sh_tdep_h)
--- a/gdb/acinclude.m4
+++ b/gdb/acinclude.m4
@@ -14,6 +14,8 @@ ifelse(yes,no,[
1414 AC_DEFUN([CY_GNU_GETTEXT],)
1515 ])
1616
17+sinclude(../config/stdint.m4)
18+
1719 dnl CYGNUS LOCAL: This gets the right posix flag for gcc
1820 AC_DEFUN([CY_AC_TCL_LYNX_POSIX],
1921 [AC_REQUIRE([AC_PROG_CC])AC_REQUIRE([AC_PROG_CPP])
--- a/gdb/aclocal.m4
+++ b/gdb/aclocal.m4
@@ -1,7 +1,7 @@
1-# generated automatically by aclocal 1.9.2 -*- Autoconf -*-
1+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
22
3-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4-# Free Software Foundation, Inc.
3+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4+# 2005 Free Software Foundation, Inc.
55 # This file is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
77 # with or without modifications, as long as this notice is preserved.
@@ -11,26 +11,16 @@
1111 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1212 # PARTICULAR PURPOSE.
1313
14-# AM_CONDITIONAL -*- Autoconf -*-
15-
16-# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
17-
18-# This program is free software; you can redistribute it and/or modify
19-# it under the terms of the GNU General Public License as published by
20-# the Free Software Foundation; either version 2, or (at your option)
21-# any later version.
22-
23-# This program is distributed in the hope that it will be useful,
24-# but WITHOUT ANY WARRANTY; without even the implied warranty of
25-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26-# GNU General Public License for more details.
14+# AM_CONDITIONAL -*- Autoconf -*-
2715
28-# You should have received a copy of the GNU General Public License
29-# along with this program; if not, write to the Free Software
30-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
31-# 02111-1307, USA.
16+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
17+# Free Software Foundation, Inc.
18+#
19+# This file is free software; the Free Software Foundation
20+# gives unlimited permission to copy and/or distribute it,
21+# with or without modifications, as long as this notice is preserved.
3222
33-# serial 6
23+# serial 7
3424
3525 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
3626 # -------------------------------------
@@ -54,28 +44,17 @@ AC_CONFIG_COMMANDS_PRE(
5444 Usually this means the macro was only invoked conditionally.]])
5545 fi])])
5646
57-# Add --enable-maintainer-mode option to configure.
47+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
5848 # From Jim Meyering
5949
60-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
50+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
6151 # Free Software Foundation, Inc.
52+#
53+# This file is free software; the Free Software Foundation
54+# gives unlimited permission to copy and/or distribute it,
55+# with or without modifications, as long as this notice is preserved.
6256
63-# This program is free software; you can redistribute it and/or modify
64-# it under the terms of the GNU General Public License as published by
65-# the Free Software Foundation; either version 2, or (at your option)
66-# any later version.
67-
68-# This program is distributed in the hope that it will be useful,
69-# but WITHOUT ANY WARRANTY; without even the implied warranty of
70-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
71-# GNU General Public License for more details.
72-
73-# You should have received a copy of the GNU General Public License
74-# along with this program; if not, write to the Free Software
75-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
76-# 02111-1307, USA.
77-
78-# serial 3
57+# serial 4
7958
8059 AC_DEFUN([AM_MAINTAINER_MODE],
8160 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -569,6 +569,21 @@
569569 /* Define to 1 if the `setpgrp' function takes no argument. */
570570 #undef SETPGRP_VOID
571571
572+/* The size of a `char', as computed by sizeof. */
573+#undef SIZEOF_CHAR
574+
575+/* The size of a `int', as computed by sizeof. */
576+#undef SIZEOF_INT
577+
578+/* The size of a `long', as computed by sizeof. */
579+#undef SIZEOF_LONG
580+
581+/* The size of a `short', as computed by sizeof. */
582+#undef SIZEOF_SHORT
583+
584+/* The size of a `void *', as computed by sizeof. */
585+#undef SIZEOF_VOID_P
586+
572587 /* If using the C implementation of alloca, define if you know the
573588 direction of stack growth for your system; otherwise it will be
574589 automatically deduced at run-time.
@@ -600,6 +615,10 @@
600615 /* Define if the simulator is being linked in. */
601616 #undef WITH_SIM
602617
618+/* Define to 1 if your processor stores words with the most significant byte
619+ first (like Motorola and SPARC, unlike Intel and VAX). */
620+#undef WORDS_BIGENDIAN
621+
603622 /* Define to 1 if on AIX 3.
604623 System headers sometimes define this.
605624 We just want to avoid a redefinition error message. */
--- a/gdb/configure
+++ b/gdb/configure
@@ -2811,6 +2811,234 @@ case "x$am_cv_prog_cc_stdc" in
28112811 esac
28122812
28132813
2814+echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
2815+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
2816+if test "${ac_cv_c_bigendian+set}" = set; then
2817+ echo $ECHO_N "(cached) $ECHO_C" >&6
2818+else
2819+ # See if sys/param.h defines the BYTE_ORDER macro.
2820+cat >conftest.$ac_ext <<_ACEOF
2821+/* confdefs.h. */
2822+_ACEOF
2823+cat confdefs.h >>conftest.$ac_ext
2824+cat >>conftest.$ac_ext <<_ACEOF
2825+/* end confdefs.h. */
2826+#include <sys/types.h>
2827+#include <sys/param.h>
2828+
2829+int
2830+main ()
2831+{
2832+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2833+ bogus endian macros
2834+#endif
2835+
2836+ ;
2837+ return 0;
2838+}
2839+_ACEOF
2840+rm -f conftest.$ac_objext
2841+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2842+ (eval $ac_compile) 2>conftest.er1
2843+ ac_status=$?
2844+ grep -v '^ *+' conftest.er1 >conftest.err
2845+ rm -f conftest.er1
2846+ cat conftest.err >&5
2847+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2848+ (exit $ac_status); } &&
2849+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2850+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2851+ (eval $ac_try) 2>&5
2852+ ac_status=$?
2853+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2854+ (exit $ac_status); }; } &&
2855+ { ac_try='test -s conftest.$ac_objext'
2856+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2857+ (eval $ac_try) 2>&5
2858+ ac_status=$?
2859+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2860+ (exit $ac_status); }; }; then
2861+ # It does; now see whether it defined to BIG_ENDIAN or not.
2862+cat >conftest.$ac_ext <<_ACEOF
2863+/* confdefs.h. */
2864+_ACEOF
2865+cat confdefs.h >>conftest.$ac_ext
2866+cat >>conftest.$ac_ext <<_ACEOF
2867+/* end confdefs.h. */
2868+#include <sys/types.h>
2869+#include <sys/param.h>
2870+
2871+int
2872+main ()
2873+{
2874+#if BYTE_ORDER != BIG_ENDIAN
2875+ not big endian
2876+#endif
2877+
2878+ ;
2879+ return 0;
2880+}
2881+_ACEOF
2882+rm -f conftest.$ac_objext
2883+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2884+ (eval $ac_compile) 2>conftest.er1
2885+ ac_status=$?
2886+ grep -v '^ *+' conftest.er1 >conftest.err
2887+ rm -f conftest.er1
2888+ cat conftest.err >&5
2889+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2890+ (exit $ac_status); } &&
2891+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2892+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2893+ (eval $ac_try) 2>&5
2894+ ac_status=$?
2895+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2896+ (exit $ac_status); }; } &&
2897+ { ac_try='test -s conftest.$ac_objext'
2898+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2899+ (eval $ac_try) 2>&5
2900+ ac_status=$?
2901+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2902+ (exit $ac_status); }; }; then
2903+ ac_cv_c_bigendian=yes
2904+else
2905+ echo "$as_me: failed program was:" >&5
2906+sed 's/^/| /' conftest.$ac_ext >&5
2907+
2908+ac_cv_c_bigendian=no
2909+fi
2910+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2911+else
2912+ echo "$as_me: failed program was:" >&5
2913+sed 's/^/| /' conftest.$ac_ext >&5
2914+
2915+# It does not; compile a test program.
2916+if test "$cross_compiling" = yes; then
2917+ # try to guess the endianness by grepping values into an object file
2918+ ac_cv_c_bigendian=unknown
2919+ cat >conftest.$ac_ext <<_ACEOF
2920+/* confdefs.h. */
2921+_ACEOF
2922+cat confdefs.h >>conftest.$ac_ext
2923+cat >>conftest.$ac_ext <<_ACEOF
2924+/* end confdefs.h. */
2925+short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
2926+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
2927+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
2928+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
2929+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
2930+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
2931+int
2932+main ()
2933+{
2934+ _ascii (); _ebcdic ();
2935+ ;
2936+ return 0;
2937+}
2938+_ACEOF
2939+rm -f conftest.$ac_objext
2940+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2941+ (eval $ac_compile) 2>conftest.er1
2942+ ac_status=$?
2943+ grep -v '^ *+' conftest.er1 >conftest.err
2944+ rm -f conftest.er1
2945+ cat conftest.err >&5
2946+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2947+ (exit $ac_status); } &&
2948+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2949+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2950+ (eval $ac_try) 2>&5
2951+ ac_status=$?
2952+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2953+ (exit $ac_status); }; } &&
2954+ { ac_try='test -s conftest.$ac_objext'
2955+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2956+ (eval $ac_try) 2>&5
2957+ ac_status=$?
2958+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
2959+ (exit $ac_status); }; }; then
2960+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
2961+ ac_cv_c_bigendian=yes
2962+fi
2963+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
2964+ if test "$ac_cv_c_bigendian" = unknown; then
2965+ ac_cv_c_bigendian=no
2966+ else
2967+ # finding both strings is unlikely to happen, but who knows?
2968+ ac_cv_c_bigendian=unknown
2969+ fi
2970+fi
2971+else
2972+ echo "$as_me: failed program was:" >&5
2973+sed 's/^/| /' conftest.$ac_ext >&5
2974+
2975+fi
2976+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2977+else
2978+ cat >conftest.$ac_ext <<_ACEOF
2979+/* confdefs.h. */
2980+_ACEOF
2981+cat confdefs.h >>conftest.$ac_ext
2982+cat >>conftest.$ac_ext <<_ACEOF
2983+/* end confdefs.h. */
2984+int
2985+main ()
2986+{
2987+ /* Are we little or big endian? From Harbison&Steele. */
2988+ union
2989+ {
2990+ long l;
2991+ char c[sizeof (long)];
2992+ } u;
2993+ u.l = 1;
2994+ exit (u.c[sizeof (long) - 1] == 1);
2995+}
2996+_ACEOF
2997+rm -f conftest$ac_exeext
2998+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2999+ (eval $ac_link) 2>&5
3000+ ac_status=$?
3001+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3002+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3003+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3004+ (eval $ac_try) 2>&5
3005+ ac_status=$?
3006+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
3007+ (exit $ac_status); }; }; then
3008+ ac_cv_c_bigendian=no
3009+else
3010+ echo "$as_me: program exited with status $ac_status" >&5
3011+echo "$as_me: failed program was:" >&5
3012+sed 's/^/| /' conftest.$ac_ext >&5
3013+
3014+( exit $ac_status )
3015+ac_cv_c_bigendian=yes
3016+fi
3017+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3018+fi
3019+fi
3020+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3021+fi
3022+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
3023+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
3024+case $ac_cv_c_bigendian in
3025+ yes)
3026+
3027+cat >>confdefs.h <<\_ACEOF
3028+#define WORDS_BIGENDIAN 1
3029+_ACEOF
3030+ ;;
3031+ no)
3032+ ;;
3033+ *)
3034+ { { echo "$as_me:$LINENO: error: unknown endianness
3035+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
3036+echo "$as_me: error: unknown endianness
3037+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
3038+ { (exit 1); exit 1; }; } ;;
3039+esac
3040+
3041+
28143042 ac_aux_dir=
28153043 for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
28163044 if test -f $ac_dir/install-sh; then
@@ -12633,30 +12861,2718 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then
1263312861 _ACEOF
1263412862
1263512863 fi
12636-
12637-done
12638-
12639-
12640-for ac_header in term.h
12641-do
12642-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12643-echo "$as_me:$LINENO: checking for $ac_header" >&5
12644-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12645-if eval "test \"\${$as_ac_Header+set}\" = set"; then
12646- echo $ECHO_N "(cached) $ECHO_C" >&6
12864+
12865+done
12866+
12867+
12868+for ac_header in term.h
12869+do
12870+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12871+echo "$as_me:$LINENO: checking for $ac_header" >&5
12872+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12873+if eval "test \"\${$as_ac_Header+set}\" = set"; then
12874+ echo $ECHO_N "(cached) $ECHO_C" >&6
12875+else
12876+ cat >conftest.$ac_ext <<_ACEOF
12877+/* confdefs.h. */
12878+_ACEOF
12879+cat confdefs.h >>conftest.$ac_ext
12880+cat >>conftest.$ac_ext <<_ACEOF
12881+/* end confdefs.h. */
12882+#if HAVE_CURSES_H
12883+# include <curses.h>
12884+#endif
12885+
12886+
12887+#include <$ac_header>
12888+_ACEOF
12889+rm -f conftest.$ac_objext
12890+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12891+ (eval $ac_compile) 2>conftest.er1
12892+ ac_status=$?
12893+ grep -v '^ *+' conftest.er1 >conftest.err
12894+ rm -f conftest.er1
12895+ cat conftest.err >&5
12896+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12897+ (exit $ac_status); } &&
12898+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12899+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12900+ (eval $ac_try) 2>&5
12901+ ac_status=$?
12902+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12903+ (exit $ac_status); }; } &&
12904+ { ac_try='test -s conftest.$ac_objext'
12905+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12906+ (eval $ac_try) 2>&5
12907+ ac_status=$?
12908+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12909+ (exit $ac_status); }; }; then
12910+ eval "$as_ac_Header=yes"
12911+else
12912+ echo "$as_me: failed program was:" >&5
12913+sed 's/^/| /' conftest.$ac_ext >&5
12914+
12915+eval "$as_ac_Header=no"
12916+fi
12917+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12918+fi
12919+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12920+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12921+if test `eval echo '${'$as_ac_Header'}'` = yes; then
12922+ cat >>confdefs.h <<_ACEOF
12923+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12924+_ACEOF
12925+
12926+fi
12927+
12928+done
12929+
12930+
12931+# FIXME: kettenis/20030102: In most cases we include these
12932+# unconditionally, so what's the point in checking these?
12933+
12934+
12935+for ac_header in ctype.h time.h
12936+do
12937+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12938+if eval "test \"\${$as_ac_Header+set}\" = set"; then
12939+ echo "$as_me:$LINENO: checking for $ac_header" >&5
12940+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12941+if eval "test \"\${$as_ac_Header+set}\" = set"; then
12942+ echo $ECHO_N "(cached) $ECHO_C" >&6
12943+fi
12944+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12945+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12946+else
12947+ # Is the header compilable?
12948+echo "$as_me:$LINENO: checking $ac_header usability" >&5
12949+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12950+cat >conftest.$ac_ext <<_ACEOF
12951+/* confdefs.h. */
12952+_ACEOF
12953+cat confdefs.h >>conftest.$ac_ext
12954+cat >>conftest.$ac_ext <<_ACEOF
12955+/* end confdefs.h. */
12956+$ac_includes_default
12957+#include <$ac_header>
12958+_ACEOF
12959+rm -f conftest.$ac_objext
12960+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12961+ (eval $ac_compile) 2>conftest.er1
12962+ ac_status=$?
12963+ grep -v '^ *+' conftest.er1 >conftest.err
12964+ rm -f conftest.er1
12965+ cat conftest.err >&5
12966+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12967+ (exit $ac_status); } &&
12968+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12969+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12970+ (eval $ac_try) 2>&5
12971+ ac_status=$?
12972+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12973+ (exit $ac_status); }; } &&
12974+ { ac_try='test -s conftest.$ac_objext'
12975+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12976+ (eval $ac_try) 2>&5
12977+ ac_status=$?
12978+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
12979+ (exit $ac_status); }; }; then
12980+ ac_header_compiler=yes
12981+else
12982+ echo "$as_me: failed program was:" >&5
12983+sed 's/^/| /' conftest.$ac_ext >&5
12984+
12985+ac_header_compiler=no
12986+fi
12987+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12988+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12989+echo "${ECHO_T}$ac_header_compiler" >&6
12990+
12991+# Is the header present?
12992+echo "$as_me:$LINENO: checking $ac_header presence" >&5
12993+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
12994+cat >conftest.$ac_ext <<_ACEOF
12995+/* confdefs.h. */
12996+_ACEOF
12997+cat confdefs.h >>conftest.$ac_ext
12998+cat >>conftest.$ac_ext <<_ACEOF
12999+/* end confdefs.h. */
13000+#include <$ac_header>
13001+_ACEOF
13002+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13003+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13004+ ac_status=$?
13005+ grep -v '^ *+' conftest.er1 >conftest.err
13006+ rm -f conftest.er1
13007+ cat conftest.err >&5
13008+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13009+ (exit $ac_status); } >/dev/null; then
13010+ if test -s conftest.err; then
13011+ ac_cpp_err=$ac_c_preproc_warn_flag
13012+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13013+ else
13014+ ac_cpp_err=
13015+ fi
13016+else
13017+ ac_cpp_err=yes
13018+fi
13019+if test -z "$ac_cpp_err"; then
13020+ ac_header_preproc=yes
13021+else
13022+ echo "$as_me: failed program was:" >&5
13023+sed 's/^/| /' conftest.$ac_ext >&5
13024+
13025+ ac_header_preproc=no
13026+fi
13027+rm -f conftest.err conftest.$ac_ext
13028+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13029+echo "${ECHO_T}$ac_header_preproc" >&6
13030+
13031+# So? What about this header?
13032+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13033+ yes:no: )
13034+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13035+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13036+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13037+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13038+ ac_header_preproc=yes
13039+ ;;
13040+ no:yes:* )
13041+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13042+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13043+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13044+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13045+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13046+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13047+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13048+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
13049+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13050+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13051+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13052+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13053+ (
13054+ cat <<\_ASBOX
13055+## ------------------------------------------ ##
13056+## Report this to the AC_PACKAGE_NAME lists. ##
13057+## ------------------------------------------ ##
13058+_ASBOX
13059+ ) |
13060+ sed "s/^/$as_me: WARNING: /" >&2
13061+ ;;
13062+esac
13063+echo "$as_me:$LINENO: checking for $ac_header" >&5
13064+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13065+if eval "test \"\${$as_ac_Header+set}\" = set"; then
13066+ echo $ECHO_N "(cached) $ECHO_C" >&6
13067+else
13068+ eval "$as_ac_Header=\$ac_header_preproc"
13069+fi
13070+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
13071+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13072+
13073+fi
13074+if test `eval echo '${'$as_ac_Header'}'` = yes; then
13075+ cat >>confdefs.h <<_ACEOF
13076+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13077+_ACEOF
13078+
13079+fi
13080+
13081+done
13082+
13083+
13084+# Create a header we can use portably to get the standard integer types.
13085+
13086+
13087+inttype_headers=`echo inttypes.h sys/inttypes.h | sed -e 's/,/ /g'`
13088+
13089+acx_cv_header_stdint=stddef.h
13090+acx_cv_header_stdint_kind="(already complete)"
13091+for i in stdint.h $inttype_headers; do
13092+ unset ac_cv_type_uintptr_t
13093+ unset ac_cv_type_uintmax_t
13094+ unset ac_cv_type_int_least32_t
13095+ unset ac_cv_type_int_fast32_t
13096+ unset ac_cv_type_uint64_t
13097+ echo $ECHO_N "looking for a compliant stdint.h in $i, $ECHO_C" >&6
13098+ echo "$as_me:$LINENO: checking for uintmax_t" >&5
13099+echo $ECHO_N "checking for uintmax_t... $ECHO_C" >&6
13100+if test "${ac_cv_type_uintmax_t+set}" = set; then
13101+ echo $ECHO_N "(cached) $ECHO_C" >&6
13102+else
13103+ cat >conftest.$ac_ext <<_ACEOF
13104+/* confdefs.h. */
13105+_ACEOF
13106+cat confdefs.h >>conftest.$ac_ext
13107+cat >>conftest.$ac_ext <<_ACEOF
13108+/* end confdefs.h. */
13109+#include <sys/types.h>
13110+#include <$i>
13111+
13112+int
13113+main ()
13114+{
13115+if ((uintmax_t *) 0)
13116+ return 0;
13117+if (sizeof (uintmax_t))
13118+ return 0;
13119+ ;
13120+ return 0;
13121+}
13122+_ACEOF
13123+rm -f conftest.$ac_objext
13124+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13125+ (eval $ac_compile) 2>conftest.er1
13126+ ac_status=$?
13127+ grep -v '^ *+' conftest.er1 >conftest.err
13128+ rm -f conftest.er1
13129+ cat conftest.err >&5
13130+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13131+ (exit $ac_status); } &&
13132+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13133+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13134+ (eval $ac_try) 2>&5
13135+ ac_status=$?
13136+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13137+ (exit $ac_status); }; } &&
13138+ { ac_try='test -s conftest.$ac_objext'
13139+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13140+ (eval $ac_try) 2>&5
13141+ ac_status=$?
13142+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13143+ (exit $ac_status); }; }; then
13144+ ac_cv_type_uintmax_t=yes
13145+else
13146+ echo "$as_me: failed program was:" >&5
13147+sed 's/^/| /' conftest.$ac_ext >&5
13148+
13149+ac_cv_type_uintmax_t=no
13150+fi
13151+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13152+fi
13153+echo "$as_me:$LINENO: result: $ac_cv_type_uintmax_t" >&5
13154+echo "${ECHO_T}$ac_cv_type_uintmax_t" >&6
13155+if test $ac_cv_type_uintmax_t = yes; then
13156+ acx_cv_header_stdint=$i
13157+else
13158+ continue
13159+fi
13160+
13161+ echo "$as_me:$LINENO: checking for uintptr_t" >&5
13162+echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
13163+if test "${ac_cv_type_uintptr_t+set}" = set; then
13164+ echo $ECHO_N "(cached) $ECHO_C" >&6
13165+else
13166+ cat >conftest.$ac_ext <<_ACEOF
13167+/* confdefs.h. */
13168+_ACEOF
13169+cat confdefs.h >>conftest.$ac_ext
13170+cat >>conftest.$ac_ext <<_ACEOF
13171+/* end confdefs.h. */
13172+#include <sys/types.h>
13173+#include <$i>
13174+
13175+int
13176+main ()
13177+{
13178+if ((uintptr_t *) 0)
13179+ return 0;
13180+if (sizeof (uintptr_t))
13181+ return 0;
13182+ ;
13183+ return 0;
13184+}
13185+_ACEOF
13186+rm -f conftest.$ac_objext
13187+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13188+ (eval $ac_compile) 2>conftest.er1
13189+ ac_status=$?
13190+ grep -v '^ *+' conftest.er1 >conftest.err
13191+ rm -f conftest.er1
13192+ cat conftest.err >&5
13193+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13194+ (exit $ac_status); } &&
13195+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13196+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13197+ (eval $ac_try) 2>&5
13198+ ac_status=$?
13199+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13200+ (exit $ac_status); }; } &&
13201+ { ac_try='test -s conftest.$ac_objext'
13202+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13203+ (eval $ac_try) 2>&5
13204+ ac_status=$?
13205+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13206+ (exit $ac_status); }; }; then
13207+ ac_cv_type_uintptr_t=yes
13208+else
13209+ echo "$as_me: failed program was:" >&5
13210+sed 's/^/| /' conftest.$ac_ext >&5
13211+
13212+ac_cv_type_uintptr_t=no
13213+fi
13214+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13215+fi
13216+echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
13217+echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
13218+if test $ac_cv_type_uintptr_t = yes; then
13219+ :
13220+else
13221+ acx_cv_header_stdint_kind="(mostly complete)"
13222+fi
13223+
13224+ echo "$as_me:$LINENO: checking for int_least32_t" >&5
13225+echo $ECHO_N "checking for int_least32_t... $ECHO_C" >&6
13226+if test "${ac_cv_type_int_least32_t+set}" = set; then
13227+ echo $ECHO_N "(cached) $ECHO_C" >&6
13228+else
13229+ cat >conftest.$ac_ext <<_ACEOF
13230+/* confdefs.h. */
13231+_ACEOF
13232+cat confdefs.h >>conftest.$ac_ext
13233+cat >>conftest.$ac_ext <<_ACEOF
13234+/* end confdefs.h. */
13235+#include <sys/types.h>
13236+#include <$i>
13237+
13238+int
13239+main ()
13240+{
13241+if ((int_least32_t *) 0)
13242+ return 0;
13243+if (sizeof (int_least32_t))
13244+ return 0;
13245+ ;
13246+ return 0;
13247+}
13248+_ACEOF
13249+rm -f conftest.$ac_objext
13250+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13251+ (eval $ac_compile) 2>conftest.er1
13252+ ac_status=$?
13253+ grep -v '^ *+' conftest.er1 >conftest.err
13254+ rm -f conftest.er1
13255+ cat conftest.err >&5
13256+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13257+ (exit $ac_status); } &&
13258+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13259+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13260+ (eval $ac_try) 2>&5
13261+ ac_status=$?
13262+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13263+ (exit $ac_status); }; } &&
13264+ { ac_try='test -s conftest.$ac_objext'
13265+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13266+ (eval $ac_try) 2>&5
13267+ ac_status=$?
13268+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13269+ (exit $ac_status); }; }; then
13270+ ac_cv_type_int_least32_t=yes
13271+else
13272+ echo "$as_me: failed program was:" >&5
13273+sed 's/^/| /' conftest.$ac_ext >&5
13274+
13275+ac_cv_type_int_least32_t=no
13276+fi
13277+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13278+fi
13279+echo "$as_me:$LINENO: result: $ac_cv_type_int_least32_t" >&5
13280+echo "${ECHO_T}$ac_cv_type_int_least32_t" >&6
13281+if test $ac_cv_type_int_least32_t = yes; then
13282+ :
13283+else
13284+ acx_cv_header_stdint_kind="(mostly complete)"
13285+fi
13286+
13287+ echo "$as_me:$LINENO: checking for int_fast32_t" >&5
13288+echo $ECHO_N "checking for int_fast32_t... $ECHO_C" >&6
13289+if test "${ac_cv_type_int_fast32_t+set}" = set; then
13290+ echo $ECHO_N "(cached) $ECHO_C" >&6
13291+else
13292+ cat >conftest.$ac_ext <<_ACEOF
13293+/* confdefs.h. */
13294+_ACEOF
13295+cat confdefs.h >>conftest.$ac_ext
13296+cat >>conftest.$ac_ext <<_ACEOF
13297+/* end confdefs.h. */
13298+#include <sys/types.h>
13299+#include <$i>
13300+
13301+int
13302+main ()
13303+{
13304+if ((int_fast32_t *) 0)
13305+ return 0;
13306+if (sizeof (int_fast32_t))
13307+ return 0;
13308+ ;
13309+ return 0;
13310+}
13311+_ACEOF
13312+rm -f conftest.$ac_objext
13313+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13314+ (eval $ac_compile) 2>conftest.er1
13315+ ac_status=$?
13316+ grep -v '^ *+' conftest.er1 >conftest.err
13317+ rm -f conftest.er1
13318+ cat conftest.err >&5
13319+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13320+ (exit $ac_status); } &&
13321+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13322+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13323+ (eval $ac_try) 2>&5
13324+ ac_status=$?
13325+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13326+ (exit $ac_status); }; } &&
13327+ { ac_try='test -s conftest.$ac_objext'
13328+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13329+ (eval $ac_try) 2>&5
13330+ ac_status=$?
13331+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13332+ (exit $ac_status); }; }; then
13333+ ac_cv_type_int_fast32_t=yes
13334+else
13335+ echo "$as_me: failed program was:" >&5
13336+sed 's/^/| /' conftest.$ac_ext >&5
13337+
13338+ac_cv_type_int_fast32_t=no
13339+fi
13340+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13341+fi
13342+echo "$as_me:$LINENO: result: $ac_cv_type_int_fast32_t" >&5
13343+echo "${ECHO_T}$ac_cv_type_int_fast32_t" >&6
13344+if test $ac_cv_type_int_fast32_t = yes; then
13345+ :
13346+else
13347+ acx_cv_header_stdint_kind="(mostly complete)"
13348+fi
13349+
13350+ echo "$as_me:$LINENO: checking for uint64_t" >&5
13351+echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6
13352+if test "${ac_cv_type_uint64_t+set}" = set; then
13353+ echo $ECHO_N "(cached) $ECHO_C" >&6
13354+else
13355+ cat >conftest.$ac_ext <<_ACEOF
13356+/* confdefs.h. */
13357+_ACEOF
13358+cat confdefs.h >>conftest.$ac_ext
13359+cat >>conftest.$ac_ext <<_ACEOF
13360+/* end confdefs.h. */
13361+#include <sys/types.h>
13362+#include <$i>
13363+
13364+int
13365+main ()
13366+{
13367+if ((uint64_t *) 0)
13368+ return 0;
13369+if (sizeof (uint64_t))
13370+ return 0;
13371+ ;
13372+ return 0;
13373+}
13374+_ACEOF
13375+rm -f conftest.$ac_objext
13376+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13377+ (eval $ac_compile) 2>conftest.er1
13378+ ac_status=$?
13379+ grep -v '^ *+' conftest.er1 >conftest.err
13380+ rm -f conftest.er1
13381+ cat conftest.err >&5
13382+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13383+ (exit $ac_status); } &&
13384+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13385+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13386+ (eval $ac_try) 2>&5
13387+ ac_status=$?
13388+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13389+ (exit $ac_status); }; } &&
13390+ { ac_try='test -s conftest.$ac_objext'
13391+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13392+ (eval $ac_try) 2>&5
13393+ ac_status=$?
13394+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13395+ (exit $ac_status); }; }; then
13396+ ac_cv_type_uint64_t=yes
13397+else
13398+ echo "$as_me: failed program was:" >&5
13399+sed 's/^/| /' conftest.$ac_ext >&5
13400+
13401+ac_cv_type_uint64_t=no
13402+fi
13403+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13404+fi
13405+echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5
13406+echo "${ECHO_T}$ac_cv_type_uint64_t" >&6
13407+if test $ac_cv_type_uint64_t = yes; then
13408+ :
13409+else
13410+ acx_cv_header_stdint_kind="(lacks uint64_t)"
13411+fi
13412+
13413+ break
13414+done
13415+if test "$acx_cv_header_stdint" = stddef.h; then
13416+ acx_cv_header_stdint_kind="(lacks uintptr_t)"
13417+ for i in stdint.h $inttype_headers; do
13418+ unset ac_cv_type_uint32_t
13419+ unset ac_cv_type_uint64_t
13420+ echo $ECHO_N "looking for an incomplete stdint.h in $i, $ECHO_C" >&6
13421+ echo "$as_me:$LINENO: checking for uint32_t" >&5
13422+echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6
13423+if test "${ac_cv_type_uint32_t+set}" = set; then
13424+ echo $ECHO_N "(cached) $ECHO_C" >&6
13425+else
13426+ cat >conftest.$ac_ext <<_ACEOF
13427+/* confdefs.h. */
13428+_ACEOF
13429+cat confdefs.h >>conftest.$ac_ext
13430+cat >>conftest.$ac_ext <<_ACEOF
13431+/* end confdefs.h. */
13432+#include <sys/types.h>
13433+#include <$i>
13434+
13435+int
13436+main ()
13437+{
13438+if ((uint32_t *) 0)
13439+ return 0;
13440+if (sizeof (uint32_t))
13441+ return 0;
13442+ ;
13443+ return 0;
13444+}
13445+_ACEOF
13446+rm -f conftest.$ac_objext
13447+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13448+ (eval $ac_compile) 2>conftest.er1
13449+ ac_status=$?
13450+ grep -v '^ *+' conftest.er1 >conftest.err
13451+ rm -f conftest.er1
13452+ cat conftest.err >&5
13453+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13454+ (exit $ac_status); } &&
13455+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13456+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13457+ (eval $ac_try) 2>&5
13458+ ac_status=$?
13459+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13460+ (exit $ac_status); }; } &&
13461+ { ac_try='test -s conftest.$ac_objext'
13462+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13463+ (eval $ac_try) 2>&5
13464+ ac_status=$?
13465+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13466+ (exit $ac_status); }; }; then
13467+ ac_cv_type_uint32_t=yes
13468+else
13469+ echo "$as_me: failed program was:" >&5
13470+sed 's/^/| /' conftest.$ac_ext >&5
13471+
13472+ac_cv_type_uint32_t=no
13473+fi
13474+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13475+fi
13476+echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5
13477+echo "${ECHO_T}$ac_cv_type_uint32_t" >&6
13478+if test $ac_cv_type_uint32_t = yes; then
13479+ acx_cv_header_stdint=$i
13480+else
13481+ continue
13482+fi
13483+
13484+ echo "$as_me:$LINENO: checking for uint64_t" >&5
13485+echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6
13486+if test "${ac_cv_type_uint64_t+set}" = set; then
13487+ echo $ECHO_N "(cached) $ECHO_C" >&6
13488+else
13489+ cat >conftest.$ac_ext <<_ACEOF
13490+/* confdefs.h. */
13491+_ACEOF
13492+cat confdefs.h >>conftest.$ac_ext
13493+cat >>conftest.$ac_ext <<_ACEOF
13494+/* end confdefs.h. */
13495+#include <sys/types.h>
13496+#include <$i>
13497+
13498+int
13499+main ()
13500+{
13501+if ((uint64_t *) 0)
13502+ return 0;
13503+if (sizeof (uint64_t))
13504+ return 0;
13505+ ;
13506+ return 0;
13507+}
13508+_ACEOF
13509+rm -f conftest.$ac_objext
13510+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13511+ (eval $ac_compile) 2>conftest.er1
13512+ ac_status=$?
13513+ grep -v '^ *+' conftest.er1 >conftest.err
13514+ rm -f conftest.er1
13515+ cat conftest.err >&5
13516+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13517+ (exit $ac_status); } &&
13518+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13519+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13520+ (eval $ac_try) 2>&5
13521+ ac_status=$?
13522+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13523+ (exit $ac_status); }; } &&
13524+ { ac_try='test -s conftest.$ac_objext'
13525+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13526+ (eval $ac_try) 2>&5
13527+ ac_status=$?
13528+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13529+ (exit $ac_status); }; }; then
13530+ ac_cv_type_uint64_t=yes
13531+else
13532+ echo "$as_me: failed program was:" >&5
13533+sed 's/^/| /' conftest.$ac_ext >&5
13534+
13535+ac_cv_type_uint64_t=no
13536+fi
13537+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13538+fi
13539+echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5
13540+echo "${ECHO_T}$ac_cv_type_uint64_t" >&6
13541+if test $ac_cv_type_uint64_t = yes; then
13542+ :
13543+else
13544+ acx_cv_header_stdint_kind="(lacks uintptr_t and uint64_t)"
13545+fi
13546+
13547+ break
13548+ done
13549+fi
13550+if test "$acx_cv_header_stdint" = stddef.h; then
13551+ acx_cv_header_stdint_kind="(u_intXX_t style)"
13552+ for i in sys/types.h $inttype_headers; do
13553+ unset ac_cv_type_u_int32_t
13554+ unset ac_cv_type_u_int64_t
13555+ echo $ECHO_N "looking for u_intXX_t types in $i, $ECHO_C" >&6
13556+ echo "$as_me:$LINENO: checking for u_int32_t" >&5
13557+echo $ECHO_N "checking for u_int32_t... $ECHO_C" >&6
13558+if test "${ac_cv_type_u_int32_t+set}" = set; then
13559+ echo $ECHO_N "(cached) $ECHO_C" >&6
13560+else
13561+ cat >conftest.$ac_ext <<_ACEOF
13562+/* confdefs.h. */
13563+_ACEOF
13564+cat confdefs.h >>conftest.$ac_ext
13565+cat >>conftest.$ac_ext <<_ACEOF
13566+/* end confdefs.h. */
13567+#include <sys/types.h>
13568+#include <$i>
13569+
13570+int
13571+main ()
13572+{
13573+if ((u_int32_t *) 0)
13574+ return 0;
13575+if (sizeof (u_int32_t))
13576+ return 0;
13577+ ;
13578+ return 0;
13579+}
13580+_ACEOF
13581+rm -f conftest.$ac_objext
13582+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13583+ (eval $ac_compile) 2>conftest.er1
13584+ ac_status=$?
13585+ grep -v '^ *+' conftest.er1 >conftest.err
13586+ rm -f conftest.er1
13587+ cat conftest.err >&5
13588+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13589+ (exit $ac_status); } &&
13590+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13591+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13592+ (eval $ac_try) 2>&5
13593+ ac_status=$?
13594+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13595+ (exit $ac_status); }; } &&
13596+ { ac_try='test -s conftest.$ac_objext'
13597+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13598+ (eval $ac_try) 2>&5
13599+ ac_status=$?
13600+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13601+ (exit $ac_status); }; }; then
13602+ ac_cv_type_u_int32_t=yes
13603+else
13604+ echo "$as_me: failed program was:" >&5
13605+sed 's/^/| /' conftest.$ac_ext >&5
13606+
13607+ac_cv_type_u_int32_t=no
13608+fi
13609+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13610+fi
13611+echo "$as_me:$LINENO: result: $ac_cv_type_u_int32_t" >&5
13612+echo "${ECHO_T}$ac_cv_type_u_int32_t" >&6
13613+if test $ac_cv_type_u_int32_t = yes; then
13614+ acx_cv_header_stdint=$i
13615+else
13616+ continue
13617+fi
13618+
13619+ echo "$as_me:$LINENO: checking for u_int64_t" >&5
13620+echo $ECHO_N "checking for u_int64_t... $ECHO_C" >&6
13621+if test "${ac_cv_type_u_int64_t+set}" = set; then
13622+ echo $ECHO_N "(cached) $ECHO_C" >&6
13623+else
13624+ cat >conftest.$ac_ext <<_ACEOF
13625+/* confdefs.h. */
13626+_ACEOF
13627+cat confdefs.h >>conftest.$ac_ext
13628+cat >>conftest.$ac_ext <<_ACEOF
13629+/* end confdefs.h. */
13630+#include <sys/types.h>
13631+#include <$i>
13632+
13633+int
13634+main ()
13635+{
13636+if ((u_int64_t *) 0)
13637+ return 0;
13638+if (sizeof (u_int64_t))
13639+ return 0;
13640+ ;
13641+ return 0;
13642+}
13643+_ACEOF
13644+rm -f conftest.$ac_objext
13645+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13646+ (eval $ac_compile) 2>conftest.er1
13647+ ac_status=$?
13648+ grep -v '^ *+' conftest.er1 >conftest.err
13649+ rm -f conftest.er1
13650+ cat conftest.err >&5
13651+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13652+ (exit $ac_status); } &&
13653+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13654+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13655+ (eval $ac_try) 2>&5
13656+ ac_status=$?
13657+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13658+ (exit $ac_status); }; } &&
13659+ { ac_try='test -s conftest.$ac_objext'
13660+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13661+ (eval $ac_try) 2>&5
13662+ ac_status=$?
13663+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13664+ (exit $ac_status); }; }; then
13665+ ac_cv_type_u_int64_t=yes
13666+else
13667+ echo "$as_me: failed program was:" >&5
13668+sed 's/^/| /' conftest.$ac_ext >&5
13669+
13670+ac_cv_type_u_int64_t=no
13671+fi
13672+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13673+fi
13674+echo "$as_me:$LINENO: result: $ac_cv_type_u_int64_t" >&5
13675+echo "${ECHO_T}$ac_cv_type_u_int64_t" >&6
13676+if test $ac_cv_type_u_int64_t = yes; then
13677+ :
13678+else
13679+ acx_cv_header_stdint_kind="(u_intXX_t style, lacks u_int64_t)"
13680+fi
13681+
13682+ break
13683+ done
13684+fi
13685+if test "$acx_cv_header_stdint" = stddef.h; then
13686+ acx_cv_header_stdint_kind="(using manual detection)"
13687+fi
13688+
13689+test -z "$ac_cv_type_uintptr_t" && ac_cv_type_uintptr_t=no
13690+test -z "$ac_cv_type_uint64_t" && ac_cv_type_uint64_t=no
13691+test -z "$ac_cv_type_u_int64_t" && ac_cv_type_u_int64_t=no
13692+test -z "$ac_cv_type_int_least32_t" && ac_cv_type_int_least32_t=no
13693+test -z "$ac_cv_type_int_fast32_t" && ac_cv_type_int_fast32_t=no
13694+
13695+# ----------------- Summarize what we found so far
13696+
13697+echo "$as_me:$LINENO: checking what to include in gdb_stdint.h" >&5
13698+echo $ECHO_N "checking what to include in gdb_stdint.h... $ECHO_C" >&6
13699+
13700+case `$as_basename gdb_stdint.h ||
13701+$as_expr X/gdb_stdint.h : '.*/\([^/][^/]*\)/*$' \| \
13702+ Xgdb_stdint.h : 'X\(//\)$' \| \
13703+ Xgdb_stdint.h : 'X\(/\)$' \| \
13704+ . : '\(.\)' 2>/dev/null ||
13705+echo X/gdb_stdint.h |
13706+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
13707+ /^X\/\(\/\/\)$/{ s//\1/; q; }
13708+ /^X\/\(\/\).*/{ s//\1/; q; }
13709+ s/.*/./; q'` in
13710+ stdint.h) { echo "$as_me:$LINENO: WARNING: are you sure you want it there?" >&5
13711+echo "$as_me: WARNING: are you sure you want it there?" >&2;} ;;
13712+ inttypes.h) { echo "$as_me:$LINENO: WARNING: are you sure you want it there?" >&5
13713+echo "$as_me: WARNING: are you sure you want it there?" >&2;} ;;
13714+ *) ;;
13715+esac
13716+
13717+echo "$as_me:$LINENO: result: $acx_cv_header_stdint $acx_cv_header_stdint_kind" >&5
13718+echo "${ECHO_T}$acx_cv_header_stdint $acx_cv_header_stdint_kind" >&6
13719+
13720+# ----------------- done included file, check C basic types --------
13721+
13722+# Lacking an uintptr_t? Test size of void *
13723+case "$acx_cv_header_stdint:$ac_cv_type_uintptr_t" in
13724+ stddef.h:* | *:no) echo "$as_me:$LINENO: checking for void *" >&5
13725+echo $ECHO_N "checking for void *... $ECHO_C" >&6
13726+if test "${ac_cv_type_void_p+set}" = set; then
13727+ echo $ECHO_N "(cached) $ECHO_C" >&6
13728+else
13729+ cat >conftest.$ac_ext <<_ACEOF
13730+/* confdefs.h. */
13731+_ACEOF
13732+cat confdefs.h >>conftest.$ac_ext
13733+cat >>conftest.$ac_ext <<_ACEOF
13734+/* end confdefs.h. */
13735+$ac_includes_default
13736+int
13737+main ()
13738+{
13739+if ((void * *) 0)
13740+ return 0;
13741+if (sizeof (void *))
13742+ return 0;
13743+ ;
13744+ return 0;
13745+}
13746+_ACEOF
13747+rm -f conftest.$ac_objext
13748+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13749+ (eval $ac_compile) 2>conftest.er1
13750+ ac_status=$?
13751+ grep -v '^ *+' conftest.er1 >conftest.err
13752+ rm -f conftest.er1
13753+ cat conftest.err >&5
13754+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13755+ (exit $ac_status); } &&
13756+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13757+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13758+ (eval $ac_try) 2>&5
13759+ ac_status=$?
13760+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13761+ (exit $ac_status); }; } &&
13762+ { ac_try='test -s conftest.$ac_objext'
13763+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13764+ (eval $ac_try) 2>&5
13765+ ac_status=$?
13766+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13767+ (exit $ac_status); }; }; then
13768+ ac_cv_type_void_p=yes
13769+else
13770+ echo "$as_me: failed program was:" >&5
13771+sed 's/^/| /' conftest.$ac_ext >&5
13772+
13773+ac_cv_type_void_p=no
13774+fi
13775+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13776+fi
13777+echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
13778+echo "${ECHO_T}$ac_cv_type_void_p" >&6
13779+
13780+echo "$as_me:$LINENO: checking size of void *" >&5
13781+echo $ECHO_N "checking size of void *... $ECHO_C" >&6
13782+if test "${ac_cv_sizeof_void_p+set}" = set; then
13783+ echo $ECHO_N "(cached) $ECHO_C" >&6
13784+else
13785+ if test "$ac_cv_type_void_p" = yes; then
13786+ # The cast to unsigned long works around a bug in the HP C Compiler
13787+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13788+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13789+ # This bug is HP SR number 8606223364.
13790+ if test "$cross_compiling" = yes; then
13791+ # Depending upon the size, compute the lo and hi bounds.
13792+cat >conftest.$ac_ext <<_ACEOF
13793+/* confdefs.h. */
13794+_ACEOF
13795+cat confdefs.h >>conftest.$ac_ext
13796+cat >>conftest.$ac_ext <<_ACEOF
13797+/* end confdefs.h. */
13798+$ac_includes_default
13799+int
13800+main ()
13801+{
13802+static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
13803+test_array [0] = 0
13804+
13805+ ;
13806+ return 0;
13807+}
13808+_ACEOF
13809+rm -f conftest.$ac_objext
13810+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13811+ (eval $ac_compile) 2>conftest.er1
13812+ ac_status=$?
13813+ grep -v '^ *+' conftest.er1 >conftest.err
13814+ rm -f conftest.er1
13815+ cat conftest.err >&5
13816+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13817+ (exit $ac_status); } &&
13818+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13819+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13820+ (eval $ac_try) 2>&5
13821+ ac_status=$?
13822+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13823+ (exit $ac_status); }; } &&
13824+ { ac_try='test -s conftest.$ac_objext'
13825+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13826+ (eval $ac_try) 2>&5
13827+ ac_status=$?
13828+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13829+ (exit $ac_status); }; }; then
13830+ ac_lo=0 ac_mid=0
13831+ while :; do
13832+ cat >conftest.$ac_ext <<_ACEOF
13833+/* confdefs.h. */
13834+_ACEOF
13835+cat confdefs.h >>conftest.$ac_ext
13836+cat >>conftest.$ac_ext <<_ACEOF
13837+/* end confdefs.h. */
13838+$ac_includes_default
13839+int
13840+main ()
13841+{
13842+static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
13843+test_array [0] = 0
13844+
13845+ ;
13846+ return 0;
13847+}
13848+_ACEOF
13849+rm -f conftest.$ac_objext
13850+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13851+ (eval $ac_compile) 2>conftest.er1
13852+ ac_status=$?
13853+ grep -v '^ *+' conftest.er1 >conftest.err
13854+ rm -f conftest.er1
13855+ cat conftest.err >&5
13856+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13857+ (exit $ac_status); } &&
13858+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13859+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13860+ (eval $ac_try) 2>&5
13861+ ac_status=$?
13862+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13863+ (exit $ac_status); }; } &&
13864+ { ac_try='test -s conftest.$ac_objext'
13865+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13866+ (eval $ac_try) 2>&5
13867+ ac_status=$?
13868+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13869+ (exit $ac_status); }; }; then
13870+ ac_hi=$ac_mid; break
13871+else
13872+ echo "$as_me: failed program was:" >&5
13873+sed 's/^/| /' conftest.$ac_ext >&5
13874+
13875+ac_lo=`expr $ac_mid + 1`
13876+ if test $ac_lo -le $ac_mid; then
13877+ ac_lo= ac_hi=
13878+ break
13879+ fi
13880+ ac_mid=`expr 2 '*' $ac_mid + 1`
13881+fi
13882+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13883+ done
13884+else
13885+ echo "$as_me: failed program was:" >&5
13886+sed 's/^/| /' conftest.$ac_ext >&5
13887+
13888+cat >conftest.$ac_ext <<_ACEOF
13889+/* confdefs.h. */
13890+_ACEOF
13891+cat confdefs.h >>conftest.$ac_ext
13892+cat >>conftest.$ac_ext <<_ACEOF
13893+/* end confdefs.h. */
13894+$ac_includes_default
13895+int
13896+main ()
13897+{
13898+static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
13899+test_array [0] = 0
13900+
13901+ ;
13902+ return 0;
13903+}
13904+_ACEOF
13905+rm -f conftest.$ac_objext
13906+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13907+ (eval $ac_compile) 2>conftest.er1
13908+ ac_status=$?
13909+ grep -v '^ *+' conftest.er1 >conftest.err
13910+ rm -f conftest.er1
13911+ cat conftest.err >&5
13912+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13913+ (exit $ac_status); } &&
13914+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13915+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13916+ (eval $ac_try) 2>&5
13917+ ac_status=$?
13918+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13919+ (exit $ac_status); }; } &&
13920+ { ac_try='test -s conftest.$ac_objext'
13921+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13922+ (eval $ac_try) 2>&5
13923+ ac_status=$?
13924+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13925+ (exit $ac_status); }; }; then
13926+ ac_hi=-1 ac_mid=-1
13927+ while :; do
13928+ cat >conftest.$ac_ext <<_ACEOF
13929+/* confdefs.h. */
13930+_ACEOF
13931+cat confdefs.h >>conftest.$ac_ext
13932+cat >>conftest.$ac_ext <<_ACEOF
13933+/* end confdefs.h. */
13934+$ac_includes_default
13935+int
13936+main ()
13937+{
13938+static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
13939+test_array [0] = 0
13940+
13941+ ;
13942+ return 0;
13943+}
13944+_ACEOF
13945+rm -f conftest.$ac_objext
13946+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13947+ (eval $ac_compile) 2>conftest.er1
13948+ ac_status=$?
13949+ grep -v '^ *+' conftest.er1 >conftest.err
13950+ rm -f conftest.er1
13951+ cat conftest.err >&5
13952+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13953+ (exit $ac_status); } &&
13954+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13955+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13956+ (eval $ac_try) 2>&5
13957+ ac_status=$?
13958+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13959+ (exit $ac_status); }; } &&
13960+ { ac_try='test -s conftest.$ac_objext'
13961+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13962+ (eval $ac_try) 2>&5
13963+ ac_status=$?
13964+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
13965+ (exit $ac_status); }; }; then
13966+ ac_lo=$ac_mid; break
13967+else
13968+ echo "$as_me: failed program was:" >&5
13969+sed 's/^/| /' conftest.$ac_ext >&5
13970+
13971+ac_hi=`expr '(' $ac_mid ')' - 1`
13972+ if test $ac_mid -le $ac_hi; then
13973+ ac_lo= ac_hi=
13974+ break
13975+ fi
13976+ ac_mid=`expr 2 '*' $ac_mid`
13977+fi
13978+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13979+ done
13980+else
13981+ echo "$as_me: failed program was:" >&5
13982+sed 's/^/| /' conftest.$ac_ext >&5
13983+
13984+ac_lo= ac_hi=
13985+fi
13986+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13987+fi
13988+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13989+# Binary search between lo and hi bounds.
13990+while test "x$ac_lo" != "x$ac_hi"; do
13991+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13992+ cat >conftest.$ac_ext <<_ACEOF
13993+/* confdefs.h. */
13994+_ACEOF
13995+cat confdefs.h >>conftest.$ac_ext
13996+cat >>conftest.$ac_ext <<_ACEOF
13997+/* end confdefs.h. */
13998+$ac_includes_default
13999+int
14000+main ()
14001+{
14002+static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
14003+test_array [0] = 0
14004+
14005+ ;
14006+ return 0;
14007+}
14008+_ACEOF
14009+rm -f conftest.$ac_objext
14010+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14011+ (eval $ac_compile) 2>conftest.er1
14012+ ac_status=$?
14013+ grep -v '^ *+' conftest.er1 >conftest.err
14014+ rm -f conftest.er1
14015+ cat conftest.err >&5
14016+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14017+ (exit $ac_status); } &&
14018+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14019+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14020+ (eval $ac_try) 2>&5
14021+ ac_status=$?
14022+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14023+ (exit $ac_status); }; } &&
14024+ { ac_try='test -s conftest.$ac_objext'
14025+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14026+ (eval $ac_try) 2>&5
14027+ ac_status=$?
14028+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14029+ (exit $ac_status); }; }; then
14030+ ac_hi=$ac_mid
14031+else
14032+ echo "$as_me: failed program was:" >&5
14033+sed 's/^/| /' conftest.$ac_ext >&5
14034+
14035+ac_lo=`expr '(' $ac_mid ')' + 1`
14036+fi
14037+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14038+done
14039+case $ac_lo in
14040+?*) ac_cv_sizeof_void_p=$ac_lo;;
14041+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
14042+See \`config.log' for more details." >&5
14043+echo "$as_me: error: cannot compute sizeof (void *), 77
14044+See \`config.log' for more details." >&2;}
14045+ { (exit 1); exit 1; }; } ;;
14046+esac
14047+else
14048+ if test "$cross_compiling" = yes; then
14049+ { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
14050+echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
14051+ { (exit 1); exit 1; }; }
14052+else
14053+ cat >conftest.$ac_ext <<_ACEOF
14054+/* confdefs.h. */
14055+_ACEOF
14056+cat confdefs.h >>conftest.$ac_ext
14057+cat >>conftest.$ac_ext <<_ACEOF
14058+/* end confdefs.h. */
14059+$ac_includes_default
14060+long longval () { return (long) (sizeof (void *)); }
14061+unsigned long ulongval () { return (long) (sizeof (void *)); }
14062+#include <stdio.h>
14063+#include <stdlib.h>
14064+int
14065+main ()
14066+{
14067+
14068+ FILE *f = fopen ("conftest.val", "w");
14069+ if (! f)
14070+ exit (1);
14071+ if (((long) (sizeof (void *))) < 0)
14072+ {
14073+ long i = longval ();
14074+ if (i != ((long) (sizeof (void *))))
14075+ exit (1);
14076+ fprintf (f, "%ld\n", i);
14077+ }
14078+ else
14079+ {
14080+ unsigned long i = ulongval ();
14081+ if (i != ((long) (sizeof (void *))))
14082+ exit (1);
14083+ fprintf (f, "%lu\n", i);
14084+ }
14085+ exit (ferror (f) || fclose (f) != 0);
14086+
14087+ ;
14088+ return 0;
14089+}
14090+_ACEOF
14091+rm -f conftest$ac_exeext
14092+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14093+ (eval $ac_link) 2>&5
14094+ ac_status=$?
14095+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14096+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14097+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14098+ (eval $ac_try) 2>&5
14099+ ac_status=$?
14100+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14101+ (exit $ac_status); }; }; then
14102+ ac_cv_sizeof_void_p=`cat conftest.val`
14103+else
14104+ echo "$as_me: program exited with status $ac_status" >&5
14105+echo "$as_me: failed program was:" >&5
14106+sed 's/^/| /' conftest.$ac_ext >&5
14107+
14108+( exit $ac_status )
14109+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
14110+See \`config.log' for more details." >&5
14111+echo "$as_me: error: cannot compute sizeof (void *), 77
14112+See \`config.log' for more details." >&2;}
14113+ { (exit 1); exit 1; }; }
14114+fi
14115+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14116+fi
14117+fi
14118+rm -f conftest.val
14119+else
14120+ ac_cv_sizeof_void_p=0
14121+fi
14122+fi
14123+echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
14124+echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
14125+cat >>confdefs.h <<_ACEOF
14126+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
14127+_ACEOF
14128+
14129+ ;;
14130+esac
14131+
14132+# Lacking an uint64_t? Test size of long
14133+case "$acx_cv_header_stdint:$ac_cv_type_uint64_t:$ac_cv_type_u_int64_t" in
14134+ stddef.h:*:* | *:no:no) echo "$as_me:$LINENO: checking for long" >&5
14135+echo $ECHO_N "checking for long... $ECHO_C" >&6
14136+if test "${ac_cv_type_long+set}" = set; then
14137+ echo $ECHO_N "(cached) $ECHO_C" >&6
14138+else
14139+ cat >conftest.$ac_ext <<_ACEOF
14140+/* confdefs.h. */
14141+_ACEOF
14142+cat confdefs.h >>conftest.$ac_ext
14143+cat >>conftest.$ac_ext <<_ACEOF
14144+/* end confdefs.h. */
14145+$ac_includes_default
14146+int
14147+main ()
14148+{
14149+if ((long *) 0)
14150+ return 0;
14151+if (sizeof (long))
14152+ return 0;
14153+ ;
14154+ return 0;
14155+}
14156+_ACEOF
14157+rm -f conftest.$ac_objext
14158+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14159+ (eval $ac_compile) 2>conftest.er1
14160+ ac_status=$?
14161+ grep -v '^ *+' conftest.er1 >conftest.err
14162+ rm -f conftest.er1
14163+ cat conftest.err >&5
14164+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14165+ (exit $ac_status); } &&
14166+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14167+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14168+ (eval $ac_try) 2>&5
14169+ ac_status=$?
14170+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14171+ (exit $ac_status); }; } &&
14172+ { ac_try='test -s conftest.$ac_objext'
14173+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14174+ (eval $ac_try) 2>&5
14175+ ac_status=$?
14176+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14177+ (exit $ac_status); }; }; then
14178+ ac_cv_type_long=yes
14179+else
14180+ echo "$as_me: failed program was:" >&5
14181+sed 's/^/| /' conftest.$ac_ext >&5
14182+
14183+ac_cv_type_long=no
14184+fi
14185+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14186+fi
14187+echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
14188+echo "${ECHO_T}$ac_cv_type_long" >&6
14189+
14190+echo "$as_me:$LINENO: checking size of long" >&5
14191+echo $ECHO_N "checking size of long... $ECHO_C" >&6
14192+if test "${ac_cv_sizeof_long+set}" = set; then
14193+ echo $ECHO_N "(cached) $ECHO_C" >&6
14194+else
14195+ if test "$ac_cv_type_long" = yes; then
14196+ # The cast to unsigned long works around a bug in the HP C Compiler
14197+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14198+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14199+ # This bug is HP SR number 8606223364.
14200+ if test "$cross_compiling" = yes; then
14201+ # Depending upon the size, compute the lo and hi bounds.
14202+cat >conftest.$ac_ext <<_ACEOF
14203+/* confdefs.h. */
14204+_ACEOF
14205+cat confdefs.h >>conftest.$ac_ext
14206+cat >>conftest.$ac_ext <<_ACEOF
14207+/* end confdefs.h. */
14208+$ac_includes_default
14209+int
14210+main ()
14211+{
14212+static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
14213+test_array [0] = 0
14214+
14215+ ;
14216+ return 0;
14217+}
14218+_ACEOF
14219+rm -f conftest.$ac_objext
14220+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14221+ (eval $ac_compile) 2>conftest.er1
14222+ ac_status=$?
14223+ grep -v '^ *+' conftest.er1 >conftest.err
14224+ rm -f conftest.er1
14225+ cat conftest.err >&5
14226+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14227+ (exit $ac_status); } &&
14228+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14229+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14230+ (eval $ac_try) 2>&5
14231+ ac_status=$?
14232+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14233+ (exit $ac_status); }; } &&
14234+ { ac_try='test -s conftest.$ac_objext'
14235+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14236+ (eval $ac_try) 2>&5
14237+ ac_status=$?
14238+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14239+ (exit $ac_status); }; }; then
14240+ ac_lo=0 ac_mid=0
14241+ while :; do
14242+ cat >conftest.$ac_ext <<_ACEOF
14243+/* confdefs.h. */
14244+_ACEOF
14245+cat confdefs.h >>conftest.$ac_ext
14246+cat >>conftest.$ac_ext <<_ACEOF
14247+/* end confdefs.h. */
14248+$ac_includes_default
14249+int
14250+main ()
14251+{
14252+static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
14253+test_array [0] = 0
14254+
14255+ ;
14256+ return 0;
14257+}
14258+_ACEOF
14259+rm -f conftest.$ac_objext
14260+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14261+ (eval $ac_compile) 2>conftest.er1
14262+ ac_status=$?
14263+ grep -v '^ *+' conftest.er1 >conftest.err
14264+ rm -f conftest.er1
14265+ cat conftest.err >&5
14266+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14267+ (exit $ac_status); } &&
14268+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14269+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14270+ (eval $ac_try) 2>&5
14271+ ac_status=$?
14272+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14273+ (exit $ac_status); }; } &&
14274+ { ac_try='test -s conftest.$ac_objext'
14275+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14276+ (eval $ac_try) 2>&5
14277+ ac_status=$?
14278+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14279+ (exit $ac_status); }; }; then
14280+ ac_hi=$ac_mid; break
14281+else
14282+ echo "$as_me: failed program was:" >&5
14283+sed 's/^/| /' conftest.$ac_ext >&5
14284+
14285+ac_lo=`expr $ac_mid + 1`
14286+ if test $ac_lo -le $ac_mid; then
14287+ ac_lo= ac_hi=
14288+ break
14289+ fi
14290+ ac_mid=`expr 2 '*' $ac_mid + 1`
14291+fi
14292+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14293+ done
14294+else
14295+ echo "$as_me: failed program was:" >&5
14296+sed 's/^/| /' conftest.$ac_ext >&5
14297+
14298+cat >conftest.$ac_ext <<_ACEOF
14299+/* confdefs.h. */
14300+_ACEOF
14301+cat confdefs.h >>conftest.$ac_ext
14302+cat >>conftest.$ac_ext <<_ACEOF
14303+/* end confdefs.h. */
14304+$ac_includes_default
14305+int
14306+main ()
14307+{
14308+static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
14309+test_array [0] = 0
14310+
14311+ ;
14312+ return 0;
14313+}
14314+_ACEOF
14315+rm -f conftest.$ac_objext
14316+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14317+ (eval $ac_compile) 2>conftest.er1
14318+ ac_status=$?
14319+ grep -v '^ *+' conftest.er1 >conftest.err
14320+ rm -f conftest.er1
14321+ cat conftest.err >&5
14322+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14323+ (exit $ac_status); } &&
14324+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14325+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14326+ (eval $ac_try) 2>&5
14327+ ac_status=$?
14328+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14329+ (exit $ac_status); }; } &&
14330+ { ac_try='test -s conftest.$ac_objext'
14331+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14332+ (eval $ac_try) 2>&5
14333+ ac_status=$?
14334+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14335+ (exit $ac_status); }; }; then
14336+ ac_hi=-1 ac_mid=-1
14337+ while :; do
14338+ cat >conftest.$ac_ext <<_ACEOF
14339+/* confdefs.h. */
14340+_ACEOF
14341+cat confdefs.h >>conftest.$ac_ext
14342+cat >>conftest.$ac_ext <<_ACEOF
14343+/* end confdefs.h. */
14344+$ac_includes_default
14345+int
14346+main ()
14347+{
14348+static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
14349+test_array [0] = 0
14350+
14351+ ;
14352+ return 0;
14353+}
14354+_ACEOF
14355+rm -f conftest.$ac_objext
14356+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14357+ (eval $ac_compile) 2>conftest.er1
14358+ ac_status=$?
14359+ grep -v '^ *+' conftest.er1 >conftest.err
14360+ rm -f conftest.er1
14361+ cat conftest.err >&5
14362+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14363+ (exit $ac_status); } &&
14364+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14365+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14366+ (eval $ac_try) 2>&5
14367+ ac_status=$?
14368+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14369+ (exit $ac_status); }; } &&
14370+ { ac_try='test -s conftest.$ac_objext'
14371+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14372+ (eval $ac_try) 2>&5
14373+ ac_status=$?
14374+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14375+ (exit $ac_status); }; }; then
14376+ ac_lo=$ac_mid; break
14377+else
14378+ echo "$as_me: failed program was:" >&5
14379+sed 's/^/| /' conftest.$ac_ext >&5
14380+
14381+ac_hi=`expr '(' $ac_mid ')' - 1`
14382+ if test $ac_mid -le $ac_hi; then
14383+ ac_lo= ac_hi=
14384+ break
14385+ fi
14386+ ac_mid=`expr 2 '*' $ac_mid`
14387+fi
14388+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14389+ done
14390+else
14391+ echo "$as_me: failed program was:" >&5
14392+sed 's/^/| /' conftest.$ac_ext >&5
14393+
14394+ac_lo= ac_hi=
14395+fi
14396+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14397+fi
14398+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14399+# Binary search between lo and hi bounds.
14400+while test "x$ac_lo" != "x$ac_hi"; do
14401+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14402+ cat >conftest.$ac_ext <<_ACEOF
14403+/* confdefs.h. */
14404+_ACEOF
14405+cat confdefs.h >>conftest.$ac_ext
14406+cat >>conftest.$ac_ext <<_ACEOF
14407+/* end confdefs.h. */
14408+$ac_includes_default
14409+int
14410+main ()
14411+{
14412+static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
14413+test_array [0] = 0
14414+
14415+ ;
14416+ return 0;
14417+}
14418+_ACEOF
14419+rm -f conftest.$ac_objext
14420+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14421+ (eval $ac_compile) 2>conftest.er1
14422+ ac_status=$?
14423+ grep -v '^ *+' conftest.er1 >conftest.err
14424+ rm -f conftest.er1
14425+ cat conftest.err >&5
14426+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14427+ (exit $ac_status); } &&
14428+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14429+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14430+ (eval $ac_try) 2>&5
14431+ ac_status=$?
14432+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14433+ (exit $ac_status); }; } &&
14434+ { ac_try='test -s conftest.$ac_objext'
14435+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14436+ (eval $ac_try) 2>&5
14437+ ac_status=$?
14438+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14439+ (exit $ac_status); }; }; then
14440+ ac_hi=$ac_mid
14441+else
14442+ echo "$as_me: failed program was:" >&5
14443+sed 's/^/| /' conftest.$ac_ext >&5
14444+
14445+ac_lo=`expr '(' $ac_mid ')' + 1`
14446+fi
14447+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14448+done
14449+case $ac_lo in
14450+?*) ac_cv_sizeof_long=$ac_lo;;
14451+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
14452+See \`config.log' for more details." >&5
14453+echo "$as_me: error: cannot compute sizeof (long), 77
14454+See \`config.log' for more details." >&2;}
14455+ { (exit 1); exit 1; }; } ;;
14456+esac
14457+else
14458+ if test "$cross_compiling" = yes; then
14459+ { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
14460+echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
14461+ { (exit 1); exit 1; }; }
14462+else
14463+ cat >conftest.$ac_ext <<_ACEOF
14464+/* confdefs.h. */
14465+_ACEOF
14466+cat confdefs.h >>conftest.$ac_ext
14467+cat >>conftest.$ac_ext <<_ACEOF
14468+/* end confdefs.h. */
14469+$ac_includes_default
14470+long longval () { return (long) (sizeof (long)); }
14471+unsigned long ulongval () { return (long) (sizeof (long)); }
14472+#include <stdio.h>
14473+#include <stdlib.h>
14474+int
14475+main ()
14476+{
14477+
14478+ FILE *f = fopen ("conftest.val", "w");
14479+ if (! f)
14480+ exit (1);
14481+ if (((long) (sizeof (long))) < 0)
14482+ {
14483+ long i = longval ();
14484+ if (i != ((long) (sizeof (long))))
14485+ exit (1);
14486+ fprintf (f, "%ld\n", i);
14487+ }
14488+ else
14489+ {
14490+ unsigned long i = ulongval ();
14491+ if (i != ((long) (sizeof (long))))
14492+ exit (1);
14493+ fprintf (f, "%lu\n", i);
14494+ }
14495+ exit (ferror (f) || fclose (f) != 0);
14496+
14497+ ;
14498+ return 0;
14499+}
14500+_ACEOF
14501+rm -f conftest$ac_exeext
14502+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14503+ (eval $ac_link) 2>&5
14504+ ac_status=$?
14505+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14506+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14507+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14508+ (eval $ac_try) 2>&5
14509+ ac_status=$?
14510+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14511+ (exit $ac_status); }; }; then
14512+ ac_cv_sizeof_long=`cat conftest.val`
14513+else
14514+ echo "$as_me: program exited with status $ac_status" >&5
14515+echo "$as_me: failed program was:" >&5
14516+sed 's/^/| /' conftest.$ac_ext >&5
14517+
14518+( exit $ac_status )
14519+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
14520+See \`config.log' for more details." >&5
14521+echo "$as_me: error: cannot compute sizeof (long), 77
14522+See \`config.log' for more details." >&2;}
14523+ { (exit 1); exit 1; }; }
14524+fi
14525+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14526+fi
14527+fi
14528+rm -f conftest.val
14529+else
14530+ ac_cv_sizeof_long=0
14531+fi
14532+fi
14533+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
14534+echo "${ECHO_T}$ac_cv_sizeof_long" >&6
14535+cat >>confdefs.h <<_ACEOF
14536+#define SIZEOF_LONG $ac_cv_sizeof_long
14537+_ACEOF
14538+
14539+ ;;
14540+esac
14541+
14542+if test $acx_cv_header_stdint = stddef.h; then
14543+ # Lacking a good header? Test size of everything and deduce all types.
14544+ echo "$as_me:$LINENO: checking for int" >&5
14545+echo $ECHO_N "checking for int... $ECHO_C" >&6
14546+if test "${ac_cv_type_int+set}" = set; then
14547+ echo $ECHO_N "(cached) $ECHO_C" >&6
14548+else
14549+ cat >conftest.$ac_ext <<_ACEOF
14550+/* confdefs.h. */
14551+_ACEOF
14552+cat confdefs.h >>conftest.$ac_ext
14553+cat >>conftest.$ac_ext <<_ACEOF
14554+/* end confdefs.h. */
14555+$ac_includes_default
14556+int
14557+main ()
14558+{
14559+if ((int *) 0)
14560+ return 0;
14561+if (sizeof (int))
14562+ return 0;
14563+ ;
14564+ return 0;
14565+}
14566+_ACEOF
14567+rm -f conftest.$ac_objext
14568+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14569+ (eval $ac_compile) 2>conftest.er1
14570+ ac_status=$?
14571+ grep -v '^ *+' conftest.er1 >conftest.err
14572+ rm -f conftest.er1
14573+ cat conftest.err >&5
14574+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14575+ (exit $ac_status); } &&
14576+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14577+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14578+ (eval $ac_try) 2>&5
14579+ ac_status=$?
14580+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14581+ (exit $ac_status); }; } &&
14582+ { ac_try='test -s conftest.$ac_objext'
14583+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14584+ (eval $ac_try) 2>&5
14585+ ac_status=$?
14586+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14587+ (exit $ac_status); }; }; then
14588+ ac_cv_type_int=yes
14589+else
14590+ echo "$as_me: failed program was:" >&5
14591+sed 's/^/| /' conftest.$ac_ext >&5
14592+
14593+ac_cv_type_int=no
14594+fi
14595+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14596+fi
14597+echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
14598+echo "${ECHO_T}$ac_cv_type_int" >&6
14599+
14600+echo "$as_me:$LINENO: checking size of int" >&5
14601+echo $ECHO_N "checking size of int... $ECHO_C" >&6
14602+if test "${ac_cv_sizeof_int+set}" = set; then
14603+ echo $ECHO_N "(cached) $ECHO_C" >&6
14604+else
14605+ if test "$ac_cv_type_int" = yes; then
14606+ # The cast to unsigned long works around a bug in the HP C Compiler
14607+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14608+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14609+ # This bug is HP SR number 8606223364.
14610+ if test "$cross_compiling" = yes; then
14611+ # Depending upon the size, compute the lo and hi bounds.
14612+cat >conftest.$ac_ext <<_ACEOF
14613+/* confdefs.h. */
14614+_ACEOF
14615+cat confdefs.h >>conftest.$ac_ext
14616+cat >>conftest.$ac_ext <<_ACEOF
14617+/* end confdefs.h. */
14618+$ac_includes_default
14619+int
14620+main ()
14621+{
14622+static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
14623+test_array [0] = 0
14624+
14625+ ;
14626+ return 0;
14627+}
14628+_ACEOF
14629+rm -f conftest.$ac_objext
14630+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14631+ (eval $ac_compile) 2>conftest.er1
14632+ ac_status=$?
14633+ grep -v '^ *+' conftest.er1 >conftest.err
14634+ rm -f conftest.er1
14635+ cat conftest.err >&5
14636+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14637+ (exit $ac_status); } &&
14638+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14639+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14640+ (eval $ac_try) 2>&5
14641+ ac_status=$?
14642+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14643+ (exit $ac_status); }; } &&
14644+ { ac_try='test -s conftest.$ac_objext'
14645+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14646+ (eval $ac_try) 2>&5
14647+ ac_status=$?
14648+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14649+ (exit $ac_status); }; }; then
14650+ ac_lo=0 ac_mid=0
14651+ while :; do
14652+ cat >conftest.$ac_ext <<_ACEOF
14653+/* confdefs.h. */
14654+_ACEOF
14655+cat confdefs.h >>conftest.$ac_ext
14656+cat >>conftest.$ac_ext <<_ACEOF
14657+/* end confdefs.h. */
14658+$ac_includes_default
14659+int
14660+main ()
14661+{
14662+static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
14663+test_array [0] = 0
14664+
14665+ ;
14666+ return 0;
14667+}
14668+_ACEOF
14669+rm -f conftest.$ac_objext
14670+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14671+ (eval $ac_compile) 2>conftest.er1
14672+ ac_status=$?
14673+ grep -v '^ *+' conftest.er1 >conftest.err
14674+ rm -f conftest.er1
14675+ cat conftest.err >&5
14676+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14677+ (exit $ac_status); } &&
14678+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14679+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14680+ (eval $ac_try) 2>&5
14681+ ac_status=$?
14682+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14683+ (exit $ac_status); }; } &&
14684+ { ac_try='test -s conftest.$ac_objext'
14685+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14686+ (eval $ac_try) 2>&5
14687+ ac_status=$?
14688+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14689+ (exit $ac_status); }; }; then
14690+ ac_hi=$ac_mid; break
14691+else
14692+ echo "$as_me: failed program was:" >&5
14693+sed 's/^/| /' conftest.$ac_ext >&5
14694+
14695+ac_lo=`expr $ac_mid + 1`
14696+ if test $ac_lo -le $ac_mid; then
14697+ ac_lo= ac_hi=
14698+ break
14699+ fi
14700+ ac_mid=`expr 2 '*' $ac_mid + 1`
14701+fi
14702+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14703+ done
14704+else
14705+ echo "$as_me: failed program was:" >&5
14706+sed 's/^/| /' conftest.$ac_ext >&5
14707+
14708+cat >conftest.$ac_ext <<_ACEOF
14709+/* confdefs.h. */
14710+_ACEOF
14711+cat confdefs.h >>conftest.$ac_ext
14712+cat >>conftest.$ac_ext <<_ACEOF
14713+/* end confdefs.h. */
14714+$ac_includes_default
14715+int
14716+main ()
14717+{
14718+static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
14719+test_array [0] = 0
14720+
14721+ ;
14722+ return 0;
14723+}
14724+_ACEOF
14725+rm -f conftest.$ac_objext
14726+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14727+ (eval $ac_compile) 2>conftest.er1
14728+ ac_status=$?
14729+ grep -v '^ *+' conftest.er1 >conftest.err
14730+ rm -f conftest.er1
14731+ cat conftest.err >&5
14732+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14733+ (exit $ac_status); } &&
14734+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14735+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14736+ (eval $ac_try) 2>&5
14737+ ac_status=$?
14738+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14739+ (exit $ac_status); }; } &&
14740+ { ac_try='test -s conftest.$ac_objext'
14741+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14742+ (eval $ac_try) 2>&5
14743+ ac_status=$?
14744+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14745+ (exit $ac_status); }; }; then
14746+ ac_hi=-1 ac_mid=-1
14747+ while :; do
14748+ cat >conftest.$ac_ext <<_ACEOF
14749+/* confdefs.h. */
14750+_ACEOF
14751+cat confdefs.h >>conftest.$ac_ext
14752+cat >>conftest.$ac_ext <<_ACEOF
14753+/* end confdefs.h. */
14754+$ac_includes_default
14755+int
14756+main ()
14757+{
14758+static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
14759+test_array [0] = 0
14760+
14761+ ;
14762+ return 0;
14763+}
14764+_ACEOF
14765+rm -f conftest.$ac_objext
14766+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14767+ (eval $ac_compile) 2>conftest.er1
14768+ ac_status=$?
14769+ grep -v '^ *+' conftest.er1 >conftest.err
14770+ rm -f conftest.er1
14771+ cat conftest.err >&5
14772+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14773+ (exit $ac_status); } &&
14774+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14775+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14776+ (eval $ac_try) 2>&5
14777+ ac_status=$?
14778+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14779+ (exit $ac_status); }; } &&
14780+ { ac_try='test -s conftest.$ac_objext'
14781+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14782+ (eval $ac_try) 2>&5
14783+ ac_status=$?
14784+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14785+ (exit $ac_status); }; }; then
14786+ ac_lo=$ac_mid; break
14787+else
14788+ echo "$as_me: failed program was:" >&5
14789+sed 's/^/| /' conftest.$ac_ext >&5
14790+
14791+ac_hi=`expr '(' $ac_mid ')' - 1`
14792+ if test $ac_mid -le $ac_hi; then
14793+ ac_lo= ac_hi=
14794+ break
14795+ fi
14796+ ac_mid=`expr 2 '*' $ac_mid`
14797+fi
14798+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14799+ done
14800+else
14801+ echo "$as_me: failed program was:" >&5
14802+sed 's/^/| /' conftest.$ac_ext >&5
14803+
14804+ac_lo= ac_hi=
14805+fi
14806+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14807+fi
14808+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14809+# Binary search between lo and hi bounds.
14810+while test "x$ac_lo" != "x$ac_hi"; do
14811+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14812+ cat >conftest.$ac_ext <<_ACEOF
14813+/* confdefs.h. */
14814+_ACEOF
14815+cat confdefs.h >>conftest.$ac_ext
14816+cat >>conftest.$ac_ext <<_ACEOF
14817+/* end confdefs.h. */
14818+$ac_includes_default
14819+int
14820+main ()
14821+{
14822+static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
14823+test_array [0] = 0
14824+
14825+ ;
14826+ return 0;
14827+}
14828+_ACEOF
14829+rm -f conftest.$ac_objext
14830+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14831+ (eval $ac_compile) 2>conftest.er1
14832+ ac_status=$?
14833+ grep -v '^ *+' conftest.er1 >conftest.err
14834+ rm -f conftest.er1
14835+ cat conftest.err >&5
14836+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14837+ (exit $ac_status); } &&
14838+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14839+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14840+ (eval $ac_try) 2>&5
14841+ ac_status=$?
14842+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14843+ (exit $ac_status); }; } &&
14844+ { ac_try='test -s conftest.$ac_objext'
14845+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14846+ (eval $ac_try) 2>&5
14847+ ac_status=$?
14848+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14849+ (exit $ac_status); }; }; then
14850+ ac_hi=$ac_mid
14851+else
14852+ echo "$as_me: failed program was:" >&5
14853+sed 's/^/| /' conftest.$ac_ext >&5
14854+
14855+ac_lo=`expr '(' $ac_mid ')' + 1`
14856+fi
14857+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14858+done
14859+case $ac_lo in
14860+?*) ac_cv_sizeof_int=$ac_lo;;
14861+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
14862+See \`config.log' for more details." >&5
14863+echo "$as_me: error: cannot compute sizeof (int), 77
14864+See \`config.log' for more details." >&2;}
14865+ { (exit 1); exit 1; }; } ;;
14866+esac
14867+else
14868+ if test "$cross_compiling" = yes; then
14869+ { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
14870+echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
14871+ { (exit 1); exit 1; }; }
14872+else
14873+ cat >conftest.$ac_ext <<_ACEOF
14874+/* confdefs.h. */
14875+_ACEOF
14876+cat confdefs.h >>conftest.$ac_ext
14877+cat >>conftest.$ac_ext <<_ACEOF
14878+/* end confdefs.h. */
14879+$ac_includes_default
14880+long longval () { return (long) (sizeof (int)); }
14881+unsigned long ulongval () { return (long) (sizeof (int)); }
14882+#include <stdio.h>
14883+#include <stdlib.h>
14884+int
14885+main ()
14886+{
14887+
14888+ FILE *f = fopen ("conftest.val", "w");
14889+ if (! f)
14890+ exit (1);
14891+ if (((long) (sizeof (int))) < 0)
14892+ {
14893+ long i = longval ();
14894+ if (i != ((long) (sizeof (int))))
14895+ exit (1);
14896+ fprintf (f, "%ld\n", i);
14897+ }
14898+ else
14899+ {
14900+ unsigned long i = ulongval ();
14901+ if (i != ((long) (sizeof (int))))
14902+ exit (1);
14903+ fprintf (f, "%lu\n", i);
14904+ }
14905+ exit (ferror (f) || fclose (f) != 0);
14906+
14907+ ;
14908+ return 0;
14909+}
14910+_ACEOF
14911+rm -f conftest$ac_exeext
14912+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14913+ (eval $ac_link) 2>&5
14914+ ac_status=$?
14915+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14916+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14917+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14918+ (eval $ac_try) 2>&5
14919+ ac_status=$?
14920+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14921+ (exit $ac_status); }; }; then
14922+ ac_cv_sizeof_int=`cat conftest.val`
14923+else
14924+ echo "$as_me: program exited with status $ac_status" >&5
14925+echo "$as_me: failed program was:" >&5
14926+sed 's/^/| /' conftest.$ac_ext >&5
14927+
14928+( exit $ac_status )
14929+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
14930+See \`config.log' for more details." >&5
14931+echo "$as_me: error: cannot compute sizeof (int), 77
14932+See \`config.log' for more details." >&2;}
14933+ { (exit 1); exit 1; }; }
14934+fi
14935+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14936+fi
14937+fi
14938+rm -f conftest.val
14939+else
14940+ ac_cv_sizeof_int=0
14941+fi
14942+fi
14943+echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
14944+echo "${ECHO_T}$ac_cv_sizeof_int" >&6
14945+cat >>confdefs.h <<_ACEOF
14946+#define SIZEOF_INT $ac_cv_sizeof_int
14947+_ACEOF
14948+
14949+
14950+ echo "$as_me:$LINENO: checking for short" >&5
14951+echo $ECHO_N "checking for short... $ECHO_C" >&6
14952+if test "${ac_cv_type_short+set}" = set; then
14953+ echo $ECHO_N "(cached) $ECHO_C" >&6
14954+else
14955+ cat >conftest.$ac_ext <<_ACEOF
14956+/* confdefs.h. */
14957+_ACEOF
14958+cat confdefs.h >>conftest.$ac_ext
14959+cat >>conftest.$ac_ext <<_ACEOF
14960+/* end confdefs.h. */
14961+$ac_includes_default
14962+int
14963+main ()
14964+{
14965+if ((short *) 0)
14966+ return 0;
14967+if (sizeof (short))
14968+ return 0;
14969+ ;
14970+ return 0;
14971+}
14972+_ACEOF
14973+rm -f conftest.$ac_objext
14974+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14975+ (eval $ac_compile) 2>conftest.er1
14976+ ac_status=$?
14977+ grep -v '^ *+' conftest.er1 >conftest.err
14978+ rm -f conftest.er1
14979+ cat conftest.err >&5
14980+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14981+ (exit $ac_status); } &&
14982+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14983+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14984+ (eval $ac_try) 2>&5
14985+ ac_status=$?
14986+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14987+ (exit $ac_status); }; } &&
14988+ { ac_try='test -s conftest.$ac_objext'
14989+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14990+ (eval $ac_try) 2>&5
14991+ ac_status=$?
14992+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14993+ (exit $ac_status); }; }; then
14994+ ac_cv_type_short=yes
14995+else
14996+ echo "$as_me: failed program was:" >&5
14997+sed 's/^/| /' conftest.$ac_ext >&5
14998+
14999+ac_cv_type_short=no
15000+fi
15001+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15002+fi
15003+echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
15004+echo "${ECHO_T}$ac_cv_type_short" >&6
15005+
15006+echo "$as_me:$LINENO: checking size of short" >&5
15007+echo $ECHO_N "checking size of short... $ECHO_C" >&6
15008+if test "${ac_cv_sizeof_short+set}" = set; then
15009+ echo $ECHO_N "(cached) $ECHO_C" >&6
15010+else
15011+ if test "$ac_cv_type_short" = yes; then
15012+ # The cast to unsigned long works around a bug in the HP C Compiler
15013+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15014+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15015+ # This bug is HP SR number 8606223364.
15016+ if test "$cross_compiling" = yes; then
15017+ # Depending upon the size, compute the lo and hi bounds.
15018+cat >conftest.$ac_ext <<_ACEOF
15019+/* confdefs.h. */
15020+_ACEOF
15021+cat confdefs.h >>conftest.$ac_ext
15022+cat >>conftest.$ac_ext <<_ACEOF
15023+/* end confdefs.h. */
15024+$ac_includes_default
15025+int
15026+main ()
15027+{
15028+static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
15029+test_array [0] = 0
15030+
15031+ ;
15032+ return 0;
15033+}
15034+_ACEOF
15035+rm -f conftest.$ac_objext
15036+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15037+ (eval $ac_compile) 2>conftest.er1
15038+ ac_status=$?
15039+ grep -v '^ *+' conftest.er1 >conftest.err
15040+ rm -f conftest.er1
15041+ cat conftest.err >&5
15042+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15043+ (exit $ac_status); } &&
15044+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15045+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15046+ (eval $ac_try) 2>&5
15047+ ac_status=$?
15048+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15049+ (exit $ac_status); }; } &&
15050+ { ac_try='test -s conftest.$ac_objext'
15051+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15052+ (eval $ac_try) 2>&5
15053+ ac_status=$?
15054+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15055+ (exit $ac_status); }; }; then
15056+ ac_lo=0 ac_mid=0
15057+ while :; do
15058+ cat >conftest.$ac_ext <<_ACEOF
15059+/* confdefs.h. */
15060+_ACEOF
15061+cat confdefs.h >>conftest.$ac_ext
15062+cat >>conftest.$ac_ext <<_ACEOF
15063+/* end confdefs.h. */
15064+$ac_includes_default
15065+int
15066+main ()
15067+{
15068+static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
15069+test_array [0] = 0
15070+
15071+ ;
15072+ return 0;
15073+}
15074+_ACEOF
15075+rm -f conftest.$ac_objext
15076+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15077+ (eval $ac_compile) 2>conftest.er1
15078+ ac_status=$?
15079+ grep -v '^ *+' conftest.er1 >conftest.err
15080+ rm -f conftest.er1
15081+ cat conftest.err >&5
15082+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15083+ (exit $ac_status); } &&
15084+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15085+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15086+ (eval $ac_try) 2>&5
15087+ ac_status=$?
15088+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15089+ (exit $ac_status); }; } &&
15090+ { ac_try='test -s conftest.$ac_objext'
15091+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15092+ (eval $ac_try) 2>&5
15093+ ac_status=$?
15094+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15095+ (exit $ac_status); }; }; then
15096+ ac_hi=$ac_mid; break
15097+else
15098+ echo "$as_me: failed program was:" >&5
15099+sed 's/^/| /' conftest.$ac_ext >&5
15100+
15101+ac_lo=`expr $ac_mid + 1`
15102+ if test $ac_lo -le $ac_mid; then
15103+ ac_lo= ac_hi=
15104+ break
15105+ fi
15106+ ac_mid=`expr 2 '*' $ac_mid + 1`
15107+fi
15108+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15109+ done
15110+else
15111+ echo "$as_me: failed program was:" >&5
15112+sed 's/^/| /' conftest.$ac_ext >&5
15113+
15114+cat >conftest.$ac_ext <<_ACEOF
15115+/* confdefs.h. */
15116+_ACEOF
15117+cat confdefs.h >>conftest.$ac_ext
15118+cat >>conftest.$ac_ext <<_ACEOF
15119+/* end confdefs.h. */
15120+$ac_includes_default
15121+int
15122+main ()
15123+{
15124+static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
15125+test_array [0] = 0
15126+
15127+ ;
15128+ return 0;
15129+}
15130+_ACEOF
15131+rm -f conftest.$ac_objext
15132+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15133+ (eval $ac_compile) 2>conftest.er1
15134+ ac_status=$?
15135+ grep -v '^ *+' conftest.er1 >conftest.err
15136+ rm -f conftest.er1
15137+ cat conftest.err >&5
15138+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15139+ (exit $ac_status); } &&
15140+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15141+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15142+ (eval $ac_try) 2>&5
15143+ ac_status=$?
15144+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15145+ (exit $ac_status); }; } &&
15146+ { ac_try='test -s conftest.$ac_objext'
15147+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15148+ (eval $ac_try) 2>&5
15149+ ac_status=$?
15150+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15151+ (exit $ac_status); }; }; then
15152+ ac_hi=-1 ac_mid=-1
15153+ while :; do
15154+ cat >conftest.$ac_ext <<_ACEOF
15155+/* confdefs.h. */
15156+_ACEOF
15157+cat confdefs.h >>conftest.$ac_ext
15158+cat >>conftest.$ac_ext <<_ACEOF
15159+/* end confdefs.h. */
15160+$ac_includes_default
15161+int
15162+main ()
15163+{
15164+static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
15165+test_array [0] = 0
15166+
15167+ ;
15168+ return 0;
15169+}
15170+_ACEOF
15171+rm -f conftest.$ac_objext
15172+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15173+ (eval $ac_compile) 2>conftest.er1
15174+ ac_status=$?
15175+ grep -v '^ *+' conftest.er1 >conftest.err
15176+ rm -f conftest.er1
15177+ cat conftest.err >&5
15178+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15179+ (exit $ac_status); } &&
15180+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15181+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15182+ (eval $ac_try) 2>&5
15183+ ac_status=$?
15184+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15185+ (exit $ac_status); }; } &&
15186+ { ac_try='test -s conftest.$ac_objext'
15187+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15188+ (eval $ac_try) 2>&5
15189+ ac_status=$?
15190+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15191+ (exit $ac_status); }; }; then
15192+ ac_lo=$ac_mid; break
15193+else
15194+ echo "$as_me: failed program was:" >&5
15195+sed 's/^/| /' conftest.$ac_ext >&5
15196+
15197+ac_hi=`expr '(' $ac_mid ')' - 1`
15198+ if test $ac_mid -le $ac_hi; then
15199+ ac_lo= ac_hi=
15200+ break
15201+ fi
15202+ ac_mid=`expr 2 '*' $ac_mid`
15203+fi
15204+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15205+ done
15206+else
15207+ echo "$as_me: failed program was:" >&5
15208+sed 's/^/| /' conftest.$ac_ext >&5
15209+
15210+ac_lo= ac_hi=
15211+fi
15212+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15213+fi
15214+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15215+# Binary search between lo and hi bounds.
15216+while test "x$ac_lo" != "x$ac_hi"; do
15217+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15218+ cat >conftest.$ac_ext <<_ACEOF
15219+/* confdefs.h. */
15220+_ACEOF
15221+cat confdefs.h >>conftest.$ac_ext
15222+cat >>conftest.$ac_ext <<_ACEOF
15223+/* end confdefs.h. */
15224+$ac_includes_default
15225+int
15226+main ()
15227+{
15228+static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
15229+test_array [0] = 0
15230+
15231+ ;
15232+ return 0;
15233+}
15234+_ACEOF
15235+rm -f conftest.$ac_objext
15236+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15237+ (eval $ac_compile) 2>conftest.er1
15238+ ac_status=$?
15239+ grep -v '^ *+' conftest.er1 >conftest.err
15240+ rm -f conftest.er1
15241+ cat conftest.err >&5
15242+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15243+ (exit $ac_status); } &&
15244+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15245+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15246+ (eval $ac_try) 2>&5
15247+ ac_status=$?
15248+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15249+ (exit $ac_status); }; } &&
15250+ { ac_try='test -s conftest.$ac_objext'
15251+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15252+ (eval $ac_try) 2>&5
15253+ ac_status=$?
15254+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15255+ (exit $ac_status); }; }; then
15256+ ac_hi=$ac_mid
15257+else
15258+ echo "$as_me: failed program was:" >&5
15259+sed 's/^/| /' conftest.$ac_ext >&5
15260+
15261+ac_lo=`expr '(' $ac_mid ')' + 1`
15262+fi
15263+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15264+done
15265+case $ac_lo in
15266+?*) ac_cv_sizeof_short=$ac_lo;;
15267+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
15268+See \`config.log' for more details." >&5
15269+echo "$as_me: error: cannot compute sizeof (short), 77
15270+See \`config.log' for more details." >&2;}
15271+ { (exit 1); exit 1; }; } ;;
15272+esac
15273+else
15274+ if test "$cross_compiling" = yes; then
15275+ { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
15276+echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
15277+ { (exit 1); exit 1; }; }
15278+else
15279+ cat >conftest.$ac_ext <<_ACEOF
15280+/* confdefs.h. */
15281+_ACEOF
15282+cat confdefs.h >>conftest.$ac_ext
15283+cat >>conftest.$ac_ext <<_ACEOF
15284+/* end confdefs.h. */
15285+$ac_includes_default
15286+long longval () { return (long) (sizeof (short)); }
15287+unsigned long ulongval () { return (long) (sizeof (short)); }
15288+#include <stdio.h>
15289+#include <stdlib.h>
15290+int
15291+main ()
15292+{
15293+
15294+ FILE *f = fopen ("conftest.val", "w");
15295+ if (! f)
15296+ exit (1);
15297+ if (((long) (sizeof (short))) < 0)
15298+ {
15299+ long i = longval ();
15300+ if (i != ((long) (sizeof (short))))
15301+ exit (1);
15302+ fprintf (f, "%ld\n", i);
15303+ }
15304+ else
15305+ {
15306+ unsigned long i = ulongval ();
15307+ if (i != ((long) (sizeof (short))))
15308+ exit (1);
15309+ fprintf (f, "%lu\n", i);
15310+ }
15311+ exit (ferror (f) || fclose (f) != 0);
15312+
15313+ ;
15314+ return 0;
15315+}
15316+_ACEOF
15317+rm -f conftest$ac_exeext
15318+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15319+ (eval $ac_link) 2>&5
15320+ ac_status=$?
15321+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15322+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15323+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15324+ (eval $ac_try) 2>&5
15325+ ac_status=$?
15326+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15327+ (exit $ac_status); }; }; then
15328+ ac_cv_sizeof_short=`cat conftest.val`
15329+else
15330+ echo "$as_me: program exited with status $ac_status" >&5
15331+echo "$as_me: failed program was:" >&5
15332+sed 's/^/| /' conftest.$ac_ext >&5
15333+
15334+( exit $ac_status )
15335+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
15336+See \`config.log' for more details." >&5
15337+echo "$as_me: error: cannot compute sizeof (short), 77
15338+See \`config.log' for more details." >&2;}
15339+ { (exit 1); exit 1; }; }
15340+fi
15341+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15342+fi
15343+fi
15344+rm -f conftest.val
15345+else
15346+ ac_cv_sizeof_short=0
15347+fi
15348+fi
15349+echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
15350+echo "${ECHO_T}$ac_cv_sizeof_short" >&6
15351+cat >>confdefs.h <<_ACEOF
15352+#define SIZEOF_SHORT $ac_cv_sizeof_short
15353+_ACEOF
15354+
15355+
15356+ echo "$as_me:$LINENO: checking for char" >&5
15357+echo $ECHO_N "checking for char... $ECHO_C" >&6
15358+if test "${ac_cv_type_char+set}" = set; then
15359+ echo $ECHO_N "(cached) $ECHO_C" >&6
15360+else
15361+ cat >conftest.$ac_ext <<_ACEOF
15362+/* confdefs.h. */
15363+_ACEOF
15364+cat confdefs.h >>conftest.$ac_ext
15365+cat >>conftest.$ac_ext <<_ACEOF
15366+/* end confdefs.h. */
15367+$ac_includes_default
15368+int
15369+main ()
15370+{
15371+if ((char *) 0)
15372+ return 0;
15373+if (sizeof (char))
15374+ return 0;
15375+ ;
15376+ return 0;
15377+}
15378+_ACEOF
15379+rm -f conftest.$ac_objext
15380+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15381+ (eval $ac_compile) 2>conftest.er1
15382+ ac_status=$?
15383+ grep -v '^ *+' conftest.er1 >conftest.err
15384+ rm -f conftest.er1
15385+ cat conftest.err >&5
15386+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15387+ (exit $ac_status); } &&
15388+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15389+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15390+ (eval $ac_try) 2>&5
15391+ ac_status=$?
15392+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15393+ (exit $ac_status); }; } &&
15394+ { ac_try='test -s conftest.$ac_objext'
15395+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15396+ (eval $ac_try) 2>&5
15397+ ac_status=$?
15398+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15399+ (exit $ac_status); }; }; then
15400+ ac_cv_type_char=yes
15401+else
15402+ echo "$as_me: failed program was:" >&5
15403+sed 's/^/| /' conftest.$ac_ext >&5
15404+
15405+ac_cv_type_char=no
15406+fi
15407+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15408+fi
15409+echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
15410+echo "${ECHO_T}$ac_cv_type_char" >&6
15411+
15412+echo "$as_me:$LINENO: checking size of char" >&5
15413+echo $ECHO_N "checking size of char... $ECHO_C" >&6
15414+if test "${ac_cv_sizeof_char+set}" = set; then
15415+ echo $ECHO_N "(cached) $ECHO_C" >&6
15416+else
15417+ if test "$ac_cv_type_char" = yes; then
15418+ # The cast to unsigned long works around a bug in the HP C Compiler
15419+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15420+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15421+ # This bug is HP SR number 8606223364.
15422+ if test "$cross_compiling" = yes; then
15423+ # Depending upon the size, compute the lo and hi bounds.
15424+cat >conftest.$ac_ext <<_ACEOF
15425+/* confdefs.h. */
15426+_ACEOF
15427+cat confdefs.h >>conftest.$ac_ext
15428+cat >>conftest.$ac_ext <<_ACEOF
15429+/* end confdefs.h. */
15430+$ac_includes_default
15431+int
15432+main ()
15433+{
15434+static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
15435+test_array [0] = 0
15436+
15437+ ;
15438+ return 0;
15439+}
15440+_ACEOF
15441+rm -f conftest.$ac_objext
15442+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15443+ (eval $ac_compile) 2>conftest.er1
15444+ ac_status=$?
15445+ grep -v '^ *+' conftest.er1 >conftest.err
15446+ rm -f conftest.er1
15447+ cat conftest.err >&5
15448+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15449+ (exit $ac_status); } &&
15450+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15451+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15452+ (eval $ac_try) 2>&5
15453+ ac_status=$?
15454+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15455+ (exit $ac_status); }; } &&
15456+ { ac_try='test -s conftest.$ac_objext'
15457+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15458+ (eval $ac_try) 2>&5
15459+ ac_status=$?
15460+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15461+ (exit $ac_status); }; }; then
15462+ ac_lo=0 ac_mid=0
15463+ while :; do
15464+ cat >conftest.$ac_ext <<_ACEOF
15465+/* confdefs.h. */
15466+_ACEOF
15467+cat confdefs.h >>conftest.$ac_ext
15468+cat >>conftest.$ac_ext <<_ACEOF
15469+/* end confdefs.h. */
15470+$ac_includes_default
15471+int
15472+main ()
15473+{
15474+static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
15475+test_array [0] = 0
15476+
15477+ ;
15478+ return 0;
15479+}
15480+_ACEOF
15481+rm -f conftest.$ac_objext
15482+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15483+ (eval $ac_compile) 2>conftest.er1
15484+ ac_status=$?
15485+ grep -v '^ *+' conftest.er1 >conftest.err
15486+ rm -f conftest.er1
15487+ cat conftest.err >&5
15488+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15489+ (exit $ac_status); } &&
15490+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15491+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15492+ (eval $ac_try) 2>&5
15493+ ac_status=$?
15494+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15495+ (exit $ac_status); }; } &&
15496+ { ac_try='test -s conftest.$ac_objext'
15497+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15498+ (eval $ac_try) 2>&5
15499+ ac_status=$?
15500+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15501+ (exit $ac_status); }; }; then
15502+ ac_hi=$ac_mid; break
15503+else
15504+ echo "$as_me: failed program was:" >&5
15505+sed 's/^/| /' conftest.$ac_ext >&5
15506+
15507+ac_lo=`expr $ac_mid + 1`
15508+ if test $ac_lo -le $ac_mid; then
15509+ ac_lo= ac_hi=
15510+ break
15511+ fi
15512+ ac_mid=`expr 2 '*' $ac_mid + 1`
15513+fi
15514+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15515+ done
1264715516 else
12648- cat >conftest.$ac_ext <<_ACEOF
15517+ echo "$as_me: failed program was:" >&5
15518+sed 's/^/| /' conftest.$ac_ext >&5
15519+
15520+cat >conftest.$ac_ext <<_ACEOF
1264915521 /* confdefs.h. */
1265015522 _ACEOF
1265115523 cat confdefs.h >>conftest.$ac_ext
1265215524 cat >>conftest.$ac_ext <<_ACEOF
1265315525 /* end confdefs.h. */
12654-#if HAVE_CURSES_H
12655-# include <curses.h>
12656-#endif
15526+$ac_includes_default
15527+int
15528+main ()
15529+{
15530+static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
15531+test_array [0] = 0
1265715532
15533+ ;
15534+ return 0;
15535+}
15536+_ACEOF
15537+rm -f conftest.$ac_objext
15538+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15539+ (eval $ac_compile) 2>conftest.er1
15540+ ac_status=$?
15541+ grep -v '^ *+' conftest.er1 >conftest.err
15542+ rm -f conftest.er1
15543+ cat conftest.err >&5
15544+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15545+ (exit $ac_status); } &&
15546+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15547+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15548+ (eval $ac_try) 2>&5
15549+ ac_status=$?
15550+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15551+ (exit $ac_status); }; } &&
15552+ { ac_try='test -s conftest.$ac_objext'
15553+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15554+ (eval $ac_try) 2>&5
15555+ ac_status=$?
15556+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15557+ (exit $ac_status); }; }; then
15558+ ac_hi=-1 ac_mid=-1
15559+ while :; do
15560+ cat >conftest.$ac_ext <<_ACEOF
15561+/* confdefs.h. */
15562+_ACEOF
15563+cat confdefs.h >>conftest.$ac_ext
15564+cat >>conftest.$ac_ext <<_ACEOF
15565+/* end confdefs.h. */
15566+$ac_includes_default
15567+int
15568+main ()
15569+{
15570+static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
15571+test_array [0] = 0
1265815572
12659-#include <$ac_header>
15573+ ;
15574+ return 0;
15575+}
1266015576 _ACEOF
1266115577 rm -f conftest.$ac_objext
1266215578 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -12679,54 +15595,48 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1267915595 ac_status=$?
1268015596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1268115597 (exit $ac_status); }; }; then
12682- eval "$as_ac_Header=yes"
15598+ ac_lo=$ac_mid; break
1268315599 else
1268415600 echo "$as_me: failed program was:" >&5
1268515601 sed 's/^/| /' conftest.$ac_ext >&5
1268615602
12687-eval "$as_ac_Header=no"
15603+ac_hi=`expr '(' $ac_mid ')' - 1`
15604+ if test $ac_mid -le $ac_hi; then
15605+ ac_lo= ac_hi=
15606+ break
15607+ fi
15608+ ac_mid=`expr 2 '*' $ac_mid`
1268815609 fi
1268915610 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12690-fi
12691-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12692-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12693-if test `eval echo '${'$as_ac_Header'}'` = yes; then
12694- cat >>confdefs.h <<_ACEOF
12695-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12696-_ACEOF
15611+ done
15612+else
15613+ echo "$as_me: failed program was:" >&5
15614+sed 's/^/| /' conftest.$ac_ext >&5
1269715615
15616+ac_lo= ac_hi=
1269815617 fi
12699-
12700-done
12701-
12702-
12703-# FIXME: kettenis/20030102: In most cases we include these
12704-# unconditionally, so what's the point in checking these?
12705-
12706-
12707-for ac_header in ctype.h time.h
12708-do
12709-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12710-if eval "test \"\${$as_ac_Header+set}\" = set"; then
12711- echo "$as_me:$LINENO: checking for $ac_header" >&5
12712-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12713-if eval "test \"\${$as_ac_Header+set}\" = set"; then
12714- echo $ECHO_N "(cached) $ECHO_C" >&6
15618+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1271515619 fi
12716-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12717-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12718-else
12719- # Is the header compilable?
12720-echo "$as_me:$LINENO: checking $ac_header usability" >&5
12721-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
12722-cat >conftest.$ac_ext <<_ACEOF
15620+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15621+# Binary search between lo and hi bounds.
15622+while test "x$ac_lo" != "x$ac_hi"; do
15623+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15624+ cat >conftest.$ac_ext <<_ACEOF
1272315625 /* confdefs.h. */
1272415626 _ACEOF
1272515627 cat confdefs.h >>conftest.$ac_ext
1272615628 cat >>conftest.$ac_ext <<_ACEOF
1272715629 /* end confdefs.h. */
1272815630 $ac_includes_default
12729-#include <$ac_header>
15631+int
15632+main ()
15633+{
15634+static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
15635+test_array [0] = 0
15636+
15637+ ;
15638+ return 0;
15639+}
1273015640 _ACEOF
1273115641 rm -f conftest.$ac_objext
1273215642 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -12749,108 +15659,176 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1274915659 ac_status=$?
1275015660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1275115661 (exit $ac_status); }; }; then
12752- ac_header_compiler=yes
15662+ ac_hi=$ac_mid
1275315663 else
1275415664 echo "$as_me: failed program was:" >&5
1275515665 sed 's/^/| /' conftest.$ac_ext >&5
1275615666
12757-ac_header_compiler=no
15667+ac_lo=`expr '(' $ac_mid ')' + 1`
1275815668 fi
1275915669 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12760-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12761-echo "${ECHO_T}$ac_header_compiler" >&6
12762-
12763-# Is the header present?
12764-echo "$as_me:$LINENO: checking $ac_header presence" >&5
12765-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
12766-cat >conftest.$ac_ext <<_ACEOF
15670+done
15671+case $ac_lo in
15672+?*) ac_cv_sizeof_char=$ac_lo;;
15673+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
15674+See \`config.log' for more details." >&5
15675+echo "$as_me: error: cannot compute sizeof (char), 77
15676+See \`config.log' for more details." >&2;}
15677+ { (exit 1); exit 1; }; } ;;
15678+esac
15679+else
15680+ if test "$cross_compiling" = yes; then
15681+ { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5
15682+echo "$as_me: error: internal error: not reached in cross-compile" >&2;}
15683+ { (exit 1); exit 1; }; }
15684+else
15685+ cat >conftest.$ac_ext <<_ACEOF
1276715686 /* confdefs.h. */
1276815687 _ACEOF
1276915688 cat confdefs.h >>conftest.$ac_ext
1277015689 cat >>conftest.$ac_ext <<_ACEOF
1277115690 /* end confdefs.h. */
12772-#include <$ac_header>
15691+$ac_includes_default
15692+long longval () { return (long) (sizeof (char)); }
15693+unsigned long ulongval () { return (long) (sizeof (char)); }
15694+#include <stdio.h>
15695+#include <stdlib.h>
15696+int
15697+main ()
15698+{
15699+
15700+ FILE *f = fopen ("conftest.val", "w");
15701+ if (! f)
15702+ exit (1);
15703+ if (((long) (sizeof (char))) < 0)
15704+ {
15705+ long i = longval ();
15706+ if (i != ((long) (sizeof (char))))
15707+ exit (1);
15708+ fprintf (f, "%ld\n", i);
15709+ }
15710+ else
15711+ {
15712+ unsigned long i = ulongval ();
15713+ if (i != ((long) (sizeof (char))))
15714+ exit (1);
15715+ fprintf (f, "%lu\n", i);
15716+ }
15717+ exit (ferror (f) || fclose (f) != 0);
15718+
15719+ ;
15720+ return 0;
15721+}
1277315722 _ACEOF
12774-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12775- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15723+rm -f conftest$ac_exeext
15724+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15725+ (eval $ac_link) 2>&5
1277615726 ac_status=$?
12777- grep -v '^ *+' conftest.er1 >conftest.err
12778- rm -f conftest.er1
12779- cat conftest.err >&5
1278015727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12781- (exit $ac_status); } >/dev/null; then
12782- if test -s conftest.err; then
12783- ac_cpp_err=$ac_c_preproc_warn_flag
12784- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12785- else
12786- ac_cpp_err=
12787- fi
12788-else
12789- ac_cpp_err=yes
12790-fi
12791-if test -z "$ac_cpp_err"; then
12792- ac_header_preproc=yes
15728+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15729+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15730+ (eval $ac_try) 2>&5
15731+ ac_status=$?
15732+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
15733+ (exit $ac_status); }; }; then
15734+ ac_cv_sizeof_char=`cat conftest.val`
1279315735 else
12794- echo "$as_me: failed program was:" >&5
15736+ echo "$as_me: program exited with status $ac_status" >&5
15737+echo "$as_me: failed program was:" >&5
1279515738 sed 's/^/| /' conftest.$ac_ext >&5
1279615739
12797- ac_header_preproc=no
15740+( exit $ac_status )
15741+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
15742+See \`config.log' for more details." >&5
15743+echo "$as_me: error: cannot compute sizeof (char), 77
15744+See \`config.log' for more details." >&2;}
15745+ { (exit 1); exit 1; }; }
1279815746 fi
12799-rm -f conftest.err conftest.$ac_ext
12800-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12801-echo "${ECHO_T}$ac_header_preproc" >&6
12802-
12803-# So? What about this header?
12804-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12805- yes:no: )
12806- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12807-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12808- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12809-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12810- ac_header_preproc=yes
12811- ;;
12812- no:yes:* )
12813- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12814-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12815- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12816-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12817- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12818-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12819- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12820-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
12821- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12822-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12823- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12824-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12825- (
12826- cat <<\_ASBOX
12827-## ------------------------------------------ ##
12828-## Report this to the AC_PACKAGE_NAME lists. ##
12829-## ------------------------------------------ ##
12830-_ASBOX
12831- ) |
12832- sed "s/^/$as_me: WARNING: /" >&2
12833- ;;
12834-esac
12835-echo "$as_me:$LINENO: checking for $ac_header" >&5
12836-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12837-if eval "test \"\${$as_ac_Header+set}\" = set"; then
12838- echo $ECHO_N "(cached) $ECHO_C" >&6
15747+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15748+fi
15749+fi
15750+rm -f conftest.val
1283915751 else
12840- eval "$as_ac_Header=\$ac_header_preproc"
15752+ ac_cv_sizeof_char=0
1284115753 fi
12842-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
12843-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12844-
1284515754 fi
12846-if test `eval echo '${'$as_ac_Header'}'` = yes; then
12847- cat >>confdefs.h <<_ACEOF
12848-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15755+echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
15756+echo "${ECHO_T}$ac_cv_sizeof_char" >&6
15757+cat >>confdefs.h <<_ACEOF
15758+#define SIZEOF_CHAR $ac_cv_sizeof_char
1284915759 _ACEOF
1285015760
15761+
15762+
15763+ echo "$as_me:$LINENO: checking for type equivalent to int8_t" >&5
15764+echo $ECHO_N "checking for type equivalent to int8_t... $ECHO_C" >&6
15765+ case "$ac_cv_sizeof_char" in
15766+ 1) acx_cv_type_int8_t=char ;;
15767+ *) { { echo "$as_me:$LINENO: error: no 8-bit type" >&5
15768+echo "$as_me: error: no 8-bit type" >&2;}
15769+ { (exit please report a bug); exit please report a bug; }; }
15770+ esac
15771+ echo "$as_me:$LINENO: result: $acx_cv_type_int8_t" >&5
15772+echo "${ECHO_T}$acx_cv_type_int8_t" >&6
15773+
15774+ echo "$as_me:$LINENO: checking for type equivalent to int16_t" >&5
15775+echo $ECHO_N "checking for type equivalent to int16_t... $ECHO_C" >&6
15776+ case "$ac_cv_sizeof_int:$ac_cv_sizeof_short" in
15777+ 2:*) acx_cv_type_int16_t=int ;;
15778+ *:2) acx_cv_type_int16_t=short ;;
15779+ *) { { echo "$as_me:$LINENO: error: no 16-bit type" >&5
15780+echo "$as_me: error: no 16-bit type" >&2;}
15781+ { (exit please report a bug); exit please report a bug; }; }
15782+ esac
15783+ echo "$as_me:$LINENO: result: $acx_cv_type_int16_t" >&5
15784+echo "${ECHO_T}$acx_cv_type_int16_t" >&6
15785+
15786+ echo "$as_me:$LINENO: checking for type equivalent to int32_t" >&5
15787+echo $ECHO_N "checking for type equivalent to int32_t... $ECHO_C" >&6
15788+ case "$ac_cv_sizeof_int:$ac_cv_sizeof_long" in
15789+ 4:*) acx_cv_type_int32_t=int ;;
15790+ *:4) acx_cv_type_int32_t=long ;;
15791+ *) { { echo "$as_me:$LINENO: error: no 32-bit type" >&5
15792+echo "$as_me: error: no 32-bit type" >&2;}
15793+ { (exit please report a bug); exit please report a bug; }; }
15794+ esac
15795+ echo "$as_me:$LINENO: result: $acx_cv_type_int32_t" >&5
15796+echo "${ECHO_T}$acx_cv_type_int32_t" >&6
1285115797 fi
1285215798
12853-done
15799+# These tests are here to make the output prettier
15800+
15801+if test "$ac_cv_type_uint64_t" != yes && test "$ac_cv_type_u_int64_t" != yes; then
15802+ case "$ac_cv_sizeof_long" in
15803+ 8) acx_cv_type_int64_t=long ;;
15804+ esac
15805+ echo "$as_me:$LINENO: checking for type equivalent to int64_t" >&5
15806+echo $ECHO_N "checking for type equivalent to int64_t... $ECHO_C" >&6
15807+ echo "$as_me:$LINENO: result: ${acx_cv_type_int64_t-'using preprocessor symbols'}" >&5
15808+echo "${ECHO_T}${acx_cv_type_int64_t-'using preprocessor symbols'}" >&6
15809+fi
15810+
15811+# Now we can use the above types
15812+
15813+if test "$ac_cv_type_uintptr_t" != yes; then
15814+ echo "$as_me:$LINENO: checking for type equivalent to intptr_t" >&5
15815+echo $ECHO_N "checking for type equivalent to intptr_t... $ECHO_C" >&6
15816+ case $ac_cv_sizeof_void_p in
15817+ 2) acx_cv_type_intptr_t=int16_t ;;
15818+ 4) acx_cv_type_intptr_t=int32_t ;;
15819+ 8) acx_cv_type_intptr_t=int64_t ;;
15820+ *) { { echo "$as_me:$LINENO: error: no equivalent for intptr_t" >&5
15821+echo "$as_me: error: no equivalent for intptr_t" >&2;}
15822+ { (exit please report a bug); exit please report a bug; }; }
15823+ esac
15824+ echo "$as_me:$LINENO: result: $acx_cv_type_intptr_t" >&5
15825+echo "${ECHO_T}$acx_cv_type_intptr_t" >&6
15826+fi
15827+
15828+# ----------------- done all checks, emit header -------------
15829+ ac_config_commands="$ac_config_commands gdb_stdint.h"
15830+
15831+
1285415832
1285515833
1285615834 # ------------------------- #
@@ -22479,6 +25457,24 @@ cat >>$CONFIG_STATUS <<_ACEOF
2247925457 #
2248025458
2248125459
25460+GCC="$GCC"
25461+CC="$CC"
25462+acx_cv_header_stdint="$acx_cv_header_stdint"
25463+acx_cv_type_int8_t="$acx_cv_type_int8_t"
25464+acx_cv_type_int16_t="$acx_cv_type_int16_t"
25465+acx_cv_type_int32_t="$acx_cv_type_int32_t"
25466+acx_cv_type_int64_t="$acx_cv_type_int64_t"
25467+acx_cv_type_intptr_t="$acx_cv_type_intptr_t"
25468+ac_cv_type_uintmax_t="$ac_cv_type_uintmax_t"
25469+ac_cv_type_uintptr_t="$ac_cv_type_uintptr_t"
25470+ac_cv_type_uint64_t="$ac_cv_type_uint64_t"
25471+ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t"
25472+ac_cv_type_u_int32_t="$ac_cv_type_u_int32_t"
25473+ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t"
25474+ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t"
25475+ac_cv_sizeof_void_p="$ac_cv_sizeof_void_p"
25476+
25477+
2248225478 gdb_host_cpu=$gdb_host_cpu
2248325479 gdb_target_cpu=$gdb_target_cpu
2248425480 nativefile=$nativefile
@@ -22496,6 +25492,7 @@ do
2249625492 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
2249725493 ".gdbinit" ) CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;;
2249825494 "$ac_config_links_1" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
25495+ "gdb_stdint.h" ) CONFIG_COMMANDS="$CONFIG_COMMANDS gdb_stdint.h" ;;
2249925496 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
2250025497 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
2250125498 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
@@ -23447,6 +26444,295 @@ esac
2344726444 { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
2344826445 echo "$as_me: executing $ac_dest commands" >&6;}
2344926446 case $ac_dest in
26447+ gdb_stdint.h )
26448+if test "$GCC" = yes; then
26449+ echo "/* generated for " `$CC --version | sed 1q` "*/" > tmp-stdint.h
26450+else
26451+ echo "/* generated for $CC */" > tmp-stdint.h
26452+fi
26453+
26454+sed 's/^ *//' >> tmp-stdint.h <<EOF
26455+
26456+ #ifndef GCC_GENERATED_STDINT_H
26457+ #define GCC_GENERATED_STDINT_H 1
26458+
26459+ #include <sys/types.h>
26460+EOF
26461+
26462+if test "$acx_cv_header_stdint" != stdint.h; then
26463+ echo "#include <stddef.h>" >> tmp-stdint.h
26464+fi
26465+if test "$acx_cv_header_stdint" != stddef.h; then
26466+ echo "#include <$acx_cv_header_stdint>" >> tmp-stdint.h
26467+fi
26468+
26469+sed 's/^ *//' >> tmp-stdint.h <<EOF
26470+ /* glibc uses these symbols as guards to prevent redefinitions. */
26471+ #ifdef __int8_t_defined
26472+ #define _INT8_T
26473+ #define _INT16_T
26474+ #define _INT32_T
26475+ #endif
26476+ #ifdef __uint32_t_defined
26477+ #define _UINT32_T
26478+ #endif
26479+
26480+EOF
26481+
26482+# ----------------- done header, emit basic int types -------------
26483+if test "$acx_cv_header_stdint" = stddef.h; then
26484+ sed 's/^ *//' >> tmp-stdint.h <<EOF
26485+
26486+ #ifndef _UINT8_T
26487+ #define _UINT8_T
26488+ typedef unsigned $acx_cv_type_int8_t uint8_t;
26489+ #endif
26490+
26491+ #ifndef _UINT16_T
26492+ #define _UINT16_T
26493+ typedef unsigned $acx_cv_type_int16_t uint16_t;
26494+ #endif
26495+
26496+ #ifndef _UINT32_T
26497+ #define _UINT32_T
26498+ typedef unsigned $acx_cv_type_int32_t uint32_t;
26499+ #endif
26500+
26501+ #ifndef _INT8_T
26502+ #define _INT8_T
26503+ typedef $acx_cv_type_int8_t int8_t;
26504+ #endif
26505+
26506+ #ifndef _INT16_T
26507+ #define _INT16_T
26508+ typedef $acx_cv_type_int16_t int16_t;
26509+ #endif
26510+
26511+ #ifndef _INT32_T
26512+ #define _INT32_T
26513+ typedef $acx_cv_type_int32_t int32_t;
26514+ #endif
26515+EOF
26516+elif test "$ac_cv_type_u_int32_t" = yes; then
26517+ sed 's/^ *//' >> tmp-stdint.h <<EOF
26518+
26519+ /* int8_t int16_t int32_t defined by inet code, we do the u_intXX types */
26520+ #ifndef _INT8_T
26521+ #define _INT8_T
26522+ #endif
26523+ #ifndef _INT16_T
26524+ #define _INT16_T
26525+ #endif
26526+ #ifndef _INT32_T
26527+ #define _INT32_T
26528+ #endif
26529+
26530+ #ifndef _UINT8_T
26531+ #define _UINT8_T
26532+ typedef u_int8_t uint8_t;
26533+ #endif
26534+
26535+ #ifndef _UINT16_T
26536+ #define _UINT16_T
26537+ typedef u_int16_t uint16_t;
26538+ #endif
26539+
26540+ #ifndef _UINT32_T
26541+ #define _UINT32_T
26542+ typedef u_int32_t uint32_t;
26543+ #endif
26544+EOF
26545+else
26546+ sed 's/^ *//' >> tmp-stdint.h <<EOF
26547+
26548+ /* Some systems have guard macros to prevent redefinitions, define them. */
26549+ #ifndef _INT8_T
26550+ #define _INT8_T
26551+ #endif
26552+ #ifndef _INT16_T
26553+ #define _INT16_T
26554+ #endif
26555+ #ifndef _INT32_T
26556+ #define _INT32_T
26557+ #endif
26558+ #ifndef _UINT8_T
26559+ #define _UINT8_T
26560+ #endif
26561+ #ifndef _UINT16_T
26562+ #define _UINT16_T
26563+ #endif
26564+ #ifndef _UINT32_T
26565+ #define _UINT32_T
26566+ #endif
26567+EOF
26568+fi
26569+
26570+# ------------- done basic int types, emit int64_t types ------------
26571+if test "$ac_cv_type_uint64_t" = yes; then
26572+ sed 's/^ *//' >> tmp-stdint.h <<EOF
26573+
26574+ /* system headers have good uint64_t and int64_t */
26575+ #ifndef _INT64_T
26576+ #define _INT64_T
26577+ #endif
26578+ #ifndef _UINT64_T
26579+ #define _UINT64_T
26580+ #endif
26581+EOF
26582+elif test "$ac_cv_type_u_int64_t" = yes; then
26583+ sed 's/^ *//' >> tmp-stdint.h <<EOF
26584+
26585+ /* system headers have an u_int64_t (and int64_t) */
26586+ #ifndef _INT64_T
26587+ #define _INT64_T
26588+ #endif
26589+ #ifndef _UINT64_T
26590+ #define _UINT64_T
26591+ typedef u_int64_t uint64_t;
26592+ #endif
26593+EOF
26594+elif test -n "$acx_cv_type_int64_t"; then
26595+ sed 's/^ *//' >> tmp-stdint.h <<EOF
26596+
26597+ /* architecture has a 64-bit type, $acx_cv_type_int64_t */
26598+ #ifndef _INT64_T
26599+ #define _INT64_T
26600+ typedef $acx_cv_type_int64_t int64_t;
26601+ #endif
26602+ #ifndef _UINT64_T
26603+ #define _UINT64_T
26604+ typedef unsigned $acx_cv_type_int64_t uint64_t;
26605+ #endif
26606+EOF
26607+else
26608+ sed 's/^ *//' >> tmp-stdint.h <<EOF
26609+
26610+ /* some common heuristics for int64_t, using compiler-specific tests */
26611+ #if defined __STDC_VERSION__ && (__STDC_VERSION__-0) >= 199901L
26612+ #ifndef _INT64_T
26613+ #define _INT64_T
26614+ typedef long long int64_t;
26615+ #endif
26616+ #ifndef _UINT64_T
26617+ #define _UINT64_T
26618+ typedef unsigned long long uint64_t;
26619+ #endif
26620+
26621+ #elif defined __GNUC__ && defined (__STDC__) && __STDC__-0
26622+ /* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
26623+ does not implement __extension__. But that compiler doesn't define
26624+ __GNUC_MINOR__. */
26625+ # if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
26626+ # define __extension__
26627+ # endif
26628+
26629+ # ifndef _INT64_T
26630+ # define _INT64_T
26631+ __extension__ typedef long long int64_t;
26632+ # endif
26633+ # ifndef _UINT64_T
26634+ # define _UINT64_T
26635+ __extension__ typedef unsigned long long uint64_t;
26636+ # endif
26637+
26638+ #elif !defined __STRICT_ANSI__
26639+ # if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__
26640+
26641+ # ifndef _INT64_T
26642+ # define _INT64_T
26643+ typedef __int64 int64_t;
26644+ # endif
26645+ # ifndef _UINT64_T
26646+ # define _UINT64_T
26647+ typedef unsigned __int64 uint64_t;
26648+ # endif
26649+ # endif /* compiler */
26650+
26651+ #endif /* ANSI version */
26652+EOF
26653+fi
26654+
26655+# ------------- done int64_t types, emit intptr types ------------
26656+if test "$ac_cv_type_uintptr_t" != yes; then
26657+ sed 's/^ *//' >> tmp-stdint.h <<EOF
26658+
26659+ /* Define intptr_t based on sizeof(void*) = $ac_cv_sizeof_void_p */
26660+ typedef u$acx_cv_type_intptr_t uintptr_t;
26661+ typedef $acx_cv_type_intptr_t intptr_t;
26662+EOF
26663+fi
26664+
26665+# ------------- done intptr types, emit int_least types ------------
26666+if test "$ac_cv_type_int_least32_t" != yes; then
26667+ sed 's/^ *//' >> tmp-stdint.h <<EOF
26668+
26669+ /* Define int_least types */
26670+ typedef int8_t int_least8_t;
26671+ typedef int16_t int_least16_t;
26672+ typedef int32_t int_least32_t;
26673+ #ifdef _INT64_T
26674+ typedef int64_t int_least64_t;
26675+ #endif
26676+
26677+ typedef uint8_t uint_least8_t;
26678+ typedef uint16_t uint_least16_t;
26679+ typedef uint32_t uint_least32_t;
26680+ #ifdef _UINT64_T
26681+ typedef uint64_t uint_least64_t;
26682+ #endif
26683+EOF
26684+fi
26685+
26686+# ------------- done intptr types, emit int_fast types ------------
26687+if test "$ac_cv_type_int_fast32_t" != yes; then
26688+ sed 's/^ *//' >> tmp-stdint.h <<EOF
26689+
26690+ /* Define int_fast types. short is often slow */
26691+ typedef int8_t int_fast8_t;
26692+ typedef int int_fast16_t;
26693+ typedef int32_t int_fast32_t;
26694+ #ifdef _INT64_T
26695+ typedef int64_t int_fast64_t;
26696+ #endif
26697+
26698+ typedef uint8_t uint_fast8_t;
26699+ typedef unsigned int uint_fast16_t;
26700+ typedef uint32_t uint_fast32_t;
26701+ #ifdef _UINT64_T
26702+ typedef uint64_t uint_fast64_t;
26703+ #endif
26704+EOF
26705+fi
26706+
26707+if test "$ac_cv_type_uintmax_t" != yes; then
26708+ sed 's/^ *//' >> tmp-stdint.h <<EOF
26709+
26710+ /* Define intmax based on what we found */
26711+ #ifdef _INT64_T
26712+ typedef int64_t intmax_t;
26713+ #else
26714+ typedef long intmax_t;
26715+ #endif
26716+ #ifdef _UINT64_T
26717+ typedef uint64_t uintmax_t;
26718+ #else
26719+ typedef unsigned long uintmax_t;
26720+ #endif
26721+EOF
26722+fi
26723+
26724+sed 's/^ *//' >> tmp-stdint.h <<EOF
26725+
26726+ #endif /* GCC_GENERATED_STDINT_H */
26727+EOF
26728+
26729+if test -r gdb_stdint.h && cmp -s tmp-stdint.h gdb_stdint.h; then
26730+ rm -f tmp-stdint.h
26731+else
26732+ mv -f tmp-stdint.h gdb_stdint.h
26733+fi
26734+
26735+ ;;
2345026736 default )
2345126737
2345226738 sed -e '/^DEPRECATED_TM_FILE[ ]*=/s,^DEPRECATED_TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -33,6 +33,9 @@ AC_AIX
3333 AC_ISC_POSIX
3434 AM_PROG_CC_STDC
3535
36+dnl The SHA-1 implementation needs to know the host endianness.
37+AC_C_BIGENDIAN
38+
3639 AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
3740 AC_CANONICAL_SYSTEM
3841
@@ -422,6 +425,9 @@ AC_CHECK_HEADERS(term.h, [], [],
422425 # unconditionally, so what's the point in checking these?
423426 AC_CHECK_HEADERS(ctype.h time.h)
424427
428+# Create a header we can use portably to get the standard integer types.
429+GCC_HEADER_STDINT(gdb_stdint.h)
430+
425431 # ------------------------- #
426432 # Checks for declarations. #
427433 # ------------------------- #
--- /dev/null
+++ b/gdb/sha1.c
@@ -0,0 +1,426 @@
1+/* sha1.c - Functions to compute SHA1 message digest of files or
2+ memory blocks according to the NIST specification FIPS-180-1.
3+
4+ Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
5+
6+ This program is free software; you can redistribute it and/or modify it
7+ under the terms of the GNU General Public License as published by the
8+ Free Software Foundation; either version 2, or (at your option) any
9+ later version.
10+
11+ This program is distributed in the hope that it will be useful,
12+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+ GNU General Public License for more details.
15+
16+ You should have received a copy of the GNU General Public License
17+ along with this program; if not, write to the Free Software Foundation,
18+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
19+
20+/* NOTE: The master copy of this file lives in GNU coreutils. Please import
21+ it from there. */
22+
23+/* Written by Scott G. Miller
24+ Credits:
25+ Robert Klep <robert@ilse.nl> -- Expansion function fix
26+*/
27+
28+#ifdef HAVE_CONFIG_H
29+# include <config.h>
30+#endif
31+
32+#include "sha1.h"
33+
34+#include <stddef.h>
35+#include <string.h>
36+
37+#if USE_UNLOCKED_IO
38+# include "unlocked-io.h"
39+#endif
40+
41+/* SWAP does an endian swap on architectures that are little-endian,
42+ as SHA1 needs some data in a big-endian form. */
43+
44+#ifdef WORDS_BIGENDIAN
45+# define SWAP(n) (n)
46+#else
47+# define SWAP(n) \
48+ (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
49+#endif
50+
51+#define BLOCKSIZE 4096
52+#if BLOCKSIZE % 64 != 0
53+# error "invalid BLOCKSIZE"
54+#endif
55+
56+/* This array contains the bytes used to pad the buffer to the next
57+ 64-byte boundary. (RFC 1321, 3.1: Step 1) */
58+static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ };
59+
60+
61+/*
62+ Takes a pointer to a 160 bit block of data (five 32 bit ints) and
63+ intializes it to the start constants of the SHA1 algorithm. This
64+ must be called before using hash in the call to sha1_hash.
65+*/
66+void
67+sha1_init_ctx (struct sha1_ctx *ctx)
68+{
69+ ctx->A = 0x67452301;
70+ ctx->B = 0xefcdab89;
71+ ctx->C = 0x98badcfe;
72+ ctx->D = 0x10325476;
73+ ctx->E = 0xc3d2e1f0;
74+
75+ ctx->total[0] = ctx->total[1] = 0;
76+ ctx->buflen = 0;
77+}
78+
79+/* Put result from CTX in first 20 bytes following RESBUF. The result
80+ must be in little endian byte order.
81+
82+ IMPORTANT: On some systems it is required that RESBUF is correctly
83+ aligned for a 32 bits value. */
84+void *
85+sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf)
86+{
87+ ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A);
88+ ((md5_uint32 *) resbuf)[1] = SWAP (ctx->B);
89+ ((md5_uint32 *) resbuf)[2] = SWAP (ctx->C);
90+ ((md5_uint32 *) resbuf)[3] = SWAP (ctx->D);
91+ ((md5_uint32 *) resbuf)[4] = SWAP (ctx->E);
92+
93+ return resbuf;
94+}
95+
96+/* Process the remaining bytes in the internal buffer and the usual
97+ prolog according to the standard and write the result to RESBUF.
98+
99+ IMPORTANT: On some systems it is required that RESBUF is correctly
100+ aligned for a 32 bits value. */
101+void *
102+sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf)
103+{
104+ /* Take yet unprocessed bytes into account. */
105+ md5_uint32 bytes = ctx->buflen;
106+ size_t pad;
107+
108+ /* Now count remaining bytes. */
109+ ctx->total[0] += bytes;
110+ if (ctx->total[0] < bytes)
111+ ++ctx->total[1];
112+
113+ pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes;
114+ memcpy (&ctx->buffer[bytes], fillbuf, pad);
115+
116+ /* Put the 64-bit file length in *bits* at the end of the buffer. */
117+ *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP (ctx->total[0] << 3);
118+ *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP ((ctx->total[1] << 3) |
119+ (ctx->total[0] >> 29));
120+
121+ /* Process last bytes. */
122+ sha1_process_block (ctx->buffer, bytes + pad + 8, ctx);
123+
124+ return sha1_read_ctx (ctx, resbuf);
125+}
126+
127+/* Compute SHA1 message digest for bytes read from STREAM. The
128+ resulting message digest number will be written into the 16 bytes
129+ beginning at RESBLOCK. */
130+int
131+sha1_stream (FILE *stream, void *resblock)
132+{
133+ struct sha1_ctx ctx;
134+ char buffer[BLOCKSIZE + 72];
135+ size_t sum;
136+
137+ /* Initialize the computation context. */
138+ sha1_init_ctx (&ctx);
139+
140+ /* Iterate over full file contents. */
141+ while (1)
142+ {
143+ /* We read the file in blocks of BLOCKSIZE bytes. One call of the
144+ computation function processes the whole buffer so that with the
145+ next round of the loop another block can be read. */
146+ size_t n;
147+ sum = 0;
148+
149+ /* Read block. Take care for partial reads. */
150+ while (1)
151+ {
152+ n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream);
153+
154+ sum += n;
155+
156+ if (sum == BLOCKSIZE)
157+ break;
158+
159+ if (n == 0)
160+ {
161+ /* Check for the error flag IFF N == 0, so that we don't
162+ exit the loop after a partial read due to e.g., EAGAIN
163+ or EWOULDBLOCK. */
164+ if (ferror (stream))
165+ return 1;
166+ goto process_partial_block;
167+ }
168+
169+ /* We've read at least one byte, so ignore errors. But always
170+ check for EOF, since feof may be true even though N > 0.
171+ Otherwise, we could end up calling fread after EOF. */
172+ if (feof (stream))
173+ goto process_partial_block;
174+ }
175+
176+ /* Process buffer with BLOCKSIZE bytes. Note that
177+ BLOCKSIZE % 64 == 0
178+ */
179+ sha1_process_block (buffer, BLOCKSIZE, &ctx);
180+ }
181+
182+ process_partial_block:;
183+
184+ /* Process any remaining bytes. */
185+ if (sum > 0)
186+ sha1_process_bytes (buffer, sum, &ctx);
187+
188+ /* Construct result in desired memory. */
189+ sha1_finish_ctx (&ctx, resblock);
190+ return 0;
191+}
192+
193+/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The
194+ result is always in little endian byte order, so that a byte-wise
195+ output yields to the wanted ASCII representation of the message
196+ digest. */
197+void *
198+sha1_buffer (const char *buffer, size_t len, void *resblock)
199+{
200+ struct sha1_ctx ctx;
201+
202+ /* Initialize the computation context. */
203+ sha1_init_ctx (&ctx);
204+
205+ /* Process whole buffer but last len % 64 bytes. */
206+ sha1_process_bytes (buffer, len, &ctx);
207+
208+ /* Put result in desired memory area. */
209+ return sha1_finish_ctx (&ctx, resblock);
210+}
211+
212+void
213+sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx)
214+{
215+ /* When we already have some bits in our internal buffer concatenate
216+ both inputs first. */
217+ if (ctx->buflen != 0)
218+ {
219+ size_t left_over = ctx->buflen;
220+ size_t add = 128 - left_over > len ? len : 128 - left_over;
221+
222+ memcpy (&ctx->buffer[left_over], buffer, add);
223+ ctx->buflen += add;
224+
225+ if (ctx->buflen > 64)
226+ {
227+ sha1_process_block (ctx->buffer, ctx->buflen & ~63, ctx);
228+
229+ ctx->buflen &= 63;
230+ /* The regions in the following copy operation cannot overlap. */
231+ memcpy (ctx->buffer, &ctx->buffer[(left_over + add) & ~63],
232+ ctx->buflen);
233+ }
234+
235+ buffer = (const char *) buffer + add;
236+ len -= add;
237+ }
238+
239+ /* Process available complete blocks. */
240+ if (len >= 64)
241+ {
242+#if !_STRING_ARCH_unaligned
243+# define alignof(type) offsetof (struct { char c; type x; }, x)
244+# define UNALIGNED_P(p) (((size_t) p) % alignof (md5_uint32) != 0)
245+ if (UNALIGNED_P (buffer))
246+ while (len > 64)
247+ {
248+ sha1_process_block (memcpy (ctx->buffer, buffer, 64), 64, ctx);
249+ buffer = (const char *) buffer + 64;
250+ len -= 64;
251+ }
252+ else
253+#endif
254+ {
255+ sha1_process_block (buffer, len & ~63, ctx);
256+ buffer = (const char *) buffer + (len & ~63);
257+ len &= 63;
258+ }
259+ }
260+
261+ /* Move remaining bytes in internal buffer. */
262+ if (len > 0)
263+ {
264+ size_t left_over = ctx->buflen;
265+
266+ memcpy (&ctx->buffer[left_over], buffer, len);
267+ left_over += len;
268+ if (left_over >= 64)
269+ {
270+ sha1_process_block (ctx->buffer, 64, ctx);
271+ left_over -= 64;
272+ memcpy (ctx->buffer, &ctx->buffer[64], left_over);
273+ }
274+ ctx->buflen = left_over;
275+ }
276+}
277+
278+/* --- Code below is the primary difference between md5.c and sha1.c --- */
279+
280+/* SHA1 round constants */
281+#define K1 0x5a827999L
282+#define K2 0x6ed9eba1L
283+#define K3 0x8f1bbcdcL
284+#define K4 0xca62c1d6L
285+
286+/* Round functions. Note that F2 is the same as F4. */
287+#define F1(B,C,D) ( D ^ ( B & ( C ^ D ) ) )
288+#define F2(B,C,D) (B ^ C ^ D)
289+#define F3(B,C,D) ( ( B & C ) | ( D & ( B | C ) ) )
290+#define F4(B,C,D) (B ^ C ^ D)
291+
292+/* Process LEN bytes of BUFFER, accumulating context into CTX.
293+ It is assumed that LEN % 64 == 0.
294+ Most of this code comes from GnuPG's cipher/sha1.c. */
295+
296+void
297+sha1_process_block (const void *buffer, size_t len, struct sha1_ctx *ctx)
298+{
299+ const md5_uint32 *words = buffer;
300+ size_t nwords = len / sizeof (md5_uint32);
301+ const md5_uint32 *endp = words + nwords;
302+ md5_uint32 x[16];
303+ md5_uint32 a = ctx->A;
304+ md5_uint32 b = ctx->B;
305+ md5_uint32 c = ctx->C;
306+ md5_uint32 d = ctx->D;
307+ md5_uint32 e = ctx->E;
308+
309+ /* First increment the byte count. RFC 1321 specifies the possible
310+ length of the file up to 2^64 bits. Here we only compute the
311+ number of bytes. Do a double word increment. */
312+ ctx->total[0] += len;
313+ if (ctx->total[0] < len)
314+ ++ctx->total[1];
315+
316+#define rol(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
317+
318+#define M(I) ( tm = x[I&0x0f] ^ x[(I-14)&0x0f] \
319+ ^ x[(I-8)&0x0f] ^ x[(I-3)&0x0f] \
320+ , (x[I&0x0f] = rol(tm, 1)) )
321+
322+#define R(A,B,C,D,E,F,K,M) do { E += rol( A, 5 ) \
323+ + F( B, C, D ) \
324+ + K \
325+ + M; \
326+ B = rol( B, 30 ); \
327+ } while(0)
328+
329+ while (words < endp)
330+ {
331+ md5_uint32 tm;
332+ int t;
333+ for (t = 0; t < 16; t++)
334+ {
335+ x[t] = SWAP (*words);
336+ words++;
337+ }
338+
339+ R( a, b, c, d, e, F1, K1, x[ 0] );
340+ R( e, a, b, c, d, F1, K1, x[ 1] );
341+ R( d, e, a, b, c, F1, K1, x[ 2] );
342+ R( c, d, e, a, b, F1, K1, x[ 3] );
343+ R( b, c, d, e, a, F1, K1, x[ 4] );
344+ R( a, b, c, d, e, F1, K1, x[ 5] );
345+ R( e, a, b, c, d, F1, K1, x[ 6] );
346+ R( d, e, a, b, c, F1, K1, x[ 7] );
347+ R( c, d, e, a, b, F1, K1, x[ 8] );
348+ R( b, c, d, e, a, F1, K1, x[ 9] );
349+ R( a, b, c, d, e, F1, K1, x[10] );
350+ R( e, a, b, c, d, F1, K1, x[11] );
351+ R( d, e, a, b, c, F1, K1, x[12] );
352+ R( c, d, e, a, b, F1, K1, x[13] );
353+ R( b, c, d, e, a, F1, K1, x[14] );
354+ R( a, b, c, d, e, F1, K1, x[15] );
355+ R( e, a, b, c, d, F1, K1, M(16) );
356+ R( d, e, a, b, c, F1, K1, M(17) );
357+ R( c, d, e, a, b, F1, K1, M(18) );
358+ R( b, c, d, e, a, F1, K1, M(19) );
359+ R( a, b, c, d, e, F2, K2, M(20) );
360+ R( e, a, b, c, d, F2, K2, M(21) );
361+ R( d, e, a, b, c, F2, K2, M(22) );
362+ R( c, d, e, a, b, F2, K2, M(23) );
363+ R( b, c, d, e, a, F2, K2, M(24) );
364+ R( a, b, c, d, e, F2, K2, M(25) );
365+ R( e, a, b, c, d, F2, K2, M(26) );
366+ R( d, e, a, b, c, F2, K2, M(27) );
367+ R( c, d, e, a, b, F2, K2, M(28) );
368+ R( b, c, d, e, a, F2, K2, M(29) );
369+ R( a, b, c, d, e, F2, K2, M(30) );
370+ R( e, a, b, c, d, F2, K2, M(31) );
371+ R( d, e, a, b, c, F2, K2, M(32) );
372+ R( c, d, e, a, b, F2, K2, M(33) );
373+ R( b, c, d, e, a, F2, K2, M(34) );
374+ R( a, b, c, d, e, F2, K2, M(35) );
375+ R( e, a, b, c, d, F2, K2, M(36) );
376+ R( d, e, a, b, c, F2, K2, M(37) );
377+ R( c, d, e, a, b, F2, K2, M(38) );
378+ R( b, c, d, e, a, F2, K2, M(39) );
379+ R( a, b, c, d, e, F3, K3, M(40) );
380+ R( e, a, b, c, d, F3, K3, M(41) );
381+ R( d, e, a, b, c, F3, K3, M(42) );
382+ R( c, d, e, a, b, F3, K3, M(43) );
383+ R( b, c, d, e, a, F3, K3, M(44) );
384+ R( a, b, c, d, e, F3, K3, M(45) );
385+ R( e, a, b, c, d, F3, K3, M(46) );
386+ R( d, e, a, b, c, F3, K3, M(47) );
387+ R( c, d, e, a, b, F3, K3, M(48) );
388+ R( b, c, d, e, a, F3, K3, M(49) );
389+ R( a, b, c, d, e, F3, K3, M(50) );
390+ R( e, a, b, c, d, F3, K3, M(51) );
391+ R( d, e, a, b, c, F3, K3, M(52) );
392+ R( c, d, e, a, b, F3, K3, M(53) );
393+ R( b, c, d, e, a, F3, K3, M(54) );
394+ R( a, b, c, d, e, F3, K3, M(55) );
395+ R( e, a, b, c, d, F3, K3, M(56) );
396+ R( d, e, a, b, c, F3, K3, M(57) );
397+ R( c, d, e, a, b, F3, K3, M(58) );
398+ R( b, c, d, e, a, F3, K3, M(59) );
399+ R( a, b, c, d, e, F4, K4, M(60) );
400+ R( e, a, b, c, d, F4, K4, M(61) );
401+ R( d, e, a, b, c, F4, K4, M(62) );
402+ R( c, d, e, a, b, F4, K4, M(63) );
403+ R( b, c, d, e, a, F4, K4, M(64) );
404+ R( a, b, c, d, e, F4, K4, M(65) );
405+ R( e, a, b, c, d, F4, K4, M(66) );
406+ R( d, e, a, b, c, F4, K4, M(67) );
407+ R( c, d, e, a, b, F4, K4, M(68) );
408+ R( b, c, d, e, a, F4, K4, M(69) );
409+ R( a, b, c, d, e, F4, K4, M(70) );
410+ R( e, a, b, c, d, F4, K4, M(71) );
411+ R( d, e, a, b, c, F4, K4, M(72) );
412+ R( c, d, e, a, b, F4, K4, M(73) );
413+ R( b, c, d, e, a, F4, K4, M(74) );
414+ R( a, b, c, d, e, F4, K4, M(75) );
415+ R( e, a, b, c, d, F4, K4, M(76) );
416+ R( d, e, a, b, c, F4, K4, M(77) );
417+ R( c, d, e, a, b, F4, K4, M(78) );
418+ R( b, c, d, e, a, F4, K4, M(79) );
419+
420+ a = ctx->A += a;
421+ b = ctx->B += b;
422+ c = ctx->C += c;
423+ d = ctx->D += d;
424+ e = ctx->E += e;
425+ }
426+}
--- /dev/null
+++ b/gdb/sha1.h
@@ -0,0 +1,97 @@
1+/* Declarations of functions and data types used for SHA1 sum
2+ library functions.
3+ Copyright (C) 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
4+
5+ This program is free software; you can redistribute it and/or modify it
6+ under the terms of the GNU General Public License as published by the
7+ Free Software Foundation; either version 2, or (at your option) any
8+ later version.
9+
10+ This program is distributed in the hope that it will be useful,
11+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+ GNU General Public License for more details.
14+
15+ You should have received a copy of the GNU General Public License
16+ along with this program; if not, write to the Free Software Foundation,
17+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
18+
19+/* NOTE: The master copy of this file lives in GNU coreutils. Please import
20+ it from there. Only minimal changes have been made, and marked with
21+ IN_GDB. */
22+#define IN_GDB
23+
24+#ifndef SHA1_H
25+# define SHA1_H 1
26+
27+# include <stdio.h>
28+# ifdef IN_GDB
29+# include "gdb_stdint.h"
30+# define md5_uint32 uint32_t
31+# else
32+# include "md5.h"
33+# endif
34+
35+/* Structure to save state of computation between the single steps. */
36+struct sha1_ctx
37+{
38+ md5_uint32 A;
39+ md5_uint32 B;
40+ md5_uint32 C;
41+ md5_uint32 D;
42+ md5_uint32 E;
43+
44+ md5_uint32 total[2];
45+ md5_uint32 buflen;
46+ char buffer[128] __attribute__ ((__aligned__ (__alignof__ (md5_uint32))));
47+};
48+
49+
50+/* Initialize structure containing state of computation. */
51+extern void sha1_init_ctx (struct sha1_ctx *ctx);
52+
53+/* Starting with the result of former calls of this function (or the
54+ initialization function update the context for the next LEN bytes
55+ starting at BUFFER.
56+ It is necessary that LEN is a multiple of 64!!! */
57+extern void sha1_process_block (const void *buffer, size_t len,
58+ struct sha1_ctx *ctx);
59+
60+/* Starting with the result of former calls of this function (or the
61+ initialization function update the context for the next LEN bytes
62+ starting at BUFFER.
63+ It is NOT required that LEN is a multiple of 64. */
64+extern void sha1_process_bytes (const void *buffer, size_t len,
65+ struct sha1_ctx *ctx);
66+
67+/* Process the remaining bytes in the buffer and put result from CTX
68+ in first 20 bytes following RESBUF. The result is always in little
69+ endian byte order, so that a byte-wise output yields to the wanted
70+ ASCII representation of the message digest.
71+
72+ IMPORTANT: On some systems it is required that RESBUF be correctly
73+ aligned for a 32 bits value. */
74+extern void *sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf);
75+
76+
77+/* Put result from CTX in first 20 bytes following RESBUF. The result is
78+ always in little endian byte order, so that a byte-wise output yields
79+ to the wanted ASCII representation of the message digest.
80+
81+ IMPORTANT: On some systems it is required that RESBUF is correctly
82+ aligned for a 32 bits value. */
83+extern void *sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf);
84+
85+
86+/* Compute SHA1 message digest for bytes read from STREAM. The
87+ resulting message digest number will be written into the 20 bytes
88+ beginning at RESBLOCK. */
89+extern int sha1_stream (FILE *stream, void *resblock);
90+
91+/* Compute SHA1 message digest for LEN bytes beginning at BUFFER. The
92+ result is always in little endian byte order, so that a byte-wise
93+ output yields to the wanted ASCII representation of the message
94+ digest. */
95+extern void *sha1_buffer (const char *buffer, size_t len, void *resblock);
96+
97+#endif