public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jones Desougi <jones@ingate.com>
To: zack@codesourcery.com
Cc: gcc@gcc.gnu.org
Subject: Re: AC_COMPILE_CHECK_SIZEOF
Date: Mon, 13 Sep 2004 13:18:00 -0000	[thread overview]
Message-ID: <200409131159.i8DBxRw4008203@usagi.ingate.se> (raw)
In-Reply-To: <87n002wucb.fsf@codesourcery.com> (message from Zack Weinberg on Mon, 06 Sep 2004 21:56:04 -0700)


>> 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=

  reply	other threads:[~2004-09-13 11:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-05 15:45 AC_COMPILE_CHECK_SIZEOF Jones Desougi
2004-09-05 17:04 ` AC_COMPILE_CHECK_SIZEOF Zack Weinberg
2004-09-05 23:45   ` AC_COMPILE_CHECK_SIZEOF Jones Desougi
2004-09-06  0:44     ` AC_COMPILE_CHECK_SIZEOF Zack Weinberg
2004-09-06 14:36       ` AC_COMPILE_CHECK_SIZEOF Giovanni Bajo
2004-09-06 16:44         ` AC_COMPILE_CHECK_SIZEOF Zack Weinberg
2004-09-06 22:03       ` AC_COMPILE_CHECK_SIZEOF Jones Desougi
2004-09-07  4:56         ` AC_COMPILE_CHECK_SIZEOF Zack Weinberg
2004-09-13 13:18           ` Jones Desougi [this message]
2004-09-13 21:13             ` AC_COMPILE_CHECK_SIZEOF Zack Weinberg
2004-09-13 21:20               ` AC_COMPILE_CHECK_SIZEOF DJ Delorie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200409131159.i8DBxRw4008203@usagi.ingate.se \
    --to=jones@ingate.com \
    --cc=gcc@gcc.gnu.org \
    --cc=zack@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).