- (dtucker) [openbsd-compat/inet_aton.c] Update from OpenBSD 1.7 -> 1.9.

This commit is contained in:
Darren Tucker 2005-11-10 17:21:21 +11:00
parent 0a149d19d3
commit c7e05d679a
2 changed files with 9 additions and 18 deletions

View File

@ -32,6 +32,7 @@
- (dtucker) [openbsd-compat/getcwd.c] Update from OpenBSD 1.9 -> 1.14.
- (dtucker) [openbsd-compat/getcwd.c] Replace lstat with fstat to match up
with OpenBSD code since we don't support platforms without fstat any more.
- (dtucker) [openbsd-compat/inet_aton.c] Update from OpenBSD 1.7 -> 1.9.
20051105
- (djm) OpenBSD CVS Sync
@ -3274,4 +3275,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
$Id: ChangeLog,v 1.3974 2005/11/10 06:15:06 dtucker Exp $
$Id: ChangeLog,v 1.3975 2005/11/10 06:21:21 dtucker Exp $

View File

@ -1,4 +1,4 @@
/* $OpenBSD: inet_addr.c,v 1.7 2003/06/02 20:18:35 millert Exp $ */
/* $OpenBSD: inet_addr.c,v 1.9 2005/08/06 20:30:03 espie Exp $ */
/*
* Copyright (c) 1983, 1990, 1993
@ -55,15 +55,6 @@
#if !defined(HAVE_INET_ATON)
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
static char rcsid[] = "$From: inet_addr.c,v 8.5 1996/08/05 08:31:35 vixie Exp $";
#else
static char rcsid[] = "$OpenBSD: inet_addr.c,v 1.7 2003/06/02 20:18:35 millert Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <sys/param.h>
#include <netinet/in.h>
@ -76,8 +67,7 @@ static char rcsid[] = "$OpenBSD: inet_addr.c,v 1.7 2003/06/02 20:18:35 millert E
* The value returned is in network order.
*/
in_addr_t
inet_addr(cp)
register const char *cp;
inet_addr(const char *cp)
{
struct in_addr val;
@ -97,11 +87,11 @@ inet_addr(cp)
int
inet_aton(const char *cp, struct in_addr *addr)
{
register u_int32_t val;
register int base, n;
register char c;
unsigned int parts[4];
register unsigned int *pp = parts;
u_int32_t val;
int base, n;
char c;
u_int parts[4];
u_int *pp = parts;
c = *cp;
for (;;) {