summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-08-12 15:54:06 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-08-17 10:26:53 +0200
commit80d9e35598d5e6029dc4c90bf3da885682936d2a (patch)
tree952d270ac713d7b9373d6020976a9dd9c0dbc421 /acinclude.m4
parentc95eff4a11575a5973fad20619ff7ca3989316db (diff)
downloadcurl-80d9e35598d5e6029dc4c90bf3da885682936d2a.tar.gz
system.h: remove all CURL_SIZEOF_* defines
... as they're not used externally and internally we check for the sizes already in configure etc. Closes #1767
Diffstat (limited to 'acinclude.m4')
-rwxr-xr-xacinclude.m4285
1 files changed, 0 insertions, 285 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index dd5d896bc..957b9202f 100755
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2718,291 +2718,6 @@ AC_HELP_STRING([--without-ca-fallback], [Don't use the built in CA store of the
fi
])
-
-dnl DO_CURL_OFF_T_CHECK (TYPE, SIZE)
-dnl -------------------------------------------------
-dnl Internal macro for CURL_CONFIGURE_CURL_OFF_T
-
-AC_DEFUN([DO_CURL_OFF_T_CHECK], [
- AC_REQUIRE([CURL_INCLUDES_INTTYPES])dnl
- if test "$curl_typeof_curl_off_t" = "unknown" && test ! -z "$1"; then
- tmp_includes=""
- tmp_source=""
- tmp_fmt=""
- case XC_SH_TR_SH([$1]) in
- int64_t)
- tmp_includes="$curl_includes_inttypes"
- tmp_source="char f@<:@@:>@ = PRId64;"
- tmp_fmt="PRId64"
- ;;
- int32_t)
- tmp_includes="$curl_includes_inttypes"
- tmp_source="char f@<:@@:>@ = PRId32;"
- tmp_fmt="PRId32"
- ;;
- int16_t)
- tmp_includes="$curl_includes_inttypes"
- tmp_source="char f@<:@@:>@ = PRId16;"
- tmp_fmt="PRId16"
- ;;
- esac
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
- $tmp_includes
- typedef $1 curl_off_t;
- typedef char dummy_arr[sizeof(curl_off_t) == $2 ? 1 : -1];
- ]],[[
- $tmp_source
- curl_off_t dummy;
- ]])
- ],[
- if test -z "$tmp_fmt"; then
- curl_typeof_curl_off_t="$1"
- curl_sizeof_curl_off_t="$2"
- else
- CURL_CHECK_DEF([$tmp_fmt], [$curl_includes_inttypes], [silent])
- AS_VAR_PUSHDEF([tmp_HaveFmtDef], [curl_cv_have_def_$tmp_fmt])dnl
- AS_VAR_PUSHDEF([tmp_FmtDef], [curl_cv_def_$tmp_fmt])dnl
- if test AS_VAR_GET(tmp_HaveFmtDef) = "yes"; then
- curl_format_curl_off_t=AS_VAR_GET(tmp_FmtDef)
- curl_typeof_curl_off_t="$1"
- curl_sizeof_curl_off_t="$2"
- fi
- AS_VAR_POPDEF([tmp_FmtDef])dnl
- AS_VAR_POPDEF([tmp_HaveFmtDef])dnl
- fi
- ])
- fi
-])
-
-
-dnl DO_CURL_OFF_T_SUFFIX_CHECK (TYPE)
-dnl -------------------------------------------------
-dnl Internal macro for CURL_CONFIGURE_CURL_OFF_T
-
-AC_DEFUN([DO_CURL_OFF_T_SUFFIX_CHECK], [
- AC_REQUIRE([CURL_INCLUDES_INTTYPES])dnl
- AC_MSG_CHECKING([constant suffix string for curl_off_t])
- #
- curl_suffix_curl_off_t="unknown"
- curl_suffix_curl_off_tu="unknown"
- #
- case XC_SH_TR_SH([$1]) in
- long_long | __longlong | __longlong_t)
- tst_suffixes="LL::"
- ;;
- long)
- tst_suffixes="L::"
- ;;
- int)
- tst_suffixes="::"
- ;;
- __int64 | int64_t)
- tst_suffixes="LL:i64::"
- ;;
- __int32 | int32_t)
- tst_suffixes="L:i32::"
- ;;
- __int16 | int16_t)
- tst_suffixes="L:i16::"
- ;;
- *)
- AC_MSG_ERROR([unexpected data type $1])
- ;;
- esac
- #
- old_IFS=$IFS; IFS=':'
- for tmp_ssuf in $tst_suffixes ; do
- IFS=$old_IFS
- if test "x$curl_suffix_curl_off_t" = "xunknown"; then
- case $tmp_ssuf in
- i64 | i32 | i16)
- tmp_usuf="u$tmp_ssuf"
- ;;
- LL | L)
- tmp_usuf="U$tmp_ssuf"
- ;;
- *)
- tmp_usuf=""
- ;;
- esac
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
- $curl_includes_inttypes
- typedef $1 new_t;
- ]],[[
- new_t s1;
- new_t s2;
- s1 = -10$tmp_ssuf ;
- s2 = 20$tmp_ssuf ;
- if(s1 > s2)
- return 1;
- ]])
- ],[
- curl_suffix_curl_off_t="$tmp_ssuf"
- curl_suffix_curl_off_tu="$tmp_usuf"
- ])
- fi
- done
- IFS=$old_IFS
- #
- if test "x$curl_suffix_curl_off_t" = "xunknown"; then
- AC_MSG_ERROR([cannot find constant suffix string for curl_off_t.])
- else
- AC_MSG_RESULT([$curl_suffix_curl_off_t])
- AC_MSG_CHECKING([constant suffix string for unsigned curl_off_t])
- AC_MSG_RESULT([$curl_suffix_curl_off_tu])
- fi
- #
-])
-
-
-dnl CURL_CONFIGURE_CURL_OFF_T
-dnl -------------------------------------------------
-dnl Find out suitable curl_off_t data type definition and associated
-dnl items
-
-AC_DEFUN([CURL_CONFIGURE_CURL_OFF_T], [
- AC_REQUIRE([CURL_INCLUDES_INTTYPES])dnl
- #
- AC_BEFORE([$0],[AC_SYS_LARGEFILE])dnl
- AC_BEFORE([$0],[CURL_CONFIGURE_REENTRANT])dnl
- AC_BEFORE([$0],[CURL_CHECK_AIX_ALL_SOURCE])dnl
- #
- if test -z "$SED"; then
- AC_MSG_ERROR([SED not set. Cannot continue without SED being set.])
- fi
- #
- AC_CHECK_SIZEOF(long)
- AC_CHECK_SIZEOF(void*)
- #
- if test -z "$ac_cv_sizeof_long" ||
- test "$ac_cv_sizeof_long" -eq "0"; then
- AC_MSG_ERROR([cannot find out size of long.])
- fi
- if test -z "$ac_cv_sizeof_voidp" ||
- test "$ac_cv_sizeof_voidp" -eq "0"; then
- AC_MSG_ERROR([cannot find out size of void*.])
- fi
- #
- x_LP64_long=""
- x_LP32_long=""
- #
- if test "$ac_cv_sizeof_long" -eq "8" &&
- test "$ac_cv_sizeof_voidp" -ge "8"; then
- x_LP64_long="long"
- elif test "$ac_cv_sizeof_long" -eq "4" &&
- test "$ac_cv_sizeof_voidp" -ge "4"; then
- x_LP32_long="long"
- fi
- #
- dnl DO_CURL_OFF_T_CHECK results are stored in next 3 vars
- #
- curl_typeof_curl_off_t="unknown"
- curl_sizeof_curl_off_t="unknown"
- curl_format_curl_off_t="unknown"
- curl_format_curl_off_tu="unknown"
- #
- if test "$curl_typeof_curl_off_t" = "unknown"; then
- AC_MSG_CHECKING([for 64-bit curl_off_t data type])
- for t8 in \
- "$x_LP64_long" \
- 'int64_t' \
- '__int64' \
- 'long long' \
- '__longlong' \
- '__longlong_t' ; do
- DO_CURL_OFF_T_CHECK([$t8], [8])
- done
- AC_MSG_RESULT([$curl_typeof_curl_off_t])
- fi
- if test "$curl_typeof_curl_off_t" = "unknown"; then
- AC_MSG_CHECKING([for 32-bit curl_off_t data type])
- for t4 in \
- "$x_LP32_long" \
- 'int32_t' \
- '__int32' \
- 'int' ; do
- DO_CURL_OFF_T_CHECK([$t4], [4])
- done
- AC_MSG_RESULT([$curl_typeof_curl_off_t])
- fi
- if test "$curl_typeof_curl_off_t" = "unknown"; then
- AC_MSG_ERROR([cannot find data type for curl_off_t.])
- fi
- #
- AC_MSG_CHECKING([size of curl_off_t])
- AC_MSG_RESULT([$curl_sizeof_curl_off_t])
- #
- AC_MSG_CHECKING([formatting string directive for curl_off_t])
- if test "$curl_format_curl_off_t" != "unknown"; then
- x_pull_headers="yes"
- curl_format_curl_off_t=`echo "$curl_format_curl_off_t" | "$SED" 's/[["]]//g'`
- curl_format_curl_off_tu=`echo "$curl_format_curl_off_t" | "$SED" 's/i$/u/'`
- curl_format_curl_off_tu=`echo "$curl_format_curl_off_tu" | "$SED" 's/d$/u/'`
- curl_format_curl_off_tu=`echo "$curl_format_curl_off_tu" | "$SED" 's/D$/U/'`
- else
- x_pull_headers="no"
- case XC_SH_TR_SH([$curl_typeof_curl_off_t]) in
- long_long | __longlong | __longlong_t)
- curl_format_curl_off_t="lld"
- curl_format_curl_off_tu="llu"
- ;;
- long)
- curl_format_curl_off_t="ld"
- curl_format_curl_off_tu="lu"
- ;;
- int)
- curl_format_curl_off_t="d"
- curl_format_curl_off_tu="u"
- ;;
- __int64)
- curl_format_curl_off_t="I64d"
- curl_format_curl_off_tu="I64u"
- ;;
- __int32)
- curl_format_curl_off_t="I32d"
- curl_format_curl_off_tu="I32u"
- ;;
- __int16)
- curl_format_curl_off_t="I16d"
- curl_format_curl_off_tu="I16u"
- ;;
- *)
- AC_MSG_ERROR([cannot find print format string for curl_off_t.])
- ;;
- esac
- fi
- AC_MSG_RESULT(["$curl_format_curl_off_t"])
- #
- AC_MSG_CHECKING([formatting string directive for unsigned curl_off_t])
- AC_MSG_RESULT(["$curl_format_curl_off_tu"])
- #
- DO_CURL_OFF_T_SUFFIX_CHECK([$curl_typeof_curl_off_t])
- #
- if test "$x_pull_headers" = "yes"; then
- if test "x$ac_cv_header_sys_types_h" = "xyes"; then
- CURL_DEFINE_UNQUOTED([CURL_PULL_SYS_TYPES_H])
- fi
- if test "x$ac_cv_header_stdint_h" = "xyes"; then
- CURL_DEFINE_UNQUOTED([CURL_PULL_STDINT_H])
- fi
- if test "x$ac_cv_header_inttypes_h" = "xyes"; then
- CURL_DEFINE_UNQUOTED([CURL_PULL_INTTYPES_H])
- fi
- fi
- #
- CURL_DEFINE_UNQUOTED([CURL_TYPEOF_CURL_OFF_T], [$curl_typeof_curl_off_t])
- CURL_DEFINE_UNQUOTED([CURL_FORMAT_CURL_OFF_T], ["$curl_format_curl_off_t"])
- CURL_DEFINE_UNQUOTED([CURL_FORMAT_CURL_OFF_TU], ["$curl_format_curl_off_tu"])
- CURL_DEFINE_UNQUOTED([CURL_FORMAT_OFF_T], ["%$curl_format_curl_off_t"])
- CURL_DEFINE_UNQUOTED([CURL_SIZEOF_CURL_OFF_T], [$curl_sizeof_curl_off_t])
- CURL_DEFINE_UNQUOTED([CURL_SUFFIX_CURL_OFF_T], [$curl_suffix_curl_off_t])
- CURL_DEFINE_UNQUOTED([CURL_SUFFIX_CURL_OFF_TU], [$curl_suffix_curl_off_tu])
- #
-])
-
-
dnl CURL_CHECK_WIN32_LARGEFILE
dnl -------------------------------------------------
dnl Check if curl's WIN32 large file will be used