Re: [PATCH 1/1] imap-send: include strbuf.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Taylor Blau <me@xxxxxxxxxxxx> writes:

> On Wed, May 17, 2023 at 08:49:37AM -0700, Junio C Hamano wrote:
>> Christian Hesse <list@xxxxxxxx> writes:
>>
>> > From: Christian Hesse <mail@xxxxxxxx>
>> >
>> > We use xstrfmt() here, so let's include the header file.
>> >
>> > Signed-off-by: Christian Hesse <mail@xxxxxxxx>
>> > ---
>> >  imap-send.c | 1 +
>> >  1 file changed, 1 insertion(+)
>>
>> Puzzled.  For me Git 2.41-rc0 builds as-is without this change just
>> fine, it seems.
>
> It will fail to build for ancient versions of curl (pre-7.34.0, which
> was released in 2013), or if you build with `NO_CURL=1`.

xstrfmt() is used at exactly one place, inside "#ifndef NO_OPENSSL",
in the implementation of the static function cram().

Ah, the mention of that function was a huge red herring.  There are
tons of strbuf API calls in the file outside any conditional
compilation, and where it inherits the include from is "http.h",
that is conditionally included.

OK, so the fix seems to make sense, but the justification for the
change needs to be rewritten, I think.

    We make liberal use of the strbuf API functions and types, but
    the inclusion of <strbuf.h> comes indirectly by including
    <http.h>, which does not happen if you build with NO_CURL.

or something like that?

Thanks.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux