Link Here
|
1 |
--- src/extra/tre/tre-internal.h.orig 2015-01-20 15:25:01 UTC |
2 |
+++ src/extra/tre/tre-internal.h |
3 |
@@ -17,6 +17,7 @@ |
4 |
#include <wctype.h> |
5 |
#endif /* !HAVE_WCTYPE_H */ |
6 |
|
7 |
+#include <limits.h> |
8 |
#include <ctype.h> |
9 |
#include "tre.h" |
10 |
|
11 |
@@ -48,7 +49,11 @@ |
12 |
|
13 |
/* Wide characters. */ |
14 |
typedef wint_t tre_cint_t; |
15 |
+#if WCHAR_MAX <= INT_MAX |
16 |
#define TRE_CHAR_MAX WCHAR_MAX |
17 |
+#else /* WCHAR_MAX > INT_MAX */ |
18 |
+#define TRE_CHAR_MAX INT_MAX |
19 |
+#endif |
20 |
|
21 |
#ifdef TRE_MULTIBYTE |
22 |
#define TRE_MB_CUR_MAX MB_CUR_MAX |