Re: [PATCH v3] http: use xmalloc with cURL

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

 



Carlo Marcelo Arenas Belón  <carenas@xxxxxxxxx> 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-<.




[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