bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

getndelim2 on mingw


From: Bruno Haible
Subject: getndelim2 on mingw
Date: Fri, 20 Oct 2006 21:58:57 +0200
User-agent: KMail/1.9.1

This fixes a compilation error on mingw. I applied it.
getndelim2.c: In function `getndelim2':
getndelim2.c:91: error: `SSIZE_MAX' undeclared (first use in this function)



2006-10-19  Bruno Haible  <address@hidden>

        * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
        for mingw.

*** getndelim2.c.bak    2006-09-19 00:51:16.000000000 +0200
--- getndelim2.c        2006-10-20 03:54:46.000000000 +0200
***************
*** 34,39 ****
--- 34,44 ----
  #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).  */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]