From: Yann Ylavic Date: Thu, 7 Nov 2019 11:01:48 +0000 (+0000) Subject: Use latest/compatible apr_common.m4. X-Git-Tag: 2.5.0-alpha2-ci-test-only~1818 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c2523d7fc00c151f19ece753e1d39939eeadf6e;p=thirdparty%2Fapache%2Fhttpd.git Use latest/compatible apr_common.m4. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1869499 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/build/apr_common.m4 b/build/apr_common.m4 index 6b5c0f033b9..f4e2dfd0a7c 100644 --- a/build/apr_common.m4 +++ b/build/apr_common.m4 @@ -511,9 +511,9 @@ AC_DEFUN([APR_TRY_COMPILE_NO_WARNING], [int main(int argc, const char *const *argv) {] [[$2]] [ return 0; }] - )], - [$3], [$4]) - CFLAGS=$apr_save_CFLAGS + )], [CFLAGS=$apr_save_CFLAGS +$3], [CFLAGS=$apr_save_CFLAGS +$4]) ]) dnl @@ -974,12 +974,45 @@ fi AC_SUBST(MKDEP) ]) +dnl +dnl APR_CHECK_TYPES_FMT_COMPATIBLE(TYPE-1, TYPE-2, FMT-TAG, +dnl [ACTION-IF-TRUE], [ACTION-IF-FALSE]) +dnl +dnl Try to determine whether two types are the same and accept the given +dnl printf formatter (bare token, e.g. literal d, ld, etc). +dnl +AC_DEFUN([APR_CHECK_TYPES_FMT_COMPATIBLE], [ +define([apr_cvname], apr_cv_typematch_[]translit([$1], [ ], [_])_[]translit([$2], [ ], [_])_[][$3]) +AC_CACHE_CHECK([whether $1 and $2 use fmt %$3], apr_cvname, [ +APR_TRY_COMPILE_NO_WARNING([#include +#include +#ifdef HAVE_STDINT_H +#include +#endif +], [ + $1 chk1, *ptr1; + $2 chk2, *ptr2 = &chk1; + ptr1 = &chk2; + *ptr1 = *ptr2 = 0; + printf("%$3 %$3", chk1, chk2); +], [apr_cvname=yes], [apr_cvname=no])]) +if test "$apr_cvname" = "yes"; then + : + $4 +else + : + $5 +fi +]) + dnl dnl APR_CHECK_TYPES_COMPATIBLE(TYPE-1, TYPE-2, [ACTION-IF-TRUE]) dnl dnl Try to determine whether two types are the same. Only works dnl for gcc and icc. dnl +dnl @deprecated @see APR_CHECK_TYPES_FMT_COMPATIBLE +dnl AC_DEFUN([APR_CHECK_TYPES_COMPATIBLE], [ define([apr_cvname], apr_cv_typematch_[]translit([$1], [ ], [_])_[]translit([$2], [ ], [_])) AC_CACHE_CHECK([whether $1 and $2 are the same], apr_cvname, [