diff options
-rw-r--r-- | acconfig.h | 1 | ||||
-rw-r--r-- | configure.in | 13 | ||||
-rw-r--r-- | include/apr.h.in | 3 | ||||
-rw-r--r-- | include/apr.hw | 4 |
4 files changed, 20 insertions, 1 deletions
diff --git a/acconfig.h b/acconfig.h index 98e0154b3..3ff72d90c 100644 --- a/acconfig.h +++ b/acconfig.h @@ -31,6 +31,7 @@ #undef SIZEOF_SSIZE_T #undef SIZEOF_SIZE_T #undef SIZEOF_OFF_T +#undef SIZEOF_PID_T #undef HAVE_MM_SHMT_MMFILE diff --git a/configure.in b/configure.in index 47f9fd312..2a58f1efa 100644 --- a/configure.in +++ b/configure.in @@ -603,6 +603,18 @@ else off_t_fmt='#error Can not determine the proper size for off_t' fi +APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], pid_t, 8) + +if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_int"; then + os_proc_t_fmt='#define APR_OS_PROC_T_FMT "d"' +elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_long"; then + os_proc_t_fmt='#define APR_OS_PROC_T_FMT "ld"' +elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_long_long"; then + os_proc_t_fmt='#define APR_OS_PROC_T_FMT "qd"' +else + os_proc_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. If you find that we don't get it right for your platform, @@ -632,6 +644,7 @@ AC_SUBST(socklen_t_value) AC_SUBST(ssize_t_fmt) AC_SUBST(size_t_fmt) AC_SUBST(off_t_fmt) +AC_SUBST(os_proc_t_fmt) dnl #----------------------------- Checking for string functions AC_CHECK_FUNCS(strnicmp, have_strnicmp="1", have_strnicmp="0") diff --git a/include/apr.h.in b/include/apr.h.in index 46983f239..cef1f4c6f 100644 --- a/include/apr.h.in +++ b/include/apr.h.in @@ -218,6 +218,9 @@ typedef @socklen_t_value@ apr_socklen_t; /* And APR_OFF_T_FMT */ @off_t_fmt@ +/* And APR_OS_PROC_T_FMT */ +@os_proc_t_fmt@ + /* Local machine definition for console and log output. */ #define APR_EOL_STR "@eolstr@" diff --git a/include/apr.hw b/include/apr.hw index e5cc8589f..31ec6d3a9 100644 --- a/include/apr.hw +++ b/include/apr.hw @@ -280,10 +280,12 @@ typedef int gid_t; #define APR_SSIZE_T_FMT "d" -#define APR_SIZE_T_FMT "d" +#define APR_SIZE_T_FMT "d" #define APR_OFF_T_FMT "ld" +#define APR_OS_PROC_T_FMT "d" + /* Local machine definition for console and log output. */ #define APR_EOL_STR "\r\n" |