diff options
author | Jeff Trawick <trawick@apache.org> | 2000-12-01 21:33:58 +0000 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2000-12-01 21:33:58 +0000 |
commit | 68e6e48a1c8fcfce0174d25bd01c93e192a75bf0 (patch) | |
tree | 52fb660965694c6d14cc710ac829922b0f2e9c56 | |
parent | c259c6e945472fe2ec31b823d88edb946e89f812 (diff) | |
download | apr-68e6e48a1c8fcfce0174d25bd01c93e192a75bf0.tar.gz |
Add APR_SIZE_T_FMT to help work around the fact that apr_size_t/
apr_ssize_t is long on AIX. Get the other APR_xx_T_FMT variables
defined properly on AIX.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60840 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | acconfig.h | 1 | ||||
-rw-r--r-- | configure.in | 25 | ||||
-rw-r--r-- | include/apr.h.in | 3 |
4 files changed, 28 insertions, 4 deletions
@@ -1,4 +1,7 @@ Changes with APR a9 + *) Add APR_SIZE_T_FMT. Get the other APR_xx_T_FMT variables + defined properly on AIX. [Jeff Trawick] + *) network API changes: get rid of apr_get_socket_inaddr(), apr_get_remote_name(), and apr_get_local_name() [Jeff Trawick] diff --git a/acconfig.h b/acconfig.h index e0d77f038..f3adb4157 100644 --- a/acconfig.h +++ b/acconfig.h @@ -29,6 +29,7 @@ #undef USE_THREADS #undef SIZEOF_SSIZE_T +#undef SIZEOF_SIZE_T #undef SIZEOF_OFF_T #undef HAVE_MM_SHMT_MMFILE diff --git a/configure.in b/configure.in index c27257d19..bc77123bd 100644 --- a/configure.in +++ b/configure.in @@ -409,6 +409,16 @@ else ssize_t_fmt='#error Can not determine the proper size for ssize_t' fi +AC_CHECK_SIZEOF_EXTENDED([#include <stddef.h>], size_t, 8) + +if test "$ac_cv_sizeof_size_t" = "$ac_cv_sizeof_int"; then + size_t_fmt='#define APR_SIZE_T_FMT "d"' +elif test "$ac_cv_sizeof_size_t" = "$ac_cv_sizeof_long"; then + size_t_fmt='#define APR_SIZE_T_FMT "ld"' +else + size_t_fmt='#error Can not determine the proper size for size_t' +fi + AC_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8) if test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_int"; then @@ -421,13 +431,19 @@ else off_t_fmt='#error Can not determine the proper size for off_t' fi -# basically, we have tried to figure out the sizes of apr_ssize_t and -# apr_off_t, but we don't always get it right. If you find that we -# don't get it right for your platform, you can override our decision -# below. +# 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, +# you can override our decision below. case "$OS" in *linux* | *os2_emx | *-solaris*) off_t_fmt='#define APR_OFF_T_FMT "ld"' + ;; + *aix4*) + ssize_t_fmt='#define APR_SSIZE_T_FMT "ld"' + size_t_fmt='#define APR_SIZE_T_FMT "ld"' + off_t_fmt='#define APR_OFF_T_FMT "ld"' + ;; esac AC_SUBST(short_value) @@ -438,6 +454,7 @@ AC_SUBST(size_t_value) AC_SUBST(ssize_t_value) AC_SUBST(socklen_t_value) AC_SUBST(ssize_t_fmt) +AC_SUBST(size_t_fmt) AC_SUBST(off_t_fmt) dnl #----------------------------- Checking for string functions diff --git a/include/apr.h.in b/include/apr.h.in index 0fcebb2a8..1106dbdc7 100644 --- a/include/apr.h.in +++ b/include/apr.h.in @@ -183,6 +183,9 @@ typedef @socklen_t_value@ apr_socklen_t; */ @ssize_t_fmt@ +/* And APR_SIZE_T_FMT */ +@size_t_fmt@ + /* And APR_OFF_T_FMT */ @off_t_fmt@ |