diff mbox

64-bit obstack support

Message ID 20140714020335.GR8039@bubble.grove.modra.org
State New
Headers show

Commit Message

Alan Modra July 14, 2014, 2:03 a.m. UTC
64-bit obstack support, >2G obstacks

An update, importing a newer version of glibc's obstack support (with
new bugs, use of glibc macros, fixed).  Plus fix some thinkos in my
first patch, like including config.h in obstack.h.  And gcc tweaks.

- Get rid of "int" and "long" size parameters and vars in obstacks.
  If we want to keep compatibility with OBSTACK_INTERFACE_VERSION==1
  obstack struct and functions, we can make them "unsigned int" and
  "unsigned long" allowing larger than 2G obstacks even on 32-bit
  hosts.  For 64-bit hosts OBSTACK_INTERFACE_VERSION==2 we make them
  all "size_t".
- Using "long" as obstack_chunk_alloc function parameter type is
  simply a bug, since malloc etc. always take a size_t, and long might
  be smaller than size_t.  (long is 32-bit on Microsoft 64-bit.)
- Use obstack_room throughout whenever checking space left in obstacks
  (next_free + desired > chunk_limit may wrap the lhs for chunks
  allocated near the top of memory).  To support >2G on 32-bit, temp.i
  needs to be unsigned, so size_t rather than ptrdiff_t.
- Steal lots of fixes from glibc by importing glibc's obstack.{h,c}
  and fix recent regressions.
- Don't roll our own slow memcpy in _obstack_newchunk.
- Rename obstack_free to _obstack_free for consistency with other
  obstack.c functions.
- Move OBSTACK_INTERFACE_VERSION to obstack.h, in order to make it
  possible to force compilation of version 1 obstack, with a nod
  toward glibc being able to compile obstack.c twice.

Since I imported obstack.h and obtack.c from glibc, the changelog
shows deltas from glibc versions, and the diff for obstack.h and
obstack.c is against glibc and made with -uw to better see the real
changes.

I removed the use of gettext.h and exitfail.h in obstack.c.  We
don't have those files in binutils/gdb/gcc and it hardly seems worth
importing them from gnulib.

Outside of obstack.{h,c} the changes are relatively minor, and can be
applied before the obstack patches.  My plan of attach is to get those
patches, minus the configury changes, applied first.  So I'd like
permission to apply the gdb and gcc changes now.  They have been
tested independently of the obstack changes.  Next, apply the obstack
changes to binutils/gdb/gcc, and finally backport to glibc.

I'm ambivalent over whether the configury changes are really
desirable.  Their aim is to allow the new obstack.h to be used with
current glibc when sizeof(size_t)==sizeof(int), ie. on most 32-bit
targets.  Under those conditions the obstack ABI is unchanged so it is
possible to save some code space by using glibc's _obstack_begin,
_obstack_newchunk etc., at the cost of losing >2G obstacks.  Now it's
a brave person who would want >2G obstacks on a 32-bit host so you
don't lose much.  However, the configury changes are an added
complication that I haven't yet tested for cross-compilation, and only
help in the transition period until glibc is released with >2G obstack
support.

include/
	PR gdb/17133
	* obstack.h: Import current glibc file.  On top of that..
	Formatting.
	(__OBSTACK_INTERFACE_VERSION): Define.
	(__OBSTACK_ELIDE_CODE): Define.
	(__OBSTACK_SIZE_T, __CHUNK_SIZE_T): Define.
	(__PTR_INT_TYPE): Rename from PTR_INT_TYPE.
	(__attribute_pure__): Define without reference to glibc macro.
	(__extension__): Avoid warning when __GNUC_MINOR__ undefined.
	(struct obstack): Make chunk_size a __CHUNK_SIZE_T, and temp union
	with __OBSTACK_SIZE_T.  Correct chunkfun prototype to take a size_t.
	(_obstack_newchunk): Update prototype.
	(_obstack_begin, _obstack_begin_1, _obstack_memory_used): Likewise.
	(__obstack_free): Define as _obstack_free.
	(obstack_init, obstack_begin, obstack_specify_allocation_with_arg,
	obstack_chunkfun): Update alloc function casts, formatting.
	For __STDC__ versions of the following macros:
	(obstack_object_size): Return __OBSTACK_SIZE_T.
	(obstack_room): Likewise, and rename __o.
	(obstack_make_room): Make __len __OBSTACK_SIZE_T, and use obstack_room.
	(obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow,
	obstack_int_grow, obstack_blank): Likewise.
	(obstack_finish): Use unsigned comparision when comparing aligned
	next_free against chunk_limit.
	(obstack_free): Cast OBJ to remove possible const qualifier.
	Don't wrap __obstack_free in parentheses.
	For !__STDC__ versions of the following macros:
	(obstack_object_size, obstack_room): Return __OBSTACK_SIZE_T.
	(obstack_make_room): Use temp.i and obstack_room.
	(obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow,
	obstack_int_grow, obstack_blank): Likewise.
	(obstack_finish): Use temp.p.  Use unsigned comparision when
	comparing aligned next_free against chunk_limit.
	(obstack_free): Use temp.p and same comparisons as __STDC__ version.
	Don't wrap __obstack_free in parentheses.
libiberty/
	PR gdb/17133
	* obstack.c: Import current glibc file.  On top of that..
	Include gnu-versions.h.  Don't include exitfail.h and gettext.h.
	(OBSTACK_INTERFACE_VERSION): Delete.
	(ELIDE_CODE): Delete.  Test __OBSTACK_ELIDE_CODE instead.
	(COPYING_UNIT): Delete.
	(print_and_abort, obstack_alloc_failed_handler): Conditionally define.
	(_obstack_compat): Likewise.
	(_Noreturn): Don't rely on this being defined, define ..
	(__attribute_noreturn__): ..and use this instead.
	(EXIT_FAILURE): Define.
	(CALL_CHUNKFUN): Update chunkfun cast.
	(chunkfun_t, freefun_t): New typdefs.
	(_obstack_begin_worker): Split out from ..
	(_obstack_begin, _obstack_begin_1): ..here.  Make "size" param
	 __CHUNK_SIZE_T, and correct chunkfun prototype.
	(_obstack_newchunk): Make "length" param __OBSTACK_SIZE_T and local
	vars size_t.  Use memcpy to move existing object.
	(obstack_free): Only define alias for version 1 interface.
	(_obstack_memory_used): Return and use __OBSTACK_SIZE_T local.
	* obstacks.texi: Update function signatures.
	* configure.ac: Get size of size_t.
	* config.in: Regenerate.
	* configure: Regenerate.
binutils/
	* configure.ac: Get size of int and size_t.
	* config.in: Regenerate.
	* configure: Regenerate.
gas/
	* config/bfin-parse.y: Don't include obstack.h.
	* config/obj-aout.c: Likewise.
	* config/obj-coff.c: Likewise.
	* config/obj-som.c: Likewise.
	* config/tc-bfin.c: Likewise.
	* config/tc-i960.c: Likewise.
	* config/tc-rl78.c: Likewise.
	* config/tc-rx.c: Likewise.
	* config/tc-tic4x.c: Likewise.
	* expr.c: Likewise.
	* listing.c: Likewise.
	* config/obj-elf.c (elf_file_symbol): Make name_length a size_t.
	* config/tc-aarch64.c (symbol_locate): Likewise.
	* config/tc-arm.c (symbol_locate): Likewise.
	* config/tc-mmix.c (mmix_handle_mmixal): Make len_0 a size_t.
	* config/tc-score.c (s3_build_score_ops_hsh): Make len a size_t.
	(s3_build_dependency_insn_hsh): Likewise.
	* config/tc-score7.c (s7_build_score_ops_hsh): Likewise.
	(s7_build_dependency_insn_hsh): Likewise.
	* frags.c (frag_grow): Make parameter a size_t, and use size_t locals.
	(frag_new): Make parameter a size_t.
	(frag_var_init): Make max_chars and var parameters size_t.
	(frag_var, frag_variant): Likewise.
	(frag_room): Return a size_t.
	(frag_align_pattern): Make n_fill parameter a size_t.
	* frags.h: Update function prototypes.
	* symbols.c (save_symbol_name): Make name_length a size_t.
	* configure.ac: Get size of int and size_t.
	* config.in: Regenerate.
	* configure: Regenerate.
gdb/
	* charset.c (convert_between_encodings): Cast result of obstack_base.
	* cp-valprint.c (cp_print_value_fields): Use size_t locals.
	* hppa-tdep.c (internalize_unwinds): Change "size" parm to size_t.
	(read_unwind_info): Use size_t for some locals.
	* jit.c (finalize_symtab): Likewise.
	* utils.c (hashtab_obstack_allocate): Likewise.
	* symmisc.c (print_objfile_statistics): Update format strings.
	* configure.ac: Get size of int and size_t.
	* config.in: Regenerate.
	* configure: Regenerate.
ld/
	* configure.ac: Get size of int and size_t.
	* config.in: Regenerate.
	* configure: Regenerate.
gcc/
	* gengtype.h (obstack_chunk_alloc, obstack_chunk_free): Remove cast.
	* coretypes.h (obstack_chunk_alloc, obstack_chunk_free): Likewise.
	(gcc_obstack_init): Use obstack_specify_allocation in place of
	_obstack_begin.
	* genautomata.c (next_sep_el): Cast result of obstack_base to (char *).
	(regexp_representation): Likewise.
	* godump.c (go_output_type): Likewise.
	* configure.ac: Check size of size_t.
	* configure: Regenerate.
	* config.in: Regenerate.
gcc/java/
	* mangle.c (finish_mangling): Cast result of obstack_base to (char *).
	* typeck.c (build_java_argument_signature): Likewise.
	(build_java_signature): Likewise.
gcc/objc/
	* objc-encoding.c (encode_array): Cast result of obstack_base.
	(encode_type): Likewise.
libcpp/
	* symtab.c (ht_create): Use obstack_specify_allocation in place of
	_obstack_begin.
	* files.c (_cpp_init_files): Likewise.
	* init.c (cpp_create_reader): Likewise.
	* identifiers.c (_cpp_init_hashtable): Likewise.
	* configure.ac: Check size of size_t.
	* configure: Regenerate.
	* config.in: Regenerate.
libvtv/
	* vtv-malloc.c: Include config.h.
	* configure.ac: Generate config.h.  Check size of int and size_t.
	* configure: Regenerate.
	* config.in: Generate.
libsanitizer/
	* configure.ac: Check size of int and size_t.
	* configure: Regenerate.
	* config.in: Regenerate.
diff mbox

Patch

Three gcc changes for obstack update

1) Current glibc obstack.h casts the return of obstack_base() to
   void*,  with the result that a few places in gcc need a (char *)
   cast.
2) My 64-bit obstack support corrects the obstack_chunk_alloc
   parameter, which was "long", to "size_t".  This means a number of
   places in gcc currently specifying the old prototype are now wrong.
   I'd argue they are wrong anyway, since there are convenience macros
   that avoid any need for user code to type cast allocation and free
   functions.
3) An optimisation in my new obstack.h depends on SIZEOF_INT and
   SIZEOF_SIZE_T being defined, thus the config additions anywhare
   obstack.h is used.  

Bootstrapped and regression tested x86_64-linux and powerpc-linux,
with both the new obstack.{h,c} and the old versions.

I'd like to commit (1) and (2) now, leaving (3) until after the 64-bit
obstack changes go in.  OK for mainline gcc?

gcc/
	* gengtype.h (obstack_chunk_alloc, obstack_chunk_free): Remove cast.
	* coretypes.h (obstack_chunk_alloc, obstack_chunk_free): Likewise.
	(gcc_obstack_init): Use obstack_specify_allocation in place of
	_obstack_begin.
	* genautomata.c (next_sep_el): Cast result of obstack_base to (char *).
	(regexp_representation): Likewise.
	* godump.c (go_output_type): Likewise.
	* configure.ac: Check size of size_t.
	* configure: Regenerate.
	* config.in: Regenerate.
gcc/java/
	* mangle.c (finish_mangling): Cast result of obstack_base to (char *).
	* typeck.c (build_java_argument_signature): Likewise.
	(build_java_signature): Likewise.
gcc/objc/
	* objc-encoding.c (encode_array): Cast result of obstack_base.
	(encode_type): Likewise.
libcpp/
	* symtab.c (ht_create): Use obstack_specify_allocation in place of
	_obstack_begin.
	* files.c (_cpp_init_files): Likewise.
	* init.c (cpp_create_reader): Likewise.
	* identifiers.c (_cpp_init_hashtable): Likewise.
	* configure.ac: Check size of size_t.
	* configure: Regenerate.
	* config.in: Regenerate.
libvtv/
	* vtv-malloc.c: Include config.h.
	* configure.ac: Generate config.h.  Check size of int and size_t.
	* configure: Regenerate.
	* config.in: Generate.
libsanitizer/
	* configure.ac: Check size of int and size_t.
	* configure: Regenerate.
	* config.in: Regenerate.

Index: gcc/gengtype.h
===================================================================
--- gcc/gengtype.h	(revision 212477)
+++ gcc/gengtype.h	(working copy)
@@ -20,8 +20,8 @@ 
 #ifndef GCC_GENGTYPE_H
 #define GCC_GENGTYPE_H
 
-#define obstack_chunk_alloc    ((void *(*) (long)) xmalloc)
-#define obstack_chunk_free     ((void (*) (void *)) free)
+#define obstack_chunk_alloc    xmalloc
+#define obstack_chunk_free     free
 #define OBSTACK_CHUNK_SIZE     0
 
 /* Sets of accepted source languages like C, C++, Ada... are
Index: gcc/coretypes.h
===================================================================
--- gcc/coretypes.h	(revision 212477)
+++ gcc/coretypes.h	(working copy)
@@ -158,13 +158,13 @@  struct basic_block_def;
 typedef struct basic_block_def *basic_block;
 typedef const struct basic_block_def *const_basic_block;
 
-#define obstack_chunk_alloc	((void *(*) (long)) xmalloc)
-#define obstack_chunk_free	((void (*) (void *)) free)
+#define obstack_chunk_alloc	xmalloc
+#define obstack_chunk_free	free
 #define OBSTACK_CHUNK_SIZE	0
-#define gcc_obstack_init(OBSTACK)			\
-  _obstack_begin ((OBSTACK), OBSTACK_CHUNK_SIZE, 0,	\
-		  obstack_chunk_alloc,			\
-		  obstack_chunk_free)
+#define gcc_obstack_init(OBSTACK)				\
+  obstack_specify_allocation ((OBSTACK), OBSTACK_CHUNK_SIZE, 0,	\
+			      obstack_chunk_alloc,		\
+			      obstack_chunk_free)
 
 /* enum reg_class is target specific, so it should not appear in
    target-independent code or interfaces, like the target hook declarations
Index: gcc/genautomata.c
===================================================================
--- gcc/genautomata.c	(revision 212477)
+++ gcc/genautomata.c	(working copy)
@@ -1178,7 +1178,7 @@  next_sep_el (const char **pstr, int sep, int par_f
 	}
     }
   obstack_1grow (&irp, '\0');
-  out_str = obstack_base (&irp);
+  out_str = (char *) obstack_base (&irp);
   obstack_finish (&irp);
 
   *pstr = p;
@@ -6873,7 +6873,7 @@  regexp_representation (regexp_t regexp)
 {
   form_regexp (regexp);
   obstack_1grow (&irp, '\0');
-  return obstack_base (&irp);
+  return (char *) obstack_base (&irp);
 }
 
 /* The function frees memory allocated for last formed string
@@ -9289,7 +9289,7 @@  initiate_automaton_gen (char **argv)
   obstack_grow (&irp, STANDARD_OUTPUT_DESCRIPTION_FILE_SUFFIX,
 		strlen (STANDARD_OUTPUT_DESCRIPTION_FILE_SUFFIX) + 1);
   obstack_1grow (&irp, '\0');
-  output_description_file_name = obstack_base (&irp);
+  output_description_file_name = (char *) obstack_base (&irp);
   obstack_finish (&irp);
 }
 
Index: gcc/godump.c
===================================================================
--- gcc/godump.c	(revision 212477)
+++ gcc/godump.c	(working copy)
@@ -921,7 +921,7 @@  go_output_type (struct godump_container *container
 
   ob = &container->type_obstack;
   obstack_1grow (ob, '\0');
-  fputs (obstack_base (ob), go_dump_file);
+  fputs ((char *) obstack_base (ob), go_dump_file);
   obstack_free (ob, obstack_base (ob));
 }
 
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac	(revision 212477)
+++ gcc/configure.ac	(working copy)
@@ -311,6 +311,7 @@  AC_CHECK_SIZEOF(short)
 AC_CHECK_SIZEOF(int)
 AC_CHECK_SIZEOF(long)
 AC_CHECK_TYPES([long long], [AC_CHECK_SIZEOF(long long)])
+AC_CHECK_SIZEOF(size_t)
 GCC_STDINT_TYPES
 if test x"$ac_cv_c_uint64_t" = x"no" -o x"$ac_cv_c_int64_t" = x"no"; then
   AC_MSG_ERROR([uint64_t or int64_t not found])
Index: gcc/java/mangle.c
===================================================================
--- gcc/java/mangle.c	(revision 212477)
+++ gcc/java/mangle.c	(working copy)
@@ -711,7 +711,7 @@  finish_mangling (void)
   compression_table = NULL_TREE;
   compression_next = 0;
   obstack_1grow (mangle_obstack, '\0');
-  result = get_identifier (obstack_base (mangle_obstack));
+  result = get_identifier ((char *) obstack_base (mangle_obstack));
   obstack_free (mangle_obstack, obstack_base (mangle_obstack));
 
   return result;
Index: gcc/java/typeck.c
===================================================================
--- gcc/java/typeck.c	(revision 212477)
+++ gcc/java/typeck.c	(working copy)
@@ -477,7 +477,7 @@  build_java_argument_signature (tree type)
 	}
       obstack_1grow (&temporary_obstack, '\0');
 
-      sig = get_identifier (obstack_base (&temporary_obstack));
+      sig = get_identifier ((char *) obstack_base (&temporary_obstack));
       TYPE_ARGUMENT_SIGNATURE (type) = sig;
       obstack_free (&temporary_obstack, obstack_base (&temporary_obstack));
     }
@@ -554,7 +554,7 @@  build_java_signature (tree type)
 	    obstack_grow0 (&temporary_obstack,
 			   IDENTIFIER_POINTER (t), IDENTIFIER_LENGTH (t));
 
-	    sig = get_identifier (obstack_base (&temporary_obstack));
+	    sig = get_identifier ((char *) obstack_base (&temporary_obstack));
 	    obstack_free (&temporary_obstack,
 			  obstack_base (&temporary_obstack));
 	  }
Index: gcc/objc/objc-encoding.c
===================================================================
--- gcc/objc/objc-encoding.c	(revision 212477)
+++ gcc/objc/objc-encoding.c	(working copy)
@@ -380,7 +380,7 @@  encode_array (tree type, int curtype, int format)
 	 identifier.
       */
       {
-	char *enc = obstack_base (&util_obstack) + curtype;
+	char *enc = (char *) obstack_base (&util_obstack) + curtype;
 	if (memchr (enc, '=',
 		    obstack_object_size (&util_obstack) - curtype) == NULL)
 	  {
@@ -729,7 +729,7 @@  encode_type (tree type, int curtype, int format)
 	 to be rearranged for compatibility with gcc-3.3.  */
       if (code == POINTER_TYPE && obstack_object_size (&util_obstack) >= 3)
 	{
-	  char *enc = obstack_base (&util_obstack) + curtype;
+	  char *enc = (char *) obstack_base (&util_obstack) + curtype;
 
 	  /* Rewrite "in const" from "nr" to "rn".  */
 	  if (curtype >= 1 && !strncmp (enc - 1, "nr", 2))
Index: libcpp/symtab.c
===================================================================
--- libcpp/symtab.c	(revision 212477)
+++ libcpp/symtab.c	(working copy)
@@ -61,9 +61,7 @@  ht_create (unsigned int order)
   table = XCNEW (cpp_hash_table);
 
   /* Strings need no alignment.  */
-  _obstack_begin (&table->stack, 0, 0,
-		  (void *(*) (long)) xmalloc,
-		  (void (*) (void *)) free);
+  obstack_specify_allocation (&table->stack, 0, 0, xmalloc, free);
 
   obstack_alignment_mask (&table->stack) = 0;
 
Index: libcpp/files.c
===================================================================
--- libcpp/files.c	(revision 212477)
+++ libcpp/files.c	(working copy)
@@ -1267,9 +1267,8 @@  _cpp_init_files (cpp_reader *pfile)
   pfile->nonexistent_file_hash = htab_create_alloc (127, htab_hash_string,
 						    nonexistent_file_hash_eq,
 						    NULL, xcalloc, free);
-  _obstack_begin (&pfile->nonexistent_file_ob, 0, 0,
-		  (void *(*) (long)) xmalloc,
-		  (void (*) (void *)) free);
+  obstack_specify_allocation (&pfile->nonexistent_file_ob, 0, 0,
+			      xmalloc, free);
 }
 
 /* Finalize everything in this source file.  */
Index: libcpp/init.c
===================================================================
--- libcpp/init.c	(revision 212477)
+++ libcpp/init.c	(working copy)
@@ -260,9 +260,7 @@  cpp_create_reader (enum c_lang lang, cpp_hash_tabl
   _cpp_expand_op_stack (pfile);
 
   /* Initialize the buffer obstack.  */
-  _obstack_begin (&pfile->buffer_ob, 0, 0,
-		  (void *(*) (long)) xmalloc,
-		  (void (*) (void *)) free);
+  obstack_specify_allocation (&pfile->buffer_ob, 0, 0, xmalloc, free);
 
   _cpp_init_files (pfile);
 
Index: libcpp/identifiers.c
===================================================================
--- libcpp/identifiers.c	(revision 212477)
+++ libcpp/identifiers.c	(working copy)
@@ -54,9 +54,7 @@  _cpp_init_hashtable (cpp_reader *pfile, cpp_hash_t
       table = ht_create (13);	/* 8K (=2^13) entries.  */
       table->alloc_node = alloc_node;
 
-      _obstack_begin (&pfile->hash_ob, 0, 0,
-		      (void *(*) (long)) xmalloc,
-		      (void (*) (void *)) free);
+      obstack_specify_allocation (&pfile->hash_ob, 0, 0, xmalloc, free);
     }
 
   table->pfile = pfile;
Index: libcpp/configure.ac
===================================================================
--- libcpp/configure.ac	(revision 212477)
+++ libcpp/configure.ac	(working copy)
@@ -71,6 +71,7 @@  fi
 AC_STRUCT_TM
 AC_CHECK_SIZEOF(int)
 AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(size_t)
 define(libcpp_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl
   ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked dnl
   fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked dnl
Index: libvtv/vtv_malloc.cc
===================================================================
--- libvtv/vtv_malloc.cc	(revision 212477)
+++ libvtv/vtv_malloc.cc	(working copy)
@@ -31,6 +31,7 @@ 
    in vtv_rts.cc.  We use the existing obstack implementation in our
    memory allocation scheme.  */
 
+#include "config.h"
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/mman.h>
Index: libvtv/configure.ac
===================================================================
--- libvtv/configure.ac	(revision 212477)
+++ libvtv/configure.ac	(working copy)
@@ -5,6 +5,7 @@  AC_PREREQ([2.64])
 AC_INIT([GNU Vtable Verification Runtime Library], 1.0,,[libvtv])
 #AC_INIT(package-unused, version-unused, libvtv)
 AC_CONFIG_SRCDIR([vtv_rts.h])
+AC_CONFIG_HEADER([config.h])
 
 # -------
 # Options
@@ -119,6 +120,10 @@  AC_CHECK_TOOL(AS, as)
 AC_CHECK_TOOL(AR, ar)
 AC_CHECK_TOOL(RANLIB, ranlib, :)
 
+# Get size of int and size_t for obstack.h.
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(size_t)
+
 # Configure libtool
 AC_LIBTOOL_DLOPEN
 AM_PROG_LIBTOOL
Index: libsanitizer/configure.ac
===================================================================
--- libsanitizer/configure.ac	(revision 212477)
+++ libsanitizer/configure.ac	(working copy)
@@ -76,6 +76,8 @@  esac
 AC_SUBST(enable_shared)
 AC_SUBST(enable_static)
 
+AC_CHECK_SIZEOF([int])
+AC_CHECK_SIZEOF([size_t])
 AC_CHECK_SIZEOF([void *])
 
 if test "${multilib}" = "yes"; then