ports/math/R/files/patch-src_extra_tre_tre-internal.h
Wen Heping f7139079e1 - Update to 3.2.2
PR:		203418
Submitted by:	wen@(myself)
Reviewed by:	tota@
Approved by:	maintainer(timeout, > 25 days)
Thanks to:	freebsd-bugs@mackler.org harrison.grundy@astrodoggroup.com
2015-10-27 08:21:25 +00:00

22 lines
487 B
C

--- src/extra/tre/tre-internal.h.orig 2014-06-13 22:15:07 UTC
+++ src/extra/tre/tre-internal.h
@@ -17,6 +17,7 @@
#include <wctype.h>
#endif /* !HAVE_WCTYPE_H */
+#include <limits.h>
#include <ctype.h>
#include "tre.h"
@@ -48,7 +49,11 @@
/* Wide characters. */
typedef wint_t tre_cint_t;
+#if WCHAR_MAX <= INT_MAX
#define TRE_CHAR_MAX WCHAR_MAX
+#else /* WCHAR_MAX > INT_MAX */
+#define TRE_CHAR_MAX INT_MAX
+#endif
#ifdef TRE_MULTIBYTE
#define TRE_MB_CUR_MAX MB_CUR_MAX