From: David MacKenzie Date: Tue, 22 Mar 1994 23:28:24 +0000 (+0000) Subject: (AC_SIZEOF_TYPE): New macro. X-Git-Tag: fsf-origin~770 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3959e019d91937de445301bbd642db7ac018614;p=thirdparty%2Fautoconf.git (AC_SIZEOF_TYPE): New macro. --- diff --git a/acgeneral.m4 b/acgeneral.m4 index 61e861542..4d578b15c 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -33,7 +33,7 @@ dnl dnl Utility functions for stamping the configure script. dnl dnl -define(AC_ACVERSION, 1.7.4)dnl +define(AC_ACVERSION, 1.7.5)dnl dnl This is defined by the --version option of the autoconf script. ifdef([AC_PRINT_VERSION], [errprint(Autoconf version AC_ACVERSION )])dnl @@ -672,6 +672,18 @@ else fi ])])dnl dnl +define(AC_SIZEOF_TYPE, +[AC_CHECKING(size of $1) +$2=0 +AC_TEST_PROGRAM([#include +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof($1)); + exit(0); +}], $2=`cat conftestval`)])dnl +dnl dnl dnl The big finish dnl diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 61e861542..4d578b15c 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -33,7 +33,7 @@ dnl dnl Utility functions for stamping the configure script. dnl dnl -define(AC_ACVERSION, 1.7.4)dnl +define(AC_ACVERSION, 1.7.5)dnl dnl This is defined by the --version option of the autoconf script. ifdef([AC_PRINT_VERSION], [errprint(Autoconf version AC_ACVERSION )])dnl @@ -672,6 +672,18 @@ else fi ])])dnl dnl +define(AC_SIZEOF_TYPE, +[AC_CHECKING(size of $1) +$2=0 +AC_TEST_PROGRAM([#include +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof($1)); + exit(0); +}], $2=`cat conftestval`)])dnl +dnl dnl dnl The big finish dnl