curl-library
Re: [PATCH] 64-bit curl_off_t no longer gated to off_t
Date: Mon, 4 Aug 2008 11:57:12 +0200
2008/8/4, Yang Tse wrote:
> 2008/8/3, Daniel Stenberg wrote:
>
> > ../include/curl/curlbuild.h:116: error: expected '=', ',',
> > ';', 'asm' or '__attribute__' before 'curl_off_t'
>
> Lines 112 to 116 of generated curlbuild.h on my system look like...
>
> 112 /* Signed integral data type used for curl_off_t. */
> 113 #define CURL_OFF_T int64_t
> 114
> 115 /* Data type definition of curl_off_t. */
> 116 typedef CURL_OFF_T curl_off_t;
Ok, I think I know the reason for the failure.
The configure script has chosen a data type, most probably int64_t,
that was available at the configuration stage at the very moment that
CURL_CONFIGURE_CURL_OFF_T was executed, which was quite late in the
configure process. And the data type was available because some
preprocessor definition was making it visible to the compiler.
On the other hand when 'make' was executed and curlbuild was
typedef'inig curl_off_t to that data type, and previously pulling in
<sys/types.h> <stdint.h> and <inttypes.h> the preprocessor symbol that
made it visible wasn't defined, which is the normal scenario when
pulling the external libcul API.
The proper fix is that the call to CURL_CONFIGURE_CURL_OFF_T has to be
done early enough in the configure script so that the configure script
hasn't defined, on its own, any preprocessor symbol yet.
Even if this isn't the final reason for the failure you've detected.
What I've just described must be fixed. So... attached is version 3 of
the patch which improves version 2 in what I've just commented and
also makes the necessary changes that I've also been saying were
needed to include/README.
Even if this new patch fixes the issue for you I'm interested in
knowing which data type was chosen when this failed. And also which
preprocessor symbol(s) where hiding its definition in <stdint.h>
As usual the patch is against current CVS.
Cheers,
-- -=[Yang]=-
- text/plain attachment: curl_off_t_v3.patch