diff options
author | Curl Upstream <curl-library@cool.haxx.se> | 2018-05-15 14:43:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-05-18 14:16:12 (GMT) |
commit | d431136e029c652f5913bcebeaab3b9236b114c4 (patch) | |
tree | c0838b4432a3786a323c94a680bb16f644198311 /lib/getinfo.c | |
parent | af9e654045f11028e50dac4781e297834129a749 (diff) | |
download | CMake-d431136e029c652f5913bcebeaab3b9236b114c4.zip CMake-d431136e029c652f5913bcebeaab3b9236b114c4.tar.gz CMake-d431136e029c652f5913bcebeaab3b9236b114c4.tar.bz2 |
curl 2018-05-15 (cb013830)
Code extracted from:
https://github.com/curl/curl.git
at commit cb013830383f1ccc9757aba36bc32df5ec281c02 (curl-7_60_0).
Diffstat (limited to 'lib/getinfo.c')
-rw-r--r-- | lib/getinfo.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/getinfo.c b/lib/getinfo.c index 862ced0..d280eeb 100644 --- a/lib/getinfo.c +++ b/lib/getinfo.c @@ -5,7 +5,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 @@ -156,7 +156,12 @@ static CURLcode getinfo_long(struct Curl_easy *data, CURLINFO info, *param_longp = data->info.httpproxycode; break; case CURLINFO_FILETIME: - *param_longp = data->info.filetime; + if(data->info.filetime > LONG_MAX) + *param_longp = LONG_MAX; + else if(data->info.filetime < LONG_MIN) + *param_longp = LONG_MIN; + else + *param_longp = (long)data->info.filetime; break; case CURLINFO_HEADER_SIZE: *param_longp = data->info.header_size; @@ -253,6 +258,9 @@ static CURLcode getinfo_offt(struct Curl_easy *data, CURLINFO info, curl_off_t *param_offt) { switch(info) { + case CURLINFO_FILETIME_T: + *param_offt = (curl_off_t)data->info.filetime; + break; case CURLINFO_SIZE_UPLOAD_T: *param_offt = data->progress.uploaded; break; |