]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
includes: avoid duplicate memory callback typdefs even harder
authorDaniel Stenberg <daniel@haxx.se>
Mon, 18 Apr 2016 13:04:17 +0000 (15:04 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 18 Apr 2016 13:04:17 +0000 (15:04 +0200)
include/curl/curl.h
lib/curl_memory.h

index 1df508410733a834ccf9714bf32869efa95c7629..20dd250e8ad4905c045bd2bcf9c2d3fe45bae84a 100644 (file)
@@ -373,6 +373,7 @@ typedef curlioerr (*curl_ioctl_callback)(CURL *handle,
                                          int cmd,
                                          void *clientp);
 
+#ifndef CURL_DID_MEMORY_FUNC_TYPEDEFS
 /*
  * The following typedef's are signatures of malloc, free, realloc, strdup and
  * calloc respectively.  Function pointers of these types can be passed to the
@@ -386,6 +387,7 @@ typedef char *(*curl_strdup_callback)(const char *str);
 typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size);
 
 #define CURL_DID_MEMORY_FUNC_TYPEDEFS
+#endif
 
 /* the kind of data that is passed to information_callback*/
 typedef enum {
index cbe3b272bba011f6fd5abeefd9c5e20592b5b2ec..6f792fffda0add3a72b43017276ede2f09ce340f 100644 (file)
@@ -95,6 +95,7 @@ typedef void (*curl_free_callback)(void *ptr);
 typedef void *(*curl_realloc_callback)(void *ptr, size_t size);
 typedef char *(*curl_strdup_callback)(const char *str);
 typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size);
+#define CURL_DID_MEMORY_FUNC_TYPEDEFS
 #endif
 
 extern curl_malloc_callback Curl_cmalloc;