cURL / Mailing Lists / curl-library / Single Mail



From: Jamie Lokier <>
Date: Thu, 21 Aug 2008 22:18:35 +0100

Daniel Stenberg wrote:
> >Just clear ac_cv_sizeof_off_t.
> Actually, just setting that variable to "" just makes the script still
> remember that the variable is cached and then reading _no_ size from this
> variable!
> This is because the check for the cached status looks like this:
> if test "${ac_cv_type_off_t+set}" = set; then
> echo $ECHO_N "(cached) $ECHO_C" >&6

I should have said "unset ac_cv_type_off_t", which is what I meant.

That cached status check is testing whether the variable is set at
all. ${var+text} expands to text if var is set, nothing if var is unset.

> But how do I assign a shell variable named this weirdly?

You have to unset the variable.

Alas, the Autoconf manual says under "Portable shell" that "unset" is
not portable. In ./configure you will find "$as_unset variable" is
used, but there's no guarantee it will unset the variable on all
platforms - and libcurl being so ported, might hit one of them.

You might do ok calling

    AC_CHECK_SIZEOF([off_t_before_largefile], [], [AC_INCLUDES_DEFAULT
    typedef off_t off_t_before_largefile;])
    AC_CHECK_SIZEOF([off_t_after_largefile], [], [AC_INCLUDES_DEFAULT
    typedef off_t off_t_after_largefile;])


-- Jamie
Received on 2008-08-21