summaryrefslogtreecommitdiff
path: root/lib/curl_setup.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-01-01 22:11:13 +1300
committerDaniel Stenberg <daniel@haxx.se>2018-01-08 23:45:09 +1300
commita8ce5efba92a87ee57ae2241a9af4083cbad9049 (patch)
treebe8c59fb7f603ac768dea6308aa437e10f998ce1 /lib/curl_setup.h
parentd4e40f0690befff7e4668f69850674f29a0c453b (diff)
downloadcurl-a8ce5efba92a87ee57ae2241a9af4083cbad9049.tar.gz
progress: calculate transfer speed on milliseconds if possible
to increase accuracy for quick transfers Fixes #2200 Closes #2206
Diffstat (limited to 'lib/curl_setup.h')
-rw-r--r--lib/curl_setup.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/curl_setup.h b/lib/curl_setup.h
index 25a7b4c54..609ee9ead 100644
--- a/lib/curl_setup.h
+++ b/lib/curl_setup.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -416,6 +416,14 @@
# endif
#endif
+#if (SIZEOF_CURL_OFF_T == 4)
+# define CURL_OFF_T_MAX CURL_OFF_T_C(0x7FFFFFFF)
+#else
+ /* assume CURL_SIZEOF_CURL_OFF_T == 8 */
+# define CURL_OFF_T_MAX CURL_OFF_T_C(0x7FFFFFFFFFFFFFFF)
+#endif
+#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - CURL_OFF_T_C(1))
+
/*
* Arg 2 type for gethostname in case it hasn't been defined in config file.
*/