projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
565613e
)
Make getndelim2 compile on mingw.
author
Bruno Haible
<bruno@clisp.org>
Fri, 20 Oct 2006 19:59:49 +0000
(19:59 +0000)
committer
Bruno Haible
<bruno@clisp.org>
Fri, 20 Oct 2006 19:59:49 +0000
(19:59 +0000)
ChangeLog
patch
|
blob
|
history
lib/getndelim2.c
patch
|
blob
|
history
diff --git
a/ChangeLog
b/ChangeLog
index 1a54b47c0083331fdce67cfea143dc4bc86c388b..e5ffa57f8509442e8a78a38f76e506220c3b43a8 100644
(file)
--- a/
ChangeLog
+++ b/
ChangeLog
@@
-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.
2006-10-19 Bruno Haible <bruno@clisp.org>
* lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
diff --git
a/lib/getndelim2.c
b/lib/getndelim2.c
index 46721e751b7779315790f14760964ee679052eb3..453fd3835f43a4ed1aa0c5867a4bb8138155b698 100644
(file)
--- a/
lib/getndelim2.c
+++ b/
lib/getndelim2.c
@@
-34,6
+34,11
@@
#include <limits.h>
#include <stdint.h>
#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). */
/* 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). */