Mercurial > hg > octave-nkf > gnulib-hg
changeset 7539:84cd79e074c1
* lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
uses.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Sat, 21 Oct 2006 21:56:08 +0000 |
parents | a75213853379 |
children | 62249b8c227f |
files | ChangeLog lib/getndelim2.c |
diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-10-21 Paul Eggert <eggert@cs.ucla.edu> + + * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c + uses. + 2006-10-19 Bruno Haible <bruno@clisp.org> * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
--- a/lib/getndelim2.c +++ b/lib/getndelim2.c @@ -34,9 +34,8 @@ #include <limits.h> #include <stdint.h> -/* Mingw doesn't have SSIZE_MAX. */ #ifndef SSIZE_MAX -# define SSIZE_MAX ((((ssize_t)1 << (sizeof (ssize_t) * CHAR_BIT - 2)) - 1) * 2 + 1) +# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) #endif /* The maximum value that getndelim2 can return without suffering from