[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apr-cvs
Subject:    svn commit: r1871980 - in /apr/apr/trunk: build/apr_common.m4 configure.in
From:       minfrin () apache ! org
Date:       2019-12-26 1:18:53
Message-ID: 20191226011853.BA88617A010 () svn01-us-east ! apache ! org
[Download RAW message or body]

Author: minfrin
Date: Thu Dec 26 01:18:53 2019
New Revision: 1871980

URL: http://svn.apache.org/viewvc?rev=1871980&view=rev
Log:
Use AC_CHECK_SIZEOF, so as to support cross compiling. PR 56053.

Modified:
    apr/apr/trunk/build/apr_common.m4
    apr/apr/trunk/configure.in

Modified: apr/apr/trunk/build/apr_common.m4
URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/apr_common.m4?rev=1871980&r1=1871979&r2=1871980&view=diff
 ==============================================================================
--- apr/apr/trunk/build/apr_common.m4 (original)
+++ apr/apr/trunk/build/apr_common.m4 Thu Dec 26 01:18:53 2019
@@ -452,43 +452,6 @@ fi
 
 
 dnl
-dnl APR_CHECK_SIZEOF_EXTENDED(INCLUDES, TYPE [, CROSS_SIZE])
-dnl
-dnl A variant of AC_CHECK_SIZEOF which allows the checking of
-dnl sizes of non-builtin types
-dnl
-AC_DEFUN([APR_CHECK_SIZEOF_EXTENDED],
-[changequote(<<, >>)dnl
-dnl The name to #define.
-define(<<AC_TYPE_NAME>>, translit(sizeof_$2, [a-z *], [A-Z_P]))dnl
-dnl The cache variable name.
-define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$2, [ *], [_p]))dnl
-changequote([, ])dnl
-AC_MSG_CHECKING(size of $2)
-AC_CACHE_VAL(AC_CV_NAME,
-[AC_TRY_RUN([#include <stdio.h>
-$1
-#ifdef WIN32
-#define binmode "b"
-#else
-#define binmode
-#endif
-main()
-{
-  FILE *f=fopen("conftestval", "w" binmode);
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof($2));
-  exit(0);
-}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$3],,,
-AC_CV_NAME=$3))])dnl
-AC_MSG_RESULT($AC_CV_NAME)
-AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The size of ]$2)
-undefine([AC_TYPE_NAME])dnl
-undefine([AC_CV_NAME])dnl
-])
-
-
-dnl
 dnl APR_TRY_COMPILE_NO_WARNING(INCLUDES, FUNCTION-BODY,
 dnl             [ACTIONS-IF-NO-WARNINGS], [ACTIONS-IF-WARNINGS])
 dnl

Modified: apr/apr/trunk/configure.in
URL: http://svn.apache.org/viewvc/apr/apr/trunk/configure.in?rev=1871980&r1=1871979&r2=1871980&view=diff
 ==============================================================================
--- apr/apr/trunk/configure.in (original)
+++ apr/apr/trunk/configure.in Thu Dec 26 01:18:53 2019
@@ -1725,7 +1725,7 @@ else
     socklen_t_value="int"
 fi
 
-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], pid_t, 8)
+AC_CHECK_SIZEOF(pid_t)
 
 if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_short"; then
     pid_t_fmt='#define APR_PID_T_FMT "hd"'
@@ -1797,7 +1797,7 @@ APR_CHECK_TYPES_FMT_COMPATIBLE(size_t, u
 APR_CHECK_TYPES_FMT_COMPATIBLE(size_t, unsigned int, u, [size_t_fmt="u"])
 ])
 
-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], ssize_t, 8)
+AC_CHECK_SIZEOF(ssize_t)
 
 dnl the else cases below should no longer occur;
 AC_MSG_CHECKING([which format to use for apr_ssize_t])
@@ -1815,7 +1815,7 @@ fi
 
 ssize_t_fmt="#define APR_SSIZE_T_FMT \"$ssize_t_fmt\""
 
-APR_CHECK_SIZEOF_EXTENDED([#include <stddef.h>], size_t, 8)
+AC_CHECK_SIZEOF(size_t)
 
 # else cases below should no longer occur;
 AC_MSG_CHECKING([which format to use for apr_size_t])
@@ -1833,7 +1833,7 @@ fi
 
 size_t_fmt="#define APR_SIZE_T_FMT \"$size_t_fmt\""
 
-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
+AC_CHECK_SIZEOF(off_t)
 
 if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then
     # Enable LFS
@@ -1933,7 +1933,7 @@ case $host in
     ;;
 *)
     ino_t_value=ino_t
-    APR_CHECK_SIZEOF_EXTENDED(AC_INCLUDES_DEFAULT, ino_t, $ac_cv_sizeof_long)
+    AC_CHECK_SIZEOF(ino_t)
     if test $ac_cv_sizeof_ino_t = 4; then
         if test $ac_cv_sizeof_long = 4; then
             ino_t_value="unsigned long"
@@ -1953,8 +1953,8 @@ else
     bigendian=0
 fi
 
-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>
-#include <sys/uio.h>],struct iovec,0)
+AC_CHECK_SIZEOF(struct iovec,,[AC_INCLUDES_DEFAULT
+#include <sys/uio.h>])
 if test "$ac_cv_sizeof_struct_iovec" = "0"; then
     have_iovec=0
 else


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic