git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
Cc: git@vger.kernel.org, Johannes.Schindelin@gmx.de, daniel@haxx.se,
	peff@peff.net
Subject: Re: [PATCH v3] http: use xmalloc with cURL
Date: Thu, 15 Aug 2019 15:18:29 -0700	[thread overview]
Message-ID: <xmqqblwq2hu2.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20190815214429.28048-1-carenas@gmail.com> ("Carlo Marcelo Arenas Belón"'s message of "Thu, 15 Aug 2019 14:44:29 -0700")

Carlo Marcelo Arenas Belón  <carenas@gmail.com> writes:

>  #if LIBCURL_VERSION_NUM < 0x070800
>  #define curl_global_init(a) do { /* nothing */ } while (0)
> +#elif LIBCURL_VERSION_NUM >= 0x070c00
> +#define curl_global_init(a) curl_global_init_mem(a, xmalloc, free, \
> +						xrealloc, xstrdup, xcalloc)
>  #endif

Yup.  That looks better.

If your curl version is recent enough (which presumably is true for
most people these days), the entire #if/#endif block is skipped
while scanning for #else or #elif and #elseif willq be silently
ignored; it is unfortunate that #elseif won't be flagged by CPP as a
potential error X-<.

      reply	other threads:[~2019-08-15 22:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15 15:35 [PATCH] http: use xmalloc with cURL Carlo Marcelo Arenas Belón
2019-08-15 17:11 ` Junio C Hamano
2019-08-15 19:13 ` [PATCH v2] " Carlo Marcelo Arenas Belón
2019-08-15 19:34   ` Junio C Hamano
2019-08-15 21:44     ` [PATCH v3] " Carlo Marcelo Arenas Belón
2019-08-15 22:18       ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqblwq2hu2.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=carenas@gmail.com \
    --cc=daniel@haxx.se \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).