Commit Graph

18 Commits

Author SHA1 Message Date
agc 039cc95684 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22270, verified by myself.
2003-08-07 09:44:09 +00:00
kleink f77e77ff4b Remove whitespace accident in previous; spotted by Thomas Klausner. 2003-06-30 15:45:02 +00:00
kleink 5a44432bf1 Sprinkle some restrict. 2003-06-30 15:14:17 +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
bjh21 fac4f2f505 Header file cleanup:
* Don't include <sys/param.h>
* Assume that NetBSD is a BSD system and hence has <sys/types.h>
* inet_pton() and inet_ntop() were in XNS 5.2 (not 5.0) and POSIX 2001.
  Update #ifdefs accordingly.

XXX Types of inet_addr() and inet_makeaddr() are still wrong.
XXX Might want __restrict on inet_ntop() and inet_pton().
2003-04-29 11:58:15 +00:00
bjh21 4be7a2dcf3 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
2003-04-28 23:16:11 +00:00
kleink ba77dc646c XNS5.2/POSIX-2001: change the size argument to inet_ntop from size_t to
socklen_t.
2002-05-14 18:57:31 +00:00
bjh21 dad5e0c347 Change RCS/SCCS IDs to our usual style. 2002-04-26 15:32:45 +00:00
bjh21 2277ee229b This header needs struct in_addr from <netinet/in.h>, so include that.
POSIX-2001 says exposing the contents of <netinet/in.h> here is OK.
2002-04-26 14:56:16 +00:00
kleink 363db7b0fa Restrict function delcarations using XNS5.2 D2.0 as a reference. 1999-07-03 13:30:38 +00:00
perry d39928a203 add/cleanup multiple inclusion protection. 1998-02-10 00:25:25 +00:00
lukem 313ab54809 rcsid fascism 1997-10-13 09:26:06 +00:00
mrg 5be792e647 merge bind 4.9.5-P1. 1997-04-13 09:26:21 +00:00
mrg 3f63ba4d8a update these for bind 4.9.3-p1. 1996-02-02 15:29:18 +00:00
cgd 4d2cbfce0a new RCS ID format. 1994-10-26 00:55:40 +00:00
deraadt bc93d2c77e new resolver. changes from 4.9.2 by <paul@vix.com>, as well as a number
of features and optimizations by myself.
1994-04-07 06:58:29 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00