Commit Graph

19 Commits

Author SHA1 Message Date
bjh21 e3f0868ef4 ANSIfy, since I'm in the area. 2003-05-05 21:35:40 +00:00
bjh21 77de1304d5 Fix the signatures of inet_addr(), inet_lnaof(), inet_makeaddr(), inet_netof(),
and inet_network() to match XNS and (where applicable) POSIX.  This is largely
just the replacement of unsigned long with in_addr_t.

This constitutes a small ABI change on sh5, but scw (sh5 portmaster) thinks
that both the users of that port will be able to cope.  kleink claims the
change is ABI-neutral on other LP64 ports, and it's a no-op on ILP32 ports.
Hence, I'm doing it this way and avoiding the whole __RENAME dance.
2003-05-05 13:56:13 +00:00
thorpej 1289029f10 Fix signed/unsigned comparison warnings. 2002-11-11 17:56:11 +00:00
itojun cf02e1f1ce fix behavior of inet_pton() to be RFC2553/XNS compliant.
inet_pton() takes decimal dot-quads only.  inet_pton() does not
take hexadecimal, octal nor classful (short) representation.
2000-02-07 18:51:02 +00:00
mycroft 605490369c Delint.
Remove trailing ; from uses of __weak_alias().  The macro inserts this if
needed.
2000-01-22 22:19:07 +00:00
is bcb4c98ba9 Properly check for overflows. Fixes PR8314 as annotated by mjl. 1999-11-13 04:52:50 +00:00
is 94efbddebd Check for invalid component numbers (wrong hex "digits", octal numbers
with digits of 8 or 9) and complain. Fixes PR 8314 by ITOH Yasufumi (but
adding the check of hexadecimal numbers).
1999-11-03 11:47:02 +00:00
lukem d896261208 back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
1999-09-20 04:38:56 +00:00
lukem b48252f365 * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
  and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

		_DIAGASSERT(path != NULL)
	#ifdef _DIAGNOSTIC
		if (path == NULL) {
			errno = EFAULT;
			return (-1);
		}
	#endif
1999-09-16 11:44:54 +00:00
itojun 46c3891136 bring in IPv6 numeric address parsing fix from bind821.
XXX bind821 should be imported here
1999-08-17 17:50:27 +00:00
christos 2c89343c25 delint 1998-11-13 15:46:52 +00:00
kleink 0d8a0f5d93 Need an internal name for inet_aton(). 1998-10-13 21:03:31 +00:00
perry 198f98faf0 $Id: -> Id: (to make hunting down other bad Ids easier). 1998-01-06 05:01:16 +00:00
jtc 43fa6fe319 If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore.  The library will use those
names internally.  Weak aliases are used to provide the original names
to the API.

This is only the first part of this change.  It is most of the functions
which are implemented in C for all NetBSD ports.  Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
1997-07-21 14:06:24 +00:00
mrg 38bfb6cd0a merge bind 4.9.6 resolver. still need to fix <resolv.h> 1997-07-20 13:33:17 +00:00
christos 8d36d3405e Fix RCSID's
Fix gcc warnings
Add missing prototypes
Use "namespace.h"
1997-07-13 19:57:30 +00:00
christos 78587c990a inet_pton4() did not handle
- incompletely specified ip addresses
	- ip addresses specified in hex
like inet_aton() and inet_addr(). This broke parsing of /etc/hosts
(127.1	localhost stopped working before the resolver is started).
The fix is to use the inet_aton() code to implement inet_pton4(), and
then use the new inet_pton4() code to implement inet_aton() and inet_addr().
At that point inet_addr.c is empty and has been removed.
1997-07-07 17:11:03 +00:00
mrg 023690d8db merge in the bind 4.9.5-P1 resolver. we are now _mostly_ the
same as this, with our changes also included (resolv.conf and
other minor differences).
1997-04-13 10:30:29 +00:00
mrg 2479c1a225 BIND 4.9.5-P1 resolver bits we use 1997-04-13 09:12:05 +00:00