Commit Graph

25 Commits

Author SHA1 Message Date
Yang Tse 9ed49f3e17 inet_ntop.c: s/socklen_t/ares_socklen_t 2013-02-19 13:54:28 +01:00
Yang Tse b82874ad6f inet_ntop.c: s/socklen_t/ares_socklen_t for portability 2013-02-19 13:27:33 +01: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 8c503ddf79 System's errno.h inclusion cleanup.
System's errno.h is conditionally included from setup_once.h
2011-03-22 14:02:23 +01:00
Yang Tse 3670427a0b 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.
2010-12-16 21:27:56 +01:00
Yang Tse 52f493c931 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.
2010-12-16 21:12:14 +01:00
Yang Tse 2c9bdd7856 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.
2010-12-16 20:45:34 +01:00
Yang Tse fd6f4dbe1e 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.
2010-12-16 20:32:08 +01:00
Yang Tse 0d738bab0d 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.
2010-12-16 19:46:23 +01:00
Daniel Stenberg 63627fa5ab remove all $Id$ lines 2010-03-27 19:42:02 +01: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 a08ee8a0be HAVE_INET_NTOP will only be defined when an IPv6 capable working
inet_ntop function is available.
2008-09-24 16:43:12 +00:00
Yang Tse f214b583f5 adjust inclusion of "nameser.h" 2008-09-17 01:02:57 +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 69fa447354 use macros ERRNO, SET_ERRNO(), SOCKERRNO and SET_SOCKERRNO() for errno handling 2007-02-16 15:04:44 +00:00
Yang Tse fc71973aa6 Minor compatibility fix 2006-08-04 17:35:05 +00:00
Yang Tse 857a5f9353 Fix compiler warning 2006-08-04 02:49:04 +00:00
Gisle Vanem fbb01a0ebe Added CVS id, Detabified, applied c-ares coding-style. 2005-11-12 14:59:33 +00:00
Gisle Vanem 9c99a58191 Squelch gcc 4.x warning. 2005-11-11 19:25:29 +00:00
Dominick Meglio a6f7820033 Converted some macros to use NS_* so they work on non-IPv6 systems 2005-05-15 16:31:01 +00:00
Dominick Meglio 8260cc50de Forgot to ares_-ize inet_ntop 2005-05-15 04:38:53 +00:00
Dominick Meglio eeb6aa6b01 Added an inet_ntop function from BIND for systems that do not have it 2005-05-14 18:35:20 +00:00