Thread (1 message) 1 message, 1 author, 2019-08-15

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

From: Junio C Hamano <hidden>
Date: 2019-08-15 22:18:37

Carlo Marcelo Arenas Belón  [off-list ref] 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-<.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help