David Drysdale
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
Daniel Stenberg
cf7ad9758d
ares_inet_pton/ntop: cleanup
...
Make sure that the symbols are always exported and present in c-ares.
Make the headers prefixed with 'ares'.
Removed the inet_ntop.h version as it no longer features any content.
2013-02-17 17:44:02 +01:00
Yang Tse
0c677f578e
setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>
...
Inclusion of these two header files now done in setup_once.h
2012-12-14 18:36:59 +01:00
Yang Tse
a1035276c1
Header inclusion clean-up
...
Remove header inclusions already done in setup_once.h
2012-12-14 18:25:56 +01:00
Yang Tse
5e5c0132e6
renamed getplatform() to ares__getplatform() to avoid namespace pollution
2011-03-25 17:57:02 +01:00
Yang Tse
5b6a188909
build: move platform stuff to ares_platform.c and ares_platform.h
2011-03-24 11:31:50 +01:00
Yang Tse
bd066ab8ef
build: find out windows platform using GetVersionEx()
2011-03-23 20:53:28 +01:00
Yang Tse
fb4df6febc
ares_gethostbyaddr: fix compiler warning: conversion may lose significant bits
2010-12-02 19:45:00 +01:00
Ben Greear
03c1378e84
fix signed v/s unsigned casts warning in ares_gethostbyaddr.c
...
Signed-off-by: Ben Greear <greearb@candelatech.com>
2010-07-30 09:30:49 -07:00
Daniel Stenberg
0e8dc6f18e
style: make code less than 80 columns wide
2010-06-02 23:10:21 +02:00
Daniel Stenberg
63627fa5ab
remove all $Id$ lines
2010-03-27 19:42:02 +01:00
Yang Tse
e51156c080
removed usage of 's6_addr', fixing compilation issue triggered with no
...
longer using 'in6_addr' but only our 'ares_in6_addr' struct
2010-03-06 01:23:09 +00:00
Yang Tse
8fe746fcf2
Added IPv6 name servers support
2010-03-05 20:01:47 +00:00
Yang Tse
a82a8fbf82
Renamed c-ares setup.h to ares_setup.h
2009-11-02 11:55:53 +00:00
Yang Tse
737707bf4b
fix compiler warning: implicit conversion shortens 64-bit value into a 32-bit value
2009-04-14 12:53:53 +00:00
Gisle Vanem
f94afa4fdc
Constified some arguments in local functions.
2009-01-18 16:33:10 +00:00
Dan Fandrich
daa44aa9b1
C89 compilers (like Minix' ACK) only need to handle 31 functions arguments
...
so split a long sprintf into two calls to get below that number.
2008-12-09 01:02:28 +00:00
Yang Tse
aa1534eb20
In preparation for the upcomming IPv6 nameservers patch, the internal
...
ares_addr union is now changed into an internal struct which also holds
the address family.
2008-11-25 16:26:58 +00:00
Yang Tse
f214b583f5
adjust inclusion of "nameser.h"
2008-09-17 01:02:57 +00:00
Yang Tse
f2582d6949
include header file only when available
2008-09-15 17:14:29 +00:00
Yang Tse
2cb5cbba34
move inclusion of ares_private.h last
2008-09-11 03:46:47 +00:00
Yang Tse
6606c99b86
Fix three issues previous cleanup introduces.
2007-12-03 19:57:18 +00:00
Daniel Stenberg
aae96300a4
Erik Kline cleaned up ares_gethostbyaddr.c:next_lookup() somewhat
2007-12-03 10:25:05 +00:00
Daniel Stenberg
9c143e4444
the gethostbyname fix applied here as well
2007-11-28 15:18:27 +00:00
Steinar H. Gunderson
50ba81cd23
Make the query callbacks return the number of timeouts that happened during the execution of a query, and update documentation accordingly. (Patch from the Google tree.)
2007-09-28 14:46:51 +00:00
Gisle Vanem
a627160041
Removed inclusion of <sys/types.h> in .c-files
...
since it's already included through "setup.h".
2007-02-26 04:33:19 +00:00
Yang Tse
679a675660
add debug messages for initialization failures
2007-02-19 02:03:58 +00:00
Yang Tse
45b2661a5a
compiler warning fix
2007-02-17 11:59:08 +00:00
Yang Tse
675bdce3b2
compiler warning fix
2007-02-17 11:34:33 +00:00
Yang Tse
8595ddf7c4
add debug messages for fopen() failures
2007-02-16 19:17:05 +00:00
Gisle Vanem
46774e514d
Detabified. Added CVS id.
2005-11-11 19:20:22 +00:00
Daniel Stenberg
b117fef909
detabified
2005-08-18 08:48:31 +00:00
Dominick Meglio
7012fc65d9
Made sortlist support IPv6 (this can probably use some testing)
2005-04-09 19:59:59 +00:00
Dominick Meglio
00b7a550b5
Added preliminary IPv6 support to ares_gethostbyname
2005-04-08 19:46:46 +00:00
Dominick Meglio
29d71bd499
Made ares_gethostbyaddr support IPv6 by specifying AF_INET6 as the family
2005-04-08 15:41:31 +00:00
Daniel Stenberg
b41effd113
Tupone Alfredo fixed includes of arpa/nameser_compat.h to build fine on Mac OS
...
X.
2005-04-06 22:27:42 +00:00
Daniel Stenberg
6010f4503c
typecase to fix win32 compiler warning (and intended as other code is)
2005-03-21 22:37:18 +00:00
Daniel Stenberg
994f16d733
untabified
2004-12-10 21:46:00 +00:00
Gisle Vanem
6c64cc8669
Replace IsNT with IS_NT().
...
Return correct timeval in windows_port.c.
Squelch gcc warnings:
use 'ares_socket_t' in ares_fds.c.
Don't cast a 'lvalue' in ares_init.c.
2004-11-10 14:23:20 +00:00
Daniel Stenberg
3e748f4b50
removed tabs and trailing whitespace from source
2004-10-06 07:50:18 +00:00
Daniel Stenberg
2bf866b0ce
Dominick Meglio host file path discovery patch for windows
2004-09-26 18:20:58 +00:00
Gisle Vanem
0f51a17667
More patches for Watt-32 on Win32; don't include "nameser.h".
2004-08-20 14:10:44 +00:00
Daniel Stenberg
d5f3636a52
- Fixed a few variable return types for some system calls. Made configure
...
check for ssize_t to make it possible to use that when receiving the send()
error code. This is necessary to prevent compiler warnings on some systems.
- Made configure create config.h, and all source files now include setup.h that
might include the proper config.h (or a handicrafted alternative).
- Switched to 'ares_socket_t' type for sockets in ares, since Windows don't
use 'int' for that.
- automake-ified and libool-ified c-ares. Now it builds libcares as a shared
lib on most platforms if wanted. (This bloated the size of the release
archive with another 200K!)
- Makefile.am now uses Makefile.inc for the c sources, h headers and man
pages, to make it easier for other makefiles to use the exact same set of
files.
- Adjusted 'maketgz' to use the new automake magic when building distribution
archives.
2004-07-22 22:18:45 +00:00
Daniel Stenberg
e7293e0779
djgpp fixes by Gisle
2004-07-01 13:55:13 +00:00
Daniel Stenberg
155aadf0b3
changed the long to int typecasts to see if icc 8.0 complains less on this
2004-03-23 08:42:01 +00:00
Daniel Stenberg
c7c24e3de7
typecase the bitfiddling results since we get a long and we store an int,
...
they may not be of the size size
2004-02-23 07:55:58 +00:00
Daniel Stenberg
3d0a7c00df
remove rcsid stuff from c files, it serves no useful purpose
2004-02-02 15:59:35 +00:00
Daniel Stenberg
5e847a14bd
ares 1.1.1 with collected applied patches
2003-10-07 21:54:04 +00:00