Yang Tse [Sat, 21 May 2011 01:53:32 +0000 (03:53 +0200)]
ares_iphlpapi: fix compiler warnings
Yang Tse [Fri, 20 May 2011 14:43:25 +0000 (16:43 +0200)]
winsock: compilation fixes
Provide winsock iphlpapi alternative definitions to prevent compilation
failures when using a variety of winsock header implementations.
David Stuart [Tue, 17 May 2011 09:53:13 +0000 (11:53 +0200)]
IPv6-on-windows: find DNS servers correctly
Daniel Stenberg [Mon, 9 May 2011 09:45:35 +0000 (11:45 +0200)]
man pages: docs for the c-ares utility programs
Daniel Stenberg [Fri, 29 Apr 2011 22:17:03 +0000 (00:17 +0200)]
ares_parse_ns_reply.c: remove CVSism
Yang Tse [Sun, 27 Mar 2011 08:37:03 +0000 (10:37 +0200)]
build: fix header inclusion
Yang Tse [Sun, 27 Mar 2011 02:27:49 +0000 (04:27 +0200)]
getservbyport replacement for Win CE
Yang Tse [Fri, 25 Mar 2011 16:57:02 +0000 (17:57 +0100)]
renamed getplatform() to ares__getplatform() to avoid namespace pollution
Yang Tse [Fri, 25 Mar 2011 12:13:55 +0000 (13:13 +0100)]
configure: fix libtool warning
Recent versions of libtool are now tracing usage of AC_CONFIG_MACRO_DIR
macro and warn heavily when not used in configure script along with
ACLOCAL_AMFLAGS in Makefile.am. So in order to make libtool happy
while keeping backwards compatibility this is added.
Yang Tse [Thu, 24 Mar 2011 19:25:49 +0000 (20:25 +0100)]
adig: RFC4034 resource record type detection
Can be tested with: adig -s 8.8.8.8 -t ANY example.com
Yang Tse [Thu, 24 Mar 2011 19:24:42 +0000 (20:24 +0100)]
nameser.h: RFC4034 resource record type definitions
Yang Tse [Thu, 24 Mar 2011 10:31:50 +0000 (11:31 +0100)]
build: move platform stuff to ares_platform.c and ares_platform.h
Yang Tse [Wed, 23 Mar 2011 19:53:28 +0000 (20:53 +0100)]
build: find out windows platform using GetVersionEx()
Yang Tse [Wed, 23 Mar 2011 12:44:42 +0000 (13:44 +0100)]
build: use getenv() replacement function for systems which lack it
Yang Tse [Tue, 22 Mar 2011 19:51:15 +0000 (20:51 +0100)]
setup_once: system error codes for Windows CE
Yang Tse [Tue, 22 Mar 2011 19:50:42 +0000 (20:50 +0100)]
ares_search: use ERRNO macro for portability sake
Yang Tse [Tue, 22 Mar 2011 16:19:37 +0000 (17:19 +0100)]
System's errno.h inclusion cleanup follow-up.
System's errno.h is conditionally included from setup_once.h
Yang Tse [Tue, 22 Mar 2011 13:28:47 +0000 (14:28 +0100)]
Windows CE specific adjustment
All versions of Windows CE support Winsock 1.1
Yang Tse [Tue, 22 Mar 2011 13:02:23 +0000 (14:02 +0100)]
System's errno.h inclusion cleanup.
System's errno.h is conditionally included from setup_once.h
Yang Tse [Tue, 22 Mar 2011 12:43:34 +0000 (13:43 +0100)]
ares_init: fix gethostname error detection on winsock platforms
Yang Tse [Tue, 22 Mar 2011 11:56:30 +0000 (12:56 +0100)]
configure: r-enable temporarily disabled detection of system's inet_ntop()
Detection was temporarily disabled in commit
674e044ccb21f2f63537da53565fce868f
Daniel Stenberg [Tue, 15 Mar 2011 10:28:30 +0000 (11:28 +0100)]
configure: stop using the deprecated AM_INIT_AUTOMAKE syntax
Gisle Vanem [Tue, 22 Feb 2011 13:16:51 +0000 (14:16 +0100)]
Watt-32: use errno
Make sure Watt-32 programs use 'errno' even on Win32 targets
Guenter Knauf [Fri, 18 Feb 2011 18:58:09 +0000 (19:58 +0100)]
Removed commented CLFAGS no longer needed.
Guenter Knauf [Fri, 18 Feb 2011 18:01:14 +0000 (19:01 +0100)]
Fixed CFLAGS for NetWare.
Added -m32 to enable compilation with x86_64 compilers;
added conditional to set -fpcc-struct-return only for gcc compiler.
Gisle Vanem [Tue, 15 Feb 2011 16:15:37 +0000 (17:15 +0100)]
Watt32: fix server init
Somewhere in the process, programs using the Watt-32 tcp/ip stack
stopped working.
Dima Tisnek [Wed, 16 Feb 2011 22:43:49 +0000 (23:43 +0100)]
config_sortlist: (win32) missing else
Without an else there, contents of "pat" that could have been
successfully set just above, may be clobbered by successive unsuccessful
calls to "xxx_pton" or "ip_addr".
Yang Tse [Mon, 17 Jan 2011 20:06:38 +0000 (21:06 +0100)]
Makefile.msvc: add a couple of VS version strings
Yang Tse [Mon, 17 Jan 2011 19:44:23 +0000 (20:44 +0100)]
Makefile.msvc: add a couple of VS version strings
Yang Tse [Mon, 17 Jan 2011 18:36:41 +0000 (19:36 +0100)]
build: add install target to Makefile.msvc
Daniel Stenberg [Mon, 27 Dec 2010 12:19:37 +0000 (13:19 +0100)]
ares_set_servers_csv: remove unused variables
Daniel Stenberg [Mon, 27 Dec 2010 12:18:54 +0000 (13:18 +0100)]
init_by_resolv_conf: fix compiler warnings
The code received the return codes in the 'status' variable without
using it. Instead we just ignore those particular errors.
Daniel Stenberg [Mon, 27 Dec 2010 12:13:19 +0000 (13:13 +0100)]
getv4: Value stored to 'dst' is never read
Daniel Stenberg [Mon, 27 Dec 2010 12:10:48 +0000 (13:10 +0100)]
advance_tcp_send_queue: avoid NULL ptr dereference
If given a too large 'num_bytes' value, it would cause a NULL ptr
dereference. Instead the code will now break out of the loop at the end
of the list.
Peter Pentchev [Sun, 19 Dec 2010 22:20:58 +0000 (23:20 +0100)]
configure: fix a bashism
Daniel Stenberg [Sat, 18 Dec 2010 21:20:16 +0000 (22:20 +0100)]
cleanup: avoid unsafe typecasts
Avoid the risk of reading 16bit data from an unaligned address by using
a macro that is adapted for this.
Stefan Bühler [Sat, 18 Dec 2010 13:17:09 +0000 (14:17 +0100)]
ares_expand_name: Fix encoded length for indirect root
Yang Tse [Sat, 18 Dec 2010 03:57:47 +0000 (04:57 +0100)]
build: add some explicit file references to VS project files
Yang Tse [Fri, 17 Dec 2010 17:42:59 +0000 (18:42 +0100)]
config-win32: provide HAVE_ASSERT_H definition
Yang Tse [Fri, 17 Dec 2010 01:03:38 +0000 (02:03 +0100)]
build: include ares_nowarn in sample program VS project files
Yang Tse [Thu, 16 Dec 2010 22:09:04 +0000 (23:09 +0100)]
build: include ares_nowarn among SAMPLESOURCES and SAMPLEHEADERS
Yang Tse [Thu, 16 Dec 2010 20:47:19 +0000 (21:47 +0100)]
configure: temporarily disable detection of system's inet_ntop()
This is done to allow compilation of ares_inet_ntop() by some daily
builds picky compilers that otherwise do not need this function.
Yang Tse [Thu, 16 Dec 2010 20:34:59 +0000 (21:34 +0100)]
changes: mention last fix
Yang Tse [Thu, 16 Dec 2010 20:27:56 +0000 (21:27 +0100)]
ares_inet_ntop: remove definition and usage of macro SPRINTF
Existing definition of SPRINTF always resulted in sprintf() being used,
and sprintf() returning 'int' is already used throughout the library.
Yang Tse [Thu, 16 Dec 2010 20:12:14 +0000 (21:12 +0100)]
ares_inet_ntop: reapply changes from previous c-ares version (III)
- Replace 'u_char' with 'unsigned char'.
- Replace 'u_int' with 'unsigned int'.
- use macros ERRNO and SET_ERRNO() for errno handling.
Yang Tse [Thu, 16 Dec 2010 19:45:34 +0000 (20:45 +0100)]
ares_inet_ntop: reapply changes from previous c-ares version (II)
- Remove rcsid.
- Adjust header file inclusions.
- ares_inet_ntop used only on systems without a proper inet_ntop function.
Yang Tse [Thu, 16 Dec 2010 19:32:08 +0000 (20:32 +0100)]
ares_inet_ntop: reapply changes from previous c-ares version (I)
- Replace tabs with spaces.
- Use ANSI C style for function declarations and definitions.
- Use sizeof with parentheses.
Yang Tse [Thu, 16 Dec 2010 18:46:23 +0000 (19:46 +0100)]
ares_inet_ntop: fix off by one error triggering out of bounds write
ares_inet_ntop would trigger an out of bounds write when the representation
of the address required 15 characters, due to not taking in account null
termination character.
Full import of inet_ntop.c from bind-9.5.3rc1 to pull additional fixes.
Yang Tse [Thu, 16 Dec 2010 17:39:31 +0000 (18:39 +0100)]
ares_nowarn: add conditional inclusion of assert.h header
Yang Tse [Thu, 16 Dec 2010 16:18:57 +0000 (17:18 +0100)]
fix compiler warning: conversion may lose significant bits
Yang Tse [Wed, 15 Dec 2010 01:44:07 +0000 (02:44 +0100)]
ares_inet_net_pton: fix non-rejection of some malformed literals
ares_inet_net_pton would return wrong values when excessively large,
and invalid, netmasks are used. Fixes are from bind-9.5.3rc1,
issue also described in the WLB-
2008080064 advisory.
Yang Tse [Wed, 15 Dec 2010 01:26:51 +0000 (02:26 +0100)]
setup_once: provide ISASCII macro
Yang Tse [Wed, 15 Dec 2010 01:08:46 +0000 (02:08 +0100)]
configure: inet_net_pton function check adjustments
Define HAVE_INET_NET_PTON only when system's inet_net_pton function is IPv6
capable and is not affected by the WLB-
2008080064 advisory.
HAVE_INET_NET_PTON_IPV6 is no longer defined nor used.
Yang Tse [Fri, 10 Dec 2010 20:19:51 +0000 (21:19 +0100)]
ares_init: fix detection of semicolon comments in resolv.conf
File resolv.conf may either use a hash '#' or a semicolon ';' character as an
indication that the rest of the line is a comment. This fixes not recognizing
the semicolon as a valid comment indicator in resolv.conf.
Yang Tse [Fri, 10 Dec 2010 20:04:11 +0000 (21:04 +0100)]
version: start working on 1.7.5
Daniel Stenberg [Wed, 8 Dec 2010 14:19:13 +0000 (15:19 +0100)]
release-preps: CHANGES and RELEASE-NOTES synced
Daniel Stenberg [Wed, 8 Dec 2010 14:17:15 +0000 (15:17 +0100)]
ares_set_local_*: added in 1.7.4, not before
Yang Tse [Fri, 3 Dec 2010 03:41:16 +0000 (04:41 +0100)]
build: provide SIZEOF_SIZE_T definition for non-configure builds
Yang Tse [Fri, 3 Dec 2010 03:35:05 +0000 (04:35 +0100)]
build: config.dos renamed to config-dos.h
Yang Tse [Thu, 2 Dec 2010 19:53:12 +0000 (20:53 +0100)]
build: provide SIZEOF_SIZE_T netware definition
Yang Tse [Thu, 2 Dec 2010 18:45:00 +0000 (19:45 +0100)]
ares_gethostbyaddr: fix compiler warning: conversion may lose significant bits
Yang Tse [Thu, 2 Dec 2010 18:08:46 +0000 (19:08 +0100)]
configure: undo using autobuilds to temporarily verify strict aliasing warnings.
Yang Tse [Thu, 2 Dec 2010 14:43:18 +0000 (15:43 +0100)]
fix compiler warning: rounding, sign extension, or loss of accuracy may result
Ben Noordhuis [Thu, 2 Dec 2010 09:47:50 +0000 (10:47 +0100)]
ares_parse_a_reply: fix CNAME response parsing
Reply to a CNAME query doesn't contain addresses, causing
ares_parse_a_reply() to bail out with ARES_ENODATA
Bug: http://groups.google.com/group/nodejs/browse_thread/thread/
a1268c9ea5e9ad9b
Yang Tse [Wed, 1 Dec 2010 22:36:19 +0000 (23:36 +0100)]
fix compiler warning: conversion may lose significant bits
Yang Tse [Mon, 29 Nov 2010 01:22:08 +0000 (02:22 +0100)]
atoi: remove atoi usage
Yang Tse [Sun, 28 Nov 2010 19:56:17 +0000 (20:56 +0100)]
ares_init: fix compiler warning: conversion may lose significant bits
Yang Tse [Thu, 25 Nov 2010 02:07:29 +0000 (03:07 +0100)]
configure: fix autoconf warning
Yang Tse [Thu, 25 Nov 2010 01:19:36 +0000 (02:19 +0100)]
inet_pton: fix compiler warning
Yang Tse [Thu, 18 Nov 2010 16:11:38 +0000 (17:11 +0100)]
configure: use autobuilds to temporarily verify strict aliasing warnings.
Temporarily, When cross-compiling with gcc 3.0 or later, enable strict aliasing
rules and warnings. Given that cross-compiled targets autobuilds do not run the
test-suite, there is no risk of running code that violates strict aliasing rules
Yang Tse [Tue, 16 Nov 2010 19:15:55 +0000 (20:15 +0100)]
ares_getnameinfo: Partially revert commit
85520d66e0ac7ac73411bc25e98769a88b2f
Upon socket address family and length validation failure return ARES_ENOTIMP
in callback again, this is the error code documented in man page and used
mostly all over the library.
Yang Tse [Tue, 16 Nov 2010 18:41:03 +0000 (19:41 +0100)]
ares_getnameinfo: Validate socket address family and length.
Validate socket address family and that the socket address length is appropriate
for the specified family. Failure is reported with ARES_EBADFAMILY in callback.
Yang Tse [Tue, 16 Nov 2010 18:08:07 +0000 (19:08 +0100)]
ares_getnameinfo: fix two compiler warnings
Yang Tse [Tue, 16 Nov 2010 02:33:54 +0000 (03:33 +0100)]
Added another VS10 version string
Yang Tse [Sun, 14 Nov 2010 03:42:10 +0000 (04:42 +0100)]
Fix GCC 4 compiler warning 'dereferencing type-punned pointer might break strict-aliasing rules'.
Yang Tse [Sat, 13 Nov 2010 13:06:44 +0000 (14:06 +0100)]
Yang Tse [Sat, 13 Nov 2010 03:15:16 +0000 (04:15 +0100)]
configure: fix autoconf 2.68 warning: no AC_LANG_SOURCE call detected in body
Yang Tse [Fri, 12 Nov 2010 18:46:13 +0000 (19:46 +0100)]
Fix compiler warning: array subscript has type 'char'
Yang Tse [Fri, 12 Nov 2010 18:00:29 +0000 (19:00 +0100)]
Fix GCC 4 compiler warning 'dereferencing type-punned pointer might break strict-aliasing rules'.
Yang Tse [Fri, 12 Nov 2010 17:53:58 +0000 (18:53 +0100)]
Revert following commits:
07bc7ea79509bcc9ef6e09151e81766ed00d3392
3392a50ea3f8573ea4b7a9d82b9833dab60cb0e9
9912637d32c9987719a1ea12db591aee2941891c
The purpose of the whole patch was to silence a compiler warning triggered
with GCC 4 on file ares_process.c The specific compiler warning was
'dereferencing type-punned pointer might break strict-aliasing rules'.
A simpler patch will follow to equally silence the warning.
Yang Tse [Fri, 12 Nov 2010 15:34:34 +0000 (16:34 +0100)]
ares_options: reorder header inclusions to make inclusion of
ares_private.h the last included one again.
Patrik Thunstrom [Fri, 12 Nov 2010 13:07:11 +0000 (14:07 +0100)]
adig: fix NAPTR parsing
I ran across a small "issue" in your adig example.
It is simply the last part of the NAPTR record, the replacement element,
which is not a string, as currently handled in adig, but a domain name.
Daniel Stenberg [Tue, 5 Oct 2010 17:42:39 +0000 (19:42 +0200)]
ares_save_options: assignments instead of memcpy
Daniel Stenberg [Tue, 5 Oct 2010 17:36:17 +0000 (19:36 +0200)]
init_by_options: don't copy an empty sortlist
If there aren't any sort items to copy, don't bother. Without this
little precaution it would do a malloc(0) which causes undefined
behaviors and is frowned upon by curl's memdebug-system.
Guenter Knauf [Sun, 3 Oct 2010 20:55:42 +0000 (22:55 +0200)]
Minor Watcom makefile tweaks.
Mike Crowe [Thu, 23 Sep 2010 16:46:34 +0000 (18:46 +0200)]
Fix lookup with HOSTALIASES set.
ares__read_line returns ARES_EOF when it reaches the end of the
file. This will happen every time when reading to the end of the
HOSTALIASES file. Unfortunately single_domain treats this error as
being fatal.
Signed-off-by: Mike Crowe <mac@mcrowe.com>
Ben Greear [Tue, 24 Aug 2010 23:48:47 +0000 (16:48 -0700)]
Add missing break that caused get_ares_servers to fail.
Reported-by: Ning Dong <flintning@163.com>
Signed-off-by: Ben Greear <greearb@candelatech.com>
Yang Tse [Wed, 11 Aug 2010 12:08:18 +0000 (14:08 +0200)]
configure: werror related adjustments
Guenter Knauf [Sun, 8 Aug 2010 09:18:38 +0000 (11:18 +0200)]
Added copyright string to ares_version.h and make use of it in other files.
Guenter Knauf [Sun, 8 Aug 2010 08:26:04 +0000 (10:26 +0200)]
Block created ares_build.h for NetWare to avoid usage from other platforms.
Guenter Knauf [Sat, 7 Aug 2010 16:35:47 +0000 (18:35 +0200)]
Fix to overwrite default libname.
Guenter Knauf [Fri, 6 Aug 2010 01:53:03 +0000 (03:53 +0200)]
Some more Watcom makefile massage ...
Guenter Knauf [Fri, 6 Aug 2010 01:48:25 +0000 (03:48 +0200)]
Some more Watcom makefile massage ...
Ben Greear [Wed, 4 Aug 2010 14:42:01 +0000 (07:42 -0700)]
sock-addr-storage: Detect and deal with lack of .ss_family member.
AIX, at least, does not have sockaddr_storage.ss_family member.
Detect this in the configure logic and use proper #ifdefs in the
ares_process logic.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Tor Arntsen <tor@spacetec.no>
Guenter Knauf [Mon, 2 Aug 2010 23:21:56 +0000 (01:21 +0200)]
Added Watcom makefile based on libcurl's Makefile.Watcom.
Ben Greear [Sat, 31 Jul 2010 19:21:08 +0000 (12:21 -0700)]
typo: Fix compile bug for platforms that don't have sockaddr_storage.
Bug was introduced by me in previous commit.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Ben Greear [Sat, 31 Jul 2010 14:10:23 +0000 (07:10 -0700)]
Fix aliasing warning in gcc 4.4.4 (at least).
Should be no functional change, though the code gets a bit
ugglier.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Daniel Stenberg [Fri, 30 Jul 2010 22:15:38 +0000 (00:15 +0200)]
ares_set_servers_csv: use ISDIGIT
The IS*() set of macros are preferred to the regular is*() functions as
they help us avoid the most common pitfalls.
Ben Greear [Fri, 30 Jul 2010 22:11:54 +0000 (15:11 -0700)]
cast arg to isdigit to int
Looks like it might silence a warning on Netware build.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Ben Greear [Fri, 30 Jul 2010 17:09:57 +0000 (10:09 -0700)]
remove all uses of uint32_t
Previous fix forgot a few.
Signed-off-by: Ben Greear <greearb@candelatech.com>