1
0
mirror of https://frontier.innolan.net/rainlance/c-ares.git synced 2025-10-05 14:49:27 +00:00
Commit Graph

17 Commits

Author SHA1 Message Date
385582bd14 ares_win32_init: make LoadLibrary work when using UNICODE too
Closes #17
2016-02-11 12:24:22 +01:00
f1bcfa1122 api: Allow injection of user-specified malloc/free functions
Add a new ares_library_init_mem() initialization function for the
library which allows the library user to specify their own malloc,
realloc & free equivalents for use library-wide.

Store these function pointers in library-wide global variables,
defaulting to libc's malloc(), realloc() and free().

Change all calls to malloc, realloc and free to use the function pointer
instead.  Also ensure that ares_strdup() is always available
(even if the local environment includes strdup(3)), and change the
library code to always use it.

Convert calls to calloc() to use ares_malloc() + memset
2016-02-02 10:05:07 +00:00
87ff25049c Mark unhittable lines
Add comments for the benefit of the lcov tool, marking
lines that cannot be hit.  Typically these are fall-back
protection arms that are already covered by earlier checks,
and so it's not worth taking out the unhittable code (in case
someone changes the code between the two places in future).
2016-02-02 10:05:07 +00:00
2e0c3076e5 library init: be recursive
Previously, a single call to ares_library_cleanup() would deinitialise
the c-ares library, regardless of how many times ares_library_init() was
called. This behaviour may cause problems in programs linking two or
more libraries which, in turn, use c-ares. The present commit fixes this
problem, deinitializing the library only after a number of calls to
ares_library_cleanup() matching the number of calls to
ares_library_init().
2013-04-22 23:24:50 +02:00
6518b56a5e IPv6-on-windows: find DNS servers correctly 2011-05-17 11:53:13 +02:00
63627fa5ab remove all $Id$ lines 2010-03-27 19:42:02 +01:00
ea29eeb4eb Renamed fpGetNetworkParams and fpSystemFunction036 to avoid namespace pollution with static library 2009-11-11 08:56:46 +00:00
39c0bac44c Test for USE_WINSOCK since it is more restrictive than WIN32 2009-11-09 12:57:26 +00:00
a82a8fbf82 Renamed c-ares setup.h to ares_setup.h 2009-11-02 11:55:53 +00:00
7a5621876b Remove temporarily introduced memory leak. 2009-05-28 09:58:24 +00:00
425244eac4 Temporarily introduce a memory leak to verify curl debug memory tracking works. 2009-05-27 19:25:51 +00:00
cf3301f024 Make ares_init(), ares_dup() and ares_init_options() return ARES_ENOTINITIALIZED
if library initialization has not been performed calling ares_library_init().
2009-05-26 18:00:14 +00:00
0f59e2b531 Add same copyright notice as other c-ares files 2009-05-19 15:23:25 +00:00
d3f3189860 Fix case 2009-05-19 15:19:03 +00:00
757642f675 Remove run-time requirement for advapi32.dll since
c-ares can work even with no advapi32.dll at all.
2009-05-18 15:49:32 +00:00
b677ff3d15 Intentionally avoid checking if the address of SystemFunction036, a.k.a.
RtlGenRandom, has been located or not. This function is only available on
WinXP and later. When unavailable c-ares uses portable rand() function.
2009-05-18 01:25:20 +00:00
c03c7251c9 Introduction of ares_library_init() and ares_library_cleanup() 2009-05-17 17:10:41 +00:00