X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgetndelim2.c;h=e1cd40af521de78527e9a1a37ac7726e974f27f0;hb=bd642010ddd06b7ced7e5a26a75c68fd828ac2bf;hp=1d5a1ef071023c9e83a10fc756e594c6acc1b3d6;hpb=82ff49b55425e14156a89f4d2ab4267409665f54;p=gnulib.git diff --git a/lib/getndelim2.c b/lib/getndelim2.c index 1d5a1ef07..e1cd40af5 100644 --- a/lib/getndelim2.c +++ b/lib/getndelim2.c @@ -4,10 +4,10 @@ Copyright (C) 1993, 1996, 1997, 1998, 2000, 2003, 2004, 2006 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + 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 @@ -15,14 +15,11 @@ 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 . */ /* Originally written by Jan Brittenson, bson@gnu.ai.mit.edu. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include #include "getndelim2.h" @@ -36,6 +33,10 @@ #include #include +#ifndef SSIZE_MAX +# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) +#endif + /* The maximum value that getndelim2 can return without suffering from overflow problems, either internally (because of pointer subtraction overflow) or due to the API (because of ssize_t). */