curl / Mailing Lists / curl-library / Single Mail


Re: Getting away from the generated header file [RFC]

From: Daniel Stenberg <>
Date: Tue, 4 Apr 2017 13:49:03 +0200 (CEST)

On Tue, 4 Apr 2017, Dan Fandrich wrote:

>> If anyone experiences problems with test 1541, speak up!
> All my autobuilds from last night failed on this test, and one didn't even
> compile.


I see that curlbuild.h favors int64_t before 'long long' (for 32bit systems)
and system.h does not:


   CURL_TYPEOF_CURL_OFF_T: long long

I think this is slightly problematic since 'int64_t' isn't a native type so we
would then also need to figure out which header file to include for it, or at
least if the system has <stdint.h> [*]

I propose we fix this by checking for long long before we check for int64_t in
configure. I can't come up with any system where changing this will cause any
problems but I'm all ears if someone else does!

diff --git a/acinclude.m4 b/acinclude.m4
index 2abae8d8a..c988f2f31 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2905,13 +2905,13 @@ AC_DEFUN([CURL_CONFIGURE_CURL_OFF_T], [
    if test "$curl_typeof_curl_off_t" = "unknown"; then
      AC_MSG_CHECKING([for 64-bit curl_off_t data type])
      for t8 in \
        "$x_LP64_long" \
+ 'long long' \
        'int64_t' \
        '__int64' \
- 'long long' \
        '__longlong' \
        '__longlong_t' ; do
        DO_CURL_OFF_T_CHECK([$t8], [8])

[*] =

Received on 2017-04-04