"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/lib/ares_library_init.c" between
c-ares-1.17.1.tar.gz and c-ares-1.17.2.tar.gz

About: c-ares is a C library for asynchronous DNS requests (including name resolves).

ares_library_init.c  (c-ares-1.17.1):ares_library_init.c  (c-ares-1.17.2)
skipping to change at line 43 skipping to change at line 43
#if defined(ANDROID) || defined(__ANDROID__) #if defined(ANDROID) || defined(__ANDROID__)
#include "ares_android.h" #include "ares_android.h"
#endif #endif
/* library-private global vars with source visibility restricted to this file */ /* library-private global vars with source visibility restricted to this file */
static unsigned int ares_initialized; static unsigned int ares_initialized;
static int ares_init_flags; static int ares_init_flags;
/* library-private global vars with visibility across the whole library */ /* library-private global vars with visibility across the whole library */
/* Some systems may return either NULL or a valid pointer on malloc(0). c-ares
should
* never call malloc(0) so lets return NULL so we're more likely to find an issu
e if it
* were to occur. */
static void *default_malloc(size_t size) { if (size == 0) { return NULL; } retur
n malloc(size); }
#if defined(WIN32) #if defined(WIN32)
/* We need indirections to handle Windows DLL rules. */ /* We need indirections to handle Windows DLL rules. */
static void *default_malloc(size_t size) { return malloc(size); }
static void *default_realloc(void *p, size_t size) { return realloc(p, size); } static void *default_realloc(void *p, size_t size) { return realloc(p, size); }
static void default_free(void *p) { free(p); } static void default_free(void *p) { free(p); }
#else #else
# define default_malloc malloc
# define default_realloc realloc # define default_realloc realloc
# define default_free free # define default_free free
#endif #endif
void *(*ares_malloc)(size_t size) = default_malloc; void *(*ares_malloc)(size_t size) = default_malloc;
void *(*ares_realloc)(void *ptr, size_t size) = default_realloc; void *(*ares_realloc)(void *ptr, size_t size) = default_realloc;
void (*ares_free)(void *ptr) = default_free; void (*ares_free)(void *ptr) = default_free;
#ifdef USE_WINSOCK #ifdef USE_WINSOCK
static HMODULE hnd_iphlpapi; static HMODULE hnd_iphlpapi;
static HMODULE hnd_advapi32; static HMODULE hnd_advapi32;
 End of changes. 3 change blocks. 
2 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)