X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgetndelim2.c;h=9a9e6e756ae21f588bc9cece4eb315daf8a5ac93;hb=d5f7e64df8267621f5e17b2def101343f767b86e;hp=1d5a1ef071023c9e83a10fc756e594c6acc1b3d6;hpb=82ff49b55425e14156a89f4d2ab4267409665f54;p=gnulib.git diff --git a/lib/getndelim2.c b/lib/getndelim2.c index 1d5a1ef07..9a9e6e756 100644 --- a/lib/getndelim2.c +++ b/lib/getndelim2.c @@ -20,9 +20,7 @@ /* Originally written by Jan Brittenson, bson@gnu.ai.mit.edu. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include #include "getndelim2.h" @@ -36,6 +34,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). */