Set numerical options
curl_easy_setopt()is a vararg function where the 3rd argument can use different types depending on the situation, normal C language type conversion cannot be done. So you must make sure that you truly pass a
longand not an
intif the documentation tells you so. On architectures where they are the same size, you may not get any problems but not all work like that. Similarly, for options that accept a
curl_off_ttype, it is crucial that you pass in an argument using that type and no other.
curl_easy_setopt(handle, CURLOPT_TIMEOUT, 5L); /* 5 seconds timeout */
curl_off_t no_larger_than = 0x50000;
curl_easy_setopt(handle, CURLOPT_MAXFILESIZE_LARGE, no_larger_than);