diff options
Diffstat (limited to 'resolv/inet_addr.c')
-rw-r--r-- | resolv/inet_addr.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/resolv/inet_addr.c b/resolv/inet_addr.c index 83f2ec6..b52e404 100644 --- a/resolv/inet_addr.c +++ b/resolv/inet_addr.c @@ -1,7 +1,7 @@ /* * Copyright (c) 1983, 1990, 1993 * The Regents of the University of California. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -13,7 +13,7 @@ * 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. - * + * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -29,14 +29,14 @@ /* * Portions Copyright (c) 1993 by Digital Equipment Corporation. - * + * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies, and that * the name of Digital Equipment Corporation not be used in advertising or * publicity pertaining to distribution of the document or software without * specific, written prior permission. - * + * * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT @@ -98,7 +98,7 @@ inet_addr(const char *cp) { return (INADDR_NONE); } -/* +/* * Check whether "cp" is a valid ascii representation * of an Internet address and convert to a binary address. * Returns 1 if the address is valid, 0 if not. @@ -106,7 +106,8 @@ inet_addr(const char *cp) { * cannot distinguish between failure and a local broadcast address. */ in_addr_t -__inet_aton(const char *cp, struct in_addr *addr) { +__inet_aton(const char *cp, struct in_addr *addr) +{ static const in_addr_t max[4] = { 0xffffffff, 0xffffff, 0xffff, 0xff }; in_addr_t val; #ifndef _LIBC @@ -221,3 +222,5 @@ ret_0: return (0); } weak_alias (__inet_aton, inet_aton) +libc_hidden_def (__inet_aton) +libc_hidden_weak (inet_aton) |