mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
Tue Aug 22 16:49:12 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* inet/netdb.h: Moved to resolv. * inet/Makefile (headers): Remove netdb.h. * resolv/Makefile (headers): Add netdb.h. * resolv/gethnamaddr.c, resolv/inet_addr.c, resolv/netdb.h, resolv/res_send.c: Updated from BIND-4.9.3-BETA26. * hurd/thread-cancel.c: If SS->cancel_hook is not null, call it before resuming the thread. * hurd/hurd/signal.h (struct hurd_sigstate): New member `cancel_hook'. * hurd/Makefile: Removed dep on hurd/signal.h for RPC stub objects. Mon Aug 21 16:37:09 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * sysdeps/i386/dl-machine.h (elf_machine_rel): Grok R_386_NONE relocs, and do nothing. Why the linker generates them we may never know. * sysdeps/mach/hurd/i386/intr-msg.h: New file.
This commit is contained in:
@@ -66,10 +66,6 @@ static char rcsid[] = "$Id$";
|
||||
|
||||
/* these are compatibility routines, not needed on recent BSD releases */
|
||||
|
||||
#ifndef NEED_INETADDR
|
||||
int __inet_addr_unneeded__;
|
||||
#else
|
||||
|
||||
/*
|
||||
* Ascii internet address interpretation routine.
|
||||
* The value returned is in network order.
|
||||
@@ -84,11 +80,6 @@ inet_addr(cp)
|
||||
return (val.s_addr);
|
||||
return (INADDR_NONE);
|
||||
}
|
||||
#endif /*NEED_INETADDR*/
|
||||
|
||||
#ifndef NEED_INETATON
|
||||
int __inet_aton_unneeded__;
|
||||
#else
|
||||
|
||||
/*
|
||||
* Check whether "cp" is a valid ascii representation
|
||||
@@ -113,8 +104,10 @@ inet_aton(cp, addr)
|
||||
/*
|
||||
* Collect number up to ``.''.
|
||||
* Values are specified as for C:
|
||||
* 0x=hex, 0=octal, other=decimal.
|
||||
* 0x=hex, 0=octal, isdigit=decimal.
|
||||
*/
|
||||
if (!isdigit(c))
|
||||
return (0);
|
||||
val = 0; base = 10;
|
||||
if (c == '0') {
|
||||
c = *++cp;
|
||||
@@ -123,7 +116,7 @@ inet_aton(cp, addr)
|
||||
else
|
||||
base = 8;
|
||||
}
|
||||
while (c != '\0') {
|
||||
for (;;) {
|
||||
if (isascii(c) && isdigit(c)) {
|
||||
val = (val * base) + (c - '0');
|
||||
c = *++cp;
|
||||
@@ -141,7 +134,7 @@ inet_aton(cp, addr)
|
||||
* a.b.c (with c treated as 16 bits)
|
||||
* a.b (with b treated as 24 bits)
|
||||
*/
|
||||
if (pp >= parts + 3 || val > 0xff)
|
||||
if (pp >= parts + 3)
|
||||
return (0);
|
||||
*pp++ = val;
|
||||
c = *++cp;
|
||||
@@ -151,7 +144,7 @@ inet_aton(cp, addr)
|
||||
/*
|
||||
* Check for trailing characters.
|
||||
*/
|
||||
if (c && (!isascii(c) || (!isspace(c) && !ispunct(c))))
|
||||
if (c != '\0' && (!isascii(c) || !isspace(c)))
|
||||
return (0);
|
||||
/*
|
||||
* Concoct the address according to
|
||||
@@ -188,4 +181,3 @@ inet_aton(cp, addr)
|
||||
addr->s_addr = htonl(val);
|
||||
return (1);
|
||||
}
|
||||
#endif /*NEED_INETATON*/
|
||||
|
Reference in New Issue
Block a user