From 7dd67c8fa2a72f9814c1f78f87d6c779cef89f9e Mon Sep 17 00:00:00 2001 From: bojan Date: Fri, 8 Aug 2008 20:57:57 +0000 Subject: Backport r683771 from the trunk. Fix APR_PID_T_FMT detection on Solaris. Patch by Rainer Jung . PR 45513. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@684091 13f79535-47bb-0310-9956-ffa450edef68 --- configure.in | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/configure.in b/configure.in index 1b688bcf3..46b4b32a4 100644 --- a/configure.in +++ b/configure.in @@ -1345,6 +1345,20 @@ else socklen_t_value="int" fi +APR_CHECK_SIZEOF_EXTENDED([#include ], pid_t, 8) + +if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_short"; then + pid_t_fmt='#define APR_PID_T_FMT "hd"' +elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_int"; then + pid_t_fmt='#define APR_PID_T_FMT "d"' +elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_long"; then + pid_t_fmt='#define APR_PID_T_FMT "ld"' +elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_long_long"; then + pid_t_fmt='#define APR_PID_T_FMT APR_INT64_T_FMT' +else + pid_t_fmt='#error Can not determine the proper size for pid_t' +fi + # Basically, we have tried to figure out the correct format strings # for APR types which vary between platforms, but we don't always get # it right. @@ -1360,9 +1374,9 @@ case $host in ;; *-solaris*) if test "$ac_cv_sizeof_long" = "8"; then - pid_t_fmt="d" + pid_t_fmt='#define APR_PID_T_FMT "d"' else - pid_t_fmt="ld" + pid_t_fmt='#define APR_PID_T_FMT "ld"' fi ;; *aix4*|*aix5*) @@ -1496,20 +1510,6 @@ if test "$ac_cv_sizeof_long" = "4"; then fi AC_MSG_NOTICE([using $ino_t_value for ino_t]) -APR_CHECK_SIZEOF_EXTENDED([#include ], pid_t, 8) - -if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_short"; then - pid_t_fmt='#define APR_PID_T_FMT "hd"' -elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_int"; then - pid_t_fmt='#define APR_PID_T_FMT "d"' -elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_long"; then - pid_t_fmt='#define APR_PID_T_FMT "ld"' -elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_long_long"; then - pid_t_fmt='#define APR_PID_T_FMT APR_INT64_T_FMT' -else - pid_t_fmt='#error Can not determine the proper size for pid_t' -fi - # Checks for endianness AC_C_BIGENDIAN if test $ac_cv_c_bigendian = yes; then -- cgit v1.2.1