* lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 21 Oct 2006 21:56:08 +0000 (21:56 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 21 Oct 2006 21:56:08 +0000 (21:56 +0000)
uses.

ChangeLog
lib/getndelim2.c

index e5ffa57..11c0564 100644 (file)
--- 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
index 453fd38..9a9e6e7 100644 (file)
@@ -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