diff options
Diffstat (limited to 'lib/libc/resolv/res_comp.c')
-rw-r--r-- | lib/libc/resolv/res_comp.c | 53 |
1 files changed, 29 insertions, 24 deletions
diff --git a/lib/libc/resolv/res_comp.c b/lib/libc/resolv/res_comp.c index 4dc3c2a..076e303 100644 --- a/lib/libc/resolv/res_comp.c +++ b/lib/libc/resolv/res_comp.c @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. @@ -70,8 +66,10 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: res_comp.c,v 1.3.18.2 2005/07/28 07:38:11 marka Exp $"; +static const char rcsid[] = "$Id: res_comp.c,v 1.1.2.1.4.2 2005/07/28 07:43:22 marka Exp $"; #endif /* LIBC_SCCS and not lint */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); #include "port_before.h" #include <sys/types.h> @@ -85,13 +83,12 @@ static const char rcsid[] = "$Id: res_comp.c,v 1.3.18.2 2005/07/28 07:38:11 mark #include <unistd.h> #include "port_after.h" -/*% +/* * Expand compressed domain name 'src' to full domain name. - * - * \li 'msg' is a pointer to the begining of the message, - * \li 'eom' points to the first location after the message, - * \li 'dst' is a pointer to a buffer of size 'dstsiz' for the result. - * \li Return size of compressed name or -1 if there was an error. + * 'msg' is a pointer to the begining of the message, + * 'eom' points to the first location after the message, + * 'dst' is a pointer to a buffer of size 'dstsiz' for the result. + * Return size of compressed name or -1 if there was an error. */ int dn_expand(const u_char *msg, const u_char *eom, const u_char *src, @@ -104,11 +101,10 @@ dn_expand(const u_char *msg, const u_char *eom, const u_char *src, return (n); } -/*% +/* * Pack domain name 'exp_dn' in presentation form into 'comp_dn'. - * - * \li Return the size of the compressed name or -1. - * \li 'length' is the size of the array pointed to by 'comp_dn'. + * Return the size of the compressed name or -1. + * 'length' is the size of the array pointed to by 'comp_dn'. */ int dn_comp(const char *src, u_char *dst, int dstsiz, @@ -119,7 +115,7 @@ dn_comp(const char *src, u_char *dst, int dstsiz, (const u_char **)lastdnptr)); } -/*% +/* * Skip over a compressed domain name. Return the size or -1. */ int @@ -131,9 +127,11 @@ dn_skipname(const u_char *ptr, const u_char *eom) { return (ptr - saveptr); } -/*% +/* * Verify that a domain name uses an acceptable character set. - * + */ + +/* * Note the conspicuous absence of ctype macros in these definitions. On * non-ASCII hosts, we can't depend on string literals or ctype macros to * tell us anything about network-format data. The rest of the BIND system @@ -176,7 +174,7 @@ res_hnok(const char *dn) { return (1); } -/*% +/* * hostname-like (A, MX, WKS) owners can have "*" as their first label * but must otherwise be as a host name. */ @@ -191,7 +189,7 @@ res_ownok(const char *dn) { return (res_hnok(dn)); } -/*% +/* * SOA RNAMEs and RP RNAMEs can have any printable character in their first * label, but the rest of the name has to look like a host name. */ @@ -219,8 +217,8 @@ res_mailok(const char *dn) { return (0); } -/*% - * This function is quite liberal, since RFC1034's character sets are only +/* + * This function is quite liberal, since RFC 1034's character sets are only * recommendations. */ int @@ -234,7 +232,7 @@ res_dnok(const char *dn) { } #ifdef BIND_4_COMPAT -/*% +/* * This module must export the following externally-visible symbols: * ___putlong * ___putshort @@ -262,4 +260,11 @@ u_int16_t _getshort(const u_char *src) { return (ns_get16(src)); } #endif /*__ultrix__*/ #endif /*BIND_4_COMPAT*/ -/*! \file */ +/* + * Weak aliases for applications that use certain private entry points, + * and fail to include <resolv.h>. + */ +#undef dn_comp +__weak_reference(__dn_comp, dn_comp); +#undef dn_expand +__weak_reference(__dn_expand, dn_expand); |