1 /***************************************************************************
3 * Project ___| | | | _ \| |
5 * | (__| |_| | _ <| |___
6 * \___|\___/|_| \_\_____|
8 * Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
10 * This software is licensed as described in the file COPYING, which
11 * you should have received as part of this distribution. The terms
12 * are also available at http://curl.haxx.se/docs/copyright.html.
14 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 * copies of the Software, and permit persons to whom the Software is
16 * furnished to do so, under the terms of the COPYING file.
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
22 ***************************************************************************/
24 #ifndef _CURL_STRTOOFFT_R_H
25 #define _CURL_STRTOOFFT_R_H
29 #include <curl/curl.h> /* for the curl_off_t type */
31 /* Determine what type of file offset conversion handling we wish to use. For
32 * systems with a 32-bit curl_off_t type, we should use strtol. For systems
33 * with a 64-bit curl_off_t type, we should use strtoll if it exists, and if
34 * not, should try to emulate its functionality. At any rate, we define
35 * 'strtoofft' such that it can be used to work with curl_off_t's regardless.
37 #if SIZEOF_CURL_OFF_T > 4
39 #define strtoofft strtoll
41 curl_off_t Curl_strtoll(const char *nptr, char **endptr, int base);
42 #define strtoofft Curl_strtoll
43 #define NEED_CURL_STRTOLL
46 #define strtoofft strtol