[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getndelim2 on mingw
From: |
Paul Eggert |
Subject: |
Re: getndelim2 on mingw |
Date: |
Sat, 21 Oct 2006 14:58:00 -0700 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
Bruno Haible <address@hidden> writes:
> + /* 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
A small point: getdelim.c and other modules already define SSIZE_MAX
in a different way, and we might as well be consistent. I installed
this:
2006-10-21 Paul Eggert <address@hidden>
* lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
uses.
--- lib/getndelim2.c 20 Oct 2006 19:59:49 -0000 1.14
+++ lib/getndelim2.c 21 Oct 2006 21:55:50 -0000
@@ -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