From: Timo Sirainen Date: Tue, 15 Jul 2003 20:24:21 +0000 (+0300) Subject: Get the size_t type properly in OSX X-Git-Tag: 1.1.alpha1~4480 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72a79a12473a06617ef823a8adffcd2e2c613016;p=thirdparty%2Fdovecot%2Fcore.git Get the size_t type properly in OSX --HG-- branch : HEAD --- diff --git a/configure.in b/configure.in index 34b1c559e1..8d69ff0ce3 100644 --- a/configure.in +++ b/configure.in @@ -428,13 +428,16 @@ AC_TRY_RUN([ AC_MSG_RESULT(no) ]) -AC_TYPEOF(ssize_t) -case "$typeof_ssize_t" in - long) +dnl Note: we check size_t rather than ssize_t here, because on OSX 10.2 +dnl ssize_t = int and size_t = unsigned long. We're mostly concerned about +dnl printf format here, so check the size_t one. +AC_TYPEOF(size_t, unsigned-int unsigned-long unsigned-long-long) +case "$typeof_size_t" in + "unsigned long") ssizet_max=LONG_MAX sizet_fmt="lu" ;; - "long long") + "unsigned long long") ssizet_max=LLONG_MAX sizet_fmt="llu" ;; @@ -443,7 +446,7 @@ case "$typeof_ssize_t" in ssizet_max=INT_MAX sizet_fmt="u" - if test "$typeof_ssize_t" = ""; then + if test "$typeof_size_t" = ""; then AC_DEFINE(size_t, unsigned int, Define to 'unsigned int' if you don't have it) AC_DEFINE(ssize_t, int, Define to 'int' if you don't have it) fi