])
+dnl CURL_INCLUDES_INTTYPES
+dnl -------------------------------------------------
+dnl Set up variable with list of headers that must be
+dnl included when inttypes.h is to be included.
+
+AC_DEFUN([CURL_INCLUDES_INTTYPES], [
+curl_includes_inttypes="\
+/* includes start */
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+/* includes end */"
+ AC_CHECK_HEADERS(
+ sys/types.h stdint.h inttypes.h,
+ [], [], [$curl_includes_inttypes])
+])
+
+
dnl CURL_CONFIGURE_LONG
dnl -------------------------------------------------
dnl Find out the size of long as reported by sizeof() and define
dnl must be recorded in curlbuild.h
AC_DEFUN([CURL_CONFIGURE_LONG], [
+ AC_REQUIRE([CURL_INCLUDES_INTTYPES])dnl
if test ! -z "$ac_cv_sizeof_long"; then
AC_MSG_WARN([Use CURL-CONFIGURE-LONG to check the size of long first])
fi
if test "$curl_sizeof_long" = "unknown"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
+ $curl_includes_inttypes
typedef char dummy_arr[sizeof(long) == $tmp_size ? 1 : -1];
]],[[
dummy_arr[1] = (long)1;
])
-dnl CURL_INCLUDES_INTTYPES
-dnl -------------------------------------------------
-dnl Set up variable with list of headers that must be
-dnl included when inttypes.h is to be included.
-
-AC_DEFUN([CURL_INCLUDES_INTTYPES], [
-curl_includes_inttypes="\
-/* includes start */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-/* includes end */"
- AC_CHECK_HEADERS(
- sys/types.h stdint.h inttypes.h,
- [], [], [$curl_includes_inttypes])
-])
-
-
dnl DO_CURL_OFF_T_CHECK (TYPE, SIZE)
dnl -------------------------------------------------
dnl Internal macro for CURL_CONFIGURE_CURL_OFF_T