Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/http.h
diff options
context:
space:
mode:
authorCarlo Marcelo Arenas Belón <carenas@gmail.com>2019-08-15 22:13:14 +0300
committerJunio C Hamano <gitster@pobox.com>2019-08-15 22:37:10 +0300
commit93b980e58f5624ee4e3b2dc0d0babaa97ef66d19 (patch)
treedff391cce9786b565faf4aadf40b5788bacad154 /http.h
parent9827d4c185e4da728f51cd77c54a38c9de62495f (diff)
http: use xmalloc with cURL
f0ed8226c9 (Add custom memory allocator to MinGW and MacOS builds, 2009-05-31) never told cURL about it. Correct that by using the cURL initializer available since version 7.12 to point to xmalloc and friends for consistency which then will pass the allocation requests along when USE_NED_ALLOCATOR=YesPlease is used (most likely in Windows) Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.h')
-rw-r--r--http.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/http.h b/http.h
index b429f1cf04..5e0ad724f9 100644
--- a/http.h
+++ b/http.h
@@ -25,8 +25,12 @@
#if LIBCURL_VERSION_NUM < 0x070704
#define curl_global_cleanup() do { /* nothing */ } while (0)
#endif
+
#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
#if (LIBCURL_VERSION_NUM < 0x070c04) || (LIBCURL_VERSION_NUM == 0x071000)