diff options
-rw-r--r-- | CHANGES | 4 | ||||
-rw-r--r-- | acinclude.m4 | 102 | ||||
-rw-r--r-- | include/curl/curlbuild.h.dist | 360 | ||||
-rw-r--r-- | include/curl/curlbuild.h.in | 6 | ||||
-rw-r--r-- | lib/Makefile.netware | 4 |
5 files changed, 320 insertions, 156 deletions
@@ -6,6 +6,10 @@ Changelog +Yang Tse (11 Aug 2008) +- Added missing signed and unsigned curl_off_t integer constant suffixes for + internal and external use. CURL_SUFFIX_CURL_OFF_T, CURL_SUFFIX_CURL_OFF_TU. + Daniel Fandrich (7 Aug 2008) - Fixed an uninitialized variable in multi_runsingle() that could cause a request to prematurely end. diff --git a/acinclude.m4 b/acinclude.m4 index a18f6da77..e287d4415 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -118,6 +118,64 @@ CURL_DEF_TOKEN $1 ]) +dnl CURL_SETUP_VARS_ALPHA_SETS +dnl ------------------------------------------------- +dnl Set up variables with sets of several letters. + +AC_DEFUN([CURL_SETUP_VARS_ALPHA_SETS], [ +curl_cv_letters='abcdefghijklmnopqrstuvwxyz' +curl_cv_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +curl_cv_Letters=$curl_cv_letters$curl_cv_LETTERS +curl_cv_digits='0123456789' +curl_cv_alnum=$curl_cv_Letters$curl_cv_digits +]) + + +dnl CURL_CHECK_DEF_INTXX_C (INTXX_C, [INCLUDES]) +dnl ------------------------------------------------- +dnl Use the C preprocessor to find out if the given INTXX_C function-style +dnl macro is defined and get the suffix part of its expansion. This macro +dnl will not use default includes even if no INCLUDES argument is given. + +AC_DEFUN([CURL_CHECK_DEF_INTXX_C], [ + AC_REQUIRE([CURL_SETUP_VARS_ALPHA_SETS])dnl + AS_VAR_PUSHDEF([ac_HaveDef], [curl_cv_have_def_$1])dnl + AS_VAR_PUSHDEF([ac_Def], [curl_cv_def_$1])dnl + if test -z "$SED"; then + AC_MSG_ERROR([SED not set. Cannot continue without SED being set.]) + fi + if test -z "$GREP"; then + AC_MSG_ERROR([GREP not set. Cannot continue without GREP being set.]) + fi + tmp_suf="" + AC_PREPROC_IFELSE([ + AC_LANG_SOURCE( +ifelse($2,,,[$2])[[ +#ifdef $1 +CURL_DEF_TOKEN $1(77) +#endif + ]]) + ],[ + tmp_suf=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ + "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ + "$SED" 's/.*CURL_DEF_TOKEN[[ ]]//' 2>/dev/null | \ + "$SED" 's/.*$1//' 2>/dev/null | \ + "$SED" 's/[[^$curl_cv_Letters]]//g' 2>/dev/null` + if test -z "$tmp_suf"; then + tmp_suf="" + fi + ]) + if test -z "$tmp_suf"; then + AS_VAR_SET(ac_HaveDef, no) + else + AS_VAR_SET(ac_HaveDef, yes) + AS_VAR_SET(ac_Def, $tmp_suf) + fi + AS_VAR_POPDEF([ac_Def])dnl + AS_VAR_POPDEF([ac_HaveDef])dnl +]) + + dnl CURL_CHECK_AIX_ALL_SOURCE dnl ------------------------------------------------- dnl Provides a replacement of traditional AC_AIX with @@ -3588,21 +3646,25 @@ AC_DEFUN([DO_CURL_OFF_T_CHECK], [ if test "$x_typeof" = "unknown" && test ! -z "$1"; then tmp_includes="" tmp_source="" + tmp_intxx="" tmp_fmt="" case AS_TR_SH([$1]) in int64_t) tmp_includes="$curl_includes_inttypes" tmp_source="char f@<:@@:>@ = PRId64;" + tmp_intxx="INT64_C" tmp_fmt="PRId64" ;; int32_t) tmp_includes="$curl_includes_inttypes" tmp_source="char f@<:@@:>@ = PRId32;" + tmp_intxx="INT32_C" tmp_fmt="PRId32" ;; int16_t) tmp_includes="$curl_includes_inttypes" tmp_source="char f@<:@@:>@ = PRId16;" + tmp_intxx="INT16_C" tmp_fmt="PRId16" ;; esac @@ -3621,15 +3683,22 @@ AC_DEFUN([DO_CURL_OFF_T_CHECK], [ x_sizeof="$2" else CURL_CHECK_DEF([$tmp_fmt], [$curl_includes_inttypes], [silent]) - AS_VAR_PUSHDEF([tmp_HaveDef], [curl_cv_have_def_$tmp_fmt])dnl - AS_VAR_PUSHDEF([tmp_Def], [curl_cv_def_$tmp_fmt])dnl - if test AS_VAR_GET(tmp_HaveDef) = "yes"; then - x_format=AS_VAR_GET(tmp_Def) + CURL_CHECK_DEF_INTXX_C([$tmp_intxx], [$curl_includes_inttypes]) + AS_VAR_PUSHDEF([tmp_HaveFmtDef], [curl_cv_have_def_$tmp_fmt])dnl + AS_VAR_PUSHDEF([tmp_FmtDef], [curl_cv_def_$tmp_fmt])dnl + AS_VAR_PUSHDEF([tmp_HaveSufDef], [curl_cv_have_def_$tmp_intxx])dnl + AS_VAR_PUSHDEF([tmp_SufDef], [curl_cv_def_$tmp_intxx])dnl + if test AS_VAR_GET(tmp_HaveFmtDef) = "yes" && + test AS_VAR_GET(tmp_HaveSufDef) = "yes"; then + x_format=AS_VAR_GET(tmp_FmtDef) + x_suffix=AS_VAR_GET(tmp_SufDef) x_typeof="$1" x_sizeof="$2" fi - AS_VAR_POPDEF([tmp_Def])dnl - AS_VAR_POPDEF([tmp_HaveDef])dnl + AS_VAR_POPDEF([tmp_SufDef])dnl + AS_VAR_POPDEF([tmp_HaveSufDef])dnl + AS_VAR_POPDEF([tmp_FmtDef])dnl + AS_VAR_POPDEF([tmp_HaveFmtDef])dnl fi ]) fi @@ -3686,6 +3755,8 @@ AC_DEFUN([CURL_CONFIGURE_CURL_OFF_T], [ x_sizeof="unknown" x_format="unknown" u_format="unknown" + x_suffix="unknown" + u_suffix="unknown" # if test "$x_typeof" = "unknown"; then AC_MSG_CHECKING([for 64-bit curl_off_t data type]) @@ -3736,32 +3807,45 @@ AC_DEFUN([CURL_CONFIGURE_CURL_OFF_T], [ u_format=`echo "$x_format" | "$SED" 's/i$/u/'` u_format=`echo "$u_format" | "$SED" 's/d$/u/'` u_format=`echo "$u_format" | "$SED" 's/D$/U/'` + u_suffix=`echo "$x_suffix" | "$SED" 's/^/U/'` else x_pull_headers="no" case AS_TR_SH([$x_typeof]) in long_long | __longlong | __longlong_t) x_format="lld" u_format="llu" + x_suffix="LL" + u_suffix="ULL" ;; long) x_format="ld" u_format="lu" + x_suffix="L" + u_suffix="UL" ;; int) x_format="d" u_format="u" + x_suffix="" + u_suffix="" ;; __int64) x_format="I64d" u_format="I64u" + x_suffix="i64" + u_suffix="ui64" ;; __int32) x_format="I32d" u_format="I32u" + x_suffix="i32" + u_suffix="ui32" ;; __int16) x_format="I16d" u_format="I16u" + x_suffix="i16" + u_suffix="ui16" ;; *) AC_MSG_ERROR([cannot find print format string for curl_off_t.]) @@ -3772,6 +3856,10 @@ AC_DEFUN([CURL_CONFIGURE_CURL_OFF_T], [ # AC_MSG_CHECKING([formatting string directive for unsigned curl_off_t]) AC_MSG_RESULT(["$u_format"]) + AC_MSG_CHECKING([constant suffix string for curl_off_t]) + AC_MSG_RESULT([$x_suffix]) + AC_MSG_CHECKING([constant suffix string for unsigned curl_off_t]) + AC_MSG_RESULT([$u_suffix]) # if test "$x_pull_headers" = "yes"; then if test "x$ac_cv_header_sys_types_h" = "xyes"; then @@ -3790,6 +3878,8 @@ AC_DEFUN([CURL_CONFIGURE_CURL_OFF_T], [ CURL_DEFINE_UNQUOTED([CURL_FMT_OFF_TU], ["$u_format"]) CURL_DEFINE_UNQUOTED([CURL_FORMAT_OFF_T], ["%$x_format"]) CURL_DEFINE_UNQUOTED([CURL_SIZEOF_CURL_OFF_T], [$x_sizeof]) + CURL_DEFINE_UNQUOTED([CURL_SUFFIX_CURL_OFF_T], [$x_suffix]) + CURL_DEFINE_UNQUOTED([CURL_SUFFIX_CURL_OFF_TU], [$u_suffix]) # ]) diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist index 07b8abea7..e622e5bac 100644 --- a/include/curl/curlbuild.h.dist +++ b/include/curl/curlbuild.h.dist @@ -139,209 +139,265 @@ /* ================================================================ */ #if defined(__DJGPP__) -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL #elif defined(__SALFORDC__) -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL #elif defined(__BORLANDC__) # if (__BORLANDC__ < 0x520) -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL # else -# define CURL_OFF_T __int64 -# define CURL_FMT_OFF_T "I64d" -# define CURL_FMT_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T __int64 +# define CURL_FMT_OFF_T "I64d" +# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 # endif #elif defined(__TURBOC__) -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL #elif defined(__WATCOMC__) # if defined(__386__) -# define CURL_OFF_T __int64 -# define CURL_FMT_OFF_T "I64d" -# define CURL_FMT_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T __int64 +# define CURL_FMT_OFF_T "I64d" +# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 # else -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL # endif #elif defined(__POCC__) # if (__POCC__ < 280) -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL # elif defined(_MSC_VER) -# define CURL_OFF_T __int64 -# define CURL_FMT_OFF_T "I64d" -# define CURL_FMT_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T __int64 +# define CURL_FMT_OFF_T "I64d" +# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 # else -# define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU uLL # endif #elif defined(__LCC__) -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL #elif defined(__SYMBIAN32__) # if defined(__GCC32__) -# define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU uLL # elif defined(__CW32__) # pragma longlong on -# define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU uLL # elif defined(__VC32__) -# define CURL_OFF_T __int64 -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T __int64 +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU uLL # endif #elif defined(__MWERKS__) -# define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU uLL #elif defined(_WIN32_WCE) -# define CURL_OFF_T __int64 -# define CURL_FMT_OFF_T "I64d" -# define CURL_FMT_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T __int64 +# define CURL_FMT_OFF_T "I64d" +# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 #elif defined(__MINGW32__) -# define CURL_OFF_T long long -# define CURL_FMT_OFF_T "I64d" -# define CURL_FMT_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "I64d" +# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 #elif defined(_MSC_VER) # if (_MSC_VER >= 900) -# define CURL_OFF_T __int64 -# define CURL_FMT_OFF_T "I64d" -# define CURL_FMT_OFF_TU "I64u" -# define CURL_FORMAT_OFF_T "%I64d" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T __int64 +# define CURL_FMT_OFF_T "I64d" +# define CURL_FMT_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 # else -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL # endif #elif defined(__VMS) # if defined(__alpha) || defined(__ia64) -# define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU uLL # else -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL # endif #elif defined(__OS400__) # if defined(__ILEC400__) -# define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU uLL # endif #elif defined(__MVS__) # if defined(__IBMC__) || defined(__IBMCPP__) # if defined(_LONG_LONG) -# define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU uLL # elif defined(_LP64) -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL # else -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL # endif # endif #elif defined(__370__) # if defined(__IBMC__) || defined(__IBMCPP__) # if defined(_LONG_LONG) -# define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU uLL # elif defined(_LP64) -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL # else -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL # endif # endif @@ -351,17 +407,21 @@ #elif defined(__GNUC__) # if defined(__i386__) -# define CURL_OFF_T long long -# define CURL_FMT_OFF_T "lld" -# define CURL_FMT_OFF_TU "llu" -# define CURL_FORMAT_OFF_T "%lld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long long +# define CURL_FMT_OFF_T "lld" +# define CURL_FMT_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU uLL # elif defined(__x86_64__) -# define CURL_OFF_T long -# define CURL_FMT_OFF_T "ld" -# define CURL_FMT_OFF_TU "lu" -# define CURL_FORMAT_OFF_T "%ld" -# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_OFF_T long +# define CURL_FMT_OFF_T "ld" +# define CURL_FMT_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU uL # endif #else diff --git a/include/curl/curlbuild.h.in b/include/curl/curlbuild.h.in index cc4d77eb8..7ed27f7a7 100644 --- a/include/curl/curlbuild.h.in +++ b/include/curl/curlbuild.h.in @@ -126,4 +126,10 @@ typedef CURL_OFF_T curl_off_t; /* The expected size of curl_off_t, as to be computed by sizeof. */ #undef CURL_SIZEOF_CURL_OFF_T +/* curl_off_t constant suffix. */ +#undef CURL_SUFFIX_CURL_OFF_T + +/* unsigned curl_off_t constant suffix. */ +#undef CURL_SUFFIX_CURL_OFF_TU + #endif /* __CURL_CURLBUILD_H */ diff --git a/lib/Makefile.netware b/lib/Makefile.netware index 98876ca5e..9eea9b166 100644 --- a/lib/Makefile.netware +++ b/lib/Makefile.netware @@ -598,12 +598,16 @@ ifeq ($(LIBARCH),LIBC) @echo $(DL)#define CURL_FMT_OFF_TU "llu"$(DL) >> $@ @echo $(DL)#define CURL_FORMAT_OFF_T "%lld"$(DL) >> $@ @echo $(DL)#define CURL_SIZEOF_CURL_OFF_T 8$(DL) >> $@ + @echo $(DL)#define CURL_SUFFIX_CURL_OFF_T LL$(DL) >> $@ + @echo $(DL)#define CURL_SUFFIX_CURL_OFF_TU ULL$(DL) >> $@ else @echo $(DL)#define CURL_OFF_T long$(DL) >> $@ @echo $(DL)#define CURL_FMT_OFF_T "ld"$(DL) >> $@ @echo $(DL)#define CURL_FMT_OFF_TU "lu"$(DL) >> $@ @echo $(DL)#define CURL_FORMAT_OFF_T "%ld"$(DL) >> $@ @echo $(DL)#define CURL_SIZEOF_CURL_OFF_T 4$(DL) >> $@ + @echo $(DL)#define CURL_SUFFIX_CURL_OFF_T L$(DL) >> $@ + @echo $(DL)#define CURL_SUFFIX_CURL_OFF_TU UL$(DL) >> $@ endif @echo $(DL)typedef CURL_OFF_T curl_off_t;$(DL) >> $@ @echo $(DL)#endif /* __CURL_CURLBUILD_H */$(DL) >> $@ |