diff options
author | Jim Blandy <jimb@red-bean.com> | 1998-10-03 09:12:12 +0000 |
---|---|---|
committer | Jim Blandy <jimb@red-bean.com> | 1998-10-03 09:12:12 +0000 |
commit | 7b2d5454344e5748485a3c94201dbfd983bf65d4 (patch) | |
tree | 6bec72c515d9bcf0280bea10aaa9918e7b9bec24 | |
parent | a844424977fc16f5bdf60fba126aec864c8e9016 (diff) | |
download | guile-7b2d5454344e5748485a3c94201dbfd983bf65d4.tar.gz |
* inet_aton.c (inet_aton): Add prototype, to remove compiler
warning. (Thanks to Robert Pluim.)
* inet_aton.c (inet_aton): Reassure the compiler that the
arguments to the <ctype.h> macros are all unsigned characters, not
signed characters.
-rw-r--r-- | libguile/inet_aton.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/libguile/inet_aton.c b/libguile/inet_aton.c index 1d02af5e5..88c5d8a73 100644 --- a/libguile/inet_aton.c +++ b/libguile/inet_aton.c @@ -60,21 +60,26 @@ inet_addr(cp) #endif +/* We provide this prototype to avoid compiler warnings. If this ever + conflicts with a declaration in a system header file, we'll find + out, because we should include that header file here. */ +int inet_aton (const char *cp, struct in_addr *addr); + /* * 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. * This replaces inet_addr, the return value from which - * cannot distinguish between failure and a local broadcast address. - */ + * cannot distinguish between failure and a local broadcast address. */ int -inet_aton(cp, addr) - register const char *cp; +inet_aton(cp_arg, addr) + const char *cp_arg; struct in_addr *addr; { register unsigned long val; register int base, n; - register char c; + register unsigned char c; + register unsigned const char *cp = cp_arg; unsigned int parts[4]; register unsigned int *pp = parts; |