X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Finet_pton.c;h=a9c9bafdef18fc307bc4c6fe71a3ab49c8427cd3;hb=c74c2411db5f3bf06848008c0d121a23fd31cf91;hp=39c08692b4f924395aa6740910bb77065e2c8278;hpb=718b0598a7e9f5e9bdf3efc7e91e69a78e465327;p=gnulib.git diff --git a/lib/inet_pton.c b/lib/inet_pton.c index 39c08692b..a9c9bafde 100644 --- a/lib/inet_pton.c +++ b/lib/inet_pton.c @@ -1,10 +1,11 @@ /* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form - Copyright (c) 2006 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -12,8 +13,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program. If not, see . */ /* * Copyright (c) 1996,1999 by Internet Software Consortium. @@ -32,21 +32,15 @@ * SOFTWARE. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include /* Specification. */ -#include "inet_pton.h" +#include -#include +#include #include #include -#ifndef EAFNOSUPPORT -# define EAFNOSUPPORT EINVAL -#endif - #define NS_INADDRSZ 4 #define NS_IN6ADDRSZ 16 #define NS_INT16SZ 2 @@ -181,7 +175,7 @@ inet_pton6 (const char *restrict src, unsigned char *restrict dst) curtok = src; saw_xdigit = 0; val = 0; - while ((ch = tolower (*src++)) != '\0') + while ((ch = c_tolower (*src++)) != '\0') { const char *pch;