This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: AC_COMPILE_CHECK_SIZEOF


>> Would you approve a patch that cuts over to AC_CHECK_SIZEOF?
> 
> Yes, as long as it comes fairly soon.

Ok, this one does just that.

Regenerating the files in libffi (with automake 1.8.5) also seems to
get one automake version (1.8.3) out of the tree.


2004-09-12  Jones Desougi  <jones@ingate.com>

	* accross.m4 (AC_COMPILE_CHECK_SIZEOF): Removed.

	* configure.ac: Replace local AC_COMPILE_CHECK_SIZEOF with the
	standard AC_CHECK_SIZEOF macro.


Index: config/accross.m4
===================================================================
RCS file: /cvsroot/gcc/gcc/config/accross.m4,v
retrieving revision 1.3
diff -u -r1.3 accross.m4
--- config/accross.m4	9 Mar 2004 01:16:10 -0000	1.3
+++ config/accross.m4	13 Sep 2004 00:41:51 -0000
@@ -1,29 +1,3 @@
-AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
-[changequote(<<, >>)dnl
-dnl The name to #define.
-define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
-dnl The cache variable name.
-define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
-changequote([, ])dnl
-AC_MSG_CHECKING(size of $1)
-AC_CACHE_VAL(AC_CV_NAME,
-[for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence.
-  AC_TRY_COMPILE([#include "confdefs.h"
-#include <sys/types.h>
-$2
-], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
-  if test x$AC_CV_NAME != x ; then break; fi
-done
-])
-if test x$AC_CV_NAME = x ; then
-  AC_MSG_ERROR([cannot determine a size for $1])
-fi
-AC_MSG_RESULT($AC_CV_NAME)
-AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
-undefine([AC_TYPE_NAME])dnl
-undefine([AC_CV_NAME])dnl
-])
-
 AC_DEFUN([AC_C_BIGENDIAN_CROSS],
 [AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
 [ac_cv_c_bigendian=unknown
Index: fastjar/configure.ac
===================================================================
RCS file: /cvsroot/gcc/gcc/fastjar/configure.ac,v
retrieving revision 1.5
diff -u -r1.5 configure.ac
--- fastjar/configure.ac	19 Jul 2004 20:08:20 -0000	1.5
+++ fastjar/configure.ac	13 Sep 2004 00:41:51 -0000
@@ -37,11 +37,11 @@
 gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG
 
 dnl Check for type-widths
-AC_COMPILE_CHECK_SIZEOF(char)
-AC_COMPILE_CHECK_SIZEOF(short)
-AC_COMPILE_CHECK_SIZEOF(int)
-AC_COMPILE_CHECK_SIZEOF(long)
-AC_CHECK_TYPES([long long],[AC_COMPILE_CHECK_SIZEOF(long long)])
+AC_CHECK_SIZEOF(char)
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
+AC_CHECK_TYPES([long long],[AC_CHECK_SIZEOF(long long)])
 
 dnl Check byte order
 AC_C_BIGENDIAN_CROSS
Index: gcc/configure.ac
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/configure.ac,v
retrieving revision 2.65
diff -u -r2.65 configure.ac
--- gcc/configure.ac	11 Sep 2004 04:26:36 -0000	2.65
+++ gcc/configure.ac	13 Sep 2004 00:41:58 -0000
@@ -289,15 +289,15 @@
 gcc_AC_C_LONG_LONG
 
 # sizeof(char) is 1 by definition.
-AC_COMPILE_CHECK_SIZEOF(void *)
-AC_COMPILE_CHECK_SIZEOF(short)
-AC_COMPILE_CHECK_SIZEOF(int)
-AC_COMPILE_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(void *)
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
 if test $ac_cv_c_long_long = yes; then
-  AC_COMPILE_CHECK_SIZEOF(long long)
+  AC_CHECK_SIZEOF(long long)
 fi
 if test $ac_cv_c___int64 = yes; then
-  AC_COMPILE_CHECK_SIZEOF(__int64)
+  AC_CHECK_SIZEOF(__int64)
 fi
 
 # ---------------------
Index: libffi/configure.ac
===================================================================
RCS file: /cvsroot/gcc/gcc/libffi/configure.ac,v
retrieving revision 1.7
diff -u -r1.7 configure.ac
--- libffi/configure.ac	30 Aug 2004 15:43:00 -0000	1.7
+++ libffi/configure.ac	13 Sep 2004 00:42:56 -0000
@@ -109,8 +109,8 @@
 AC_CHECK_FUNCS(memcpy)
 AC_FUNC_ALLOCA
 
-AC_COMPILE_CHECK_SIZEOF(double)
-AC_COMPILE_CHECK_SIZEOF(long double)
+AC_CHECK_SIZEOF(double)
+AC_CHECK_SIZEOF(long double)
 
 # Also AC_SUBST this variable for ffi.h.
 HAVE_LONG_DOUBLE=0
Index: libjava/configure.ac
===================================================================
RCS file: /cvsroot/gcc/gcc/libjava/configure.ac,v
retrieving revision 1.7
diff -u -r1.7 configure.ac
--- libjava/configure.ac	8 Sep 2004 19:57:13 -0000	1.7
+++ libjava/configure.ac	13 Sep 2004 00:42:59 -0000
@@ -1122,7 +1122,7 @@
 
 CPPFLAGS=$GCJ_SAVE_CPPFLAGS
 
-AC_COMPILE_CHECK_SIZEOF(void *)
+AC_CHECK_SIZEOF(void *)
 
 ZLIBS=
 SYS_ZLIBS=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]