Mercurial > gnulib
changeset 27229:73aecf36875e
Make getndelim2 compile on mingw.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Fri, 20 Oct 2006 19:59:49 +0000 |
parents | a61983e816b3 |
children | b1e9085d3b67 |
files | ChangeLog lib/getndelim2.c |
diffstat | 2 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Oct 20 19:38:02 2006 +0000 +++ b/ChangeLog Fri Oct 20 19:59:49 2006 +0000 @@ -1,3 +1,8 @@ +2006-10-19 Bruno Haible <bruno@clisp.org> + + * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed + for mingw. + 2006-10-19 Bruno Haible <bruno@clisp.org> * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
--- a/lib/getndelim2.c Fri Oct 20 19:38:02 2006 +0000 +++ b/lib/getndelim2.c Fri Oct 20 19:59:49 2006 +0000 @@ -34,6 +34,11 @@ #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) +#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). */