summaryrefslogtreecommitdiff
path: root/app-text/openjade/files/openjade-1.3.2-wchar_t-uint.patch
blob: 62dcb02cd2ecdebfadf269dc159afe7d78641bc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
This fixes Cygwin, where wchar_t is ushort.

--- grove/Node.h
+++ grove/Node.h
@@ -8,6 +8,7 @@
 #endif
 
 #include <stddef.h>
+#include <limits.h>
 #include "IList.h"
 
 #ifdef SP_USE_DLL
@@ -34,10 +35,10 @@
 #endif
 
 #ifdef SP_MULTI_BYTE
-#ifdef SP_WCHAR_T_USHORT
-typedef wchar_t GroveChar;
-#else
+#if UINT_MAX >= 0xffffffffL /* 2^32 - 1 */
 typedef unsigned int GroveChar;
+#else
+typedef unsigned long GroveChar;
 #endif
 #else /* not SP_MULTI_BYTE */
 typedef unsigned char GroveChar;