curl-library
Re: strtoll patch
Date: Fri, 23 Jan 2004 08:49:40 +0100 (CET)
On Thu, 22 Jan 2004, Gisle Vanem wrote:
> I assume SIZEOF_CURL_OFF_T is produced by Configure, but for
> Win32/DOS shouldn't it be defined in curl.h? Something like:
> +#ifndef SIZEOF_CURL_OFF_T
> +#define SIZEOF_CURL_OFF_T sizeof(curl_off_t)
> +#endif
Right, but I don't like that added in the curl.h file so I've added those
lines in the setup.h files (both in lib and in src).
Defining SIZEOF_CURL_OFF_T like this will make the preprocessor get/use the
size of the (native) type which might not be suitable for cross-compiles. But
I figure most cross-compiling fellows use a *nix anyway, and then the define
is set by configure and will work "correctly".
> + *val = Curl_strtoll(str, NULL, 0);
This is a slight violation of the app/library boundary. The function is
(sometimes) present in the library, but the function is not public and is not
really available to the outside world...
I haven't really made up my mind on how to solve this in a nice way... I'm in
general reluctant to add functions to the libcurl API that isn't strictly
transfer-related (like the already present string comparisions and the *printf
code etc). On the other hand, if we don't make this function public then we
need to duplicate it in the client.
Anyone with opinions on this general policy issue?
> BTW, curl.h needs to be included in strtoofft.h.
Fixed!
-- Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/ [[ Do not send mails to this email address. They won't reach me. ]] ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdnReceived on 2004-01-23