about summary refs log tree commit diff
path: root/src/regex
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-05-25 10:45:05 -0400
committerRich Felker <dalias@aerifal.cx>2012-05-25 10:45:05 -0400
commit8b4c232efe182f4a9c8c52c5638af8fec92987bf (patch)
treee30e472ffa08b164529dc86c294deefdfb0db377 /src/regex
parent7efd14ecc92de7ccdf0209168a4ae6b73cd9e07a (diff)
downloadmusl-8b4c232efe182f4a9c8c52c5638af8fec92987bf.tar.gz
musl-8b4c232efe182f4a9c8c52c5638af8fec92987bf.tar.xz
musl-8b4c232efe182f4a9c8c52c5638af8fec92987bf.zip
fix regex on arm
TRE has a broken assumption that wchar_t is signed, which is a sane
expectation, but not required by the standard, and false on ARM's ABI.

i leave tre_char_t as wchar_t for now, since a pointer to it is
directly passed to functions that need pointer to wchar_t. it does not
seem to break anything. and since the maximum unicode scalar value is
0x10ffff, just use that explicitly rather than using the max value of
any particular C type.
Diffstat (limited to 'src/regex')
-rw-r--r--src/regex/tre.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/regex/tre.h b/src/regex/tre.h
index d6e1c2a7..f4e5ab12 100644
--- a/src/regex/tre.h
+++ b/src/regex/tre.h
@@ -50,7 +50,7 @@ typedef wchar_t tre_char_t;
 
 /* Wide characters. */
 typedef wint_t tre_cint_t;
-#define TRE_CHAR_MAX WCHAR_MAX
+#define TRE_CHAR_MAX 0x10ffff
 
 #define tre_isalnum iswalnum
 #define tre_isalpha iswalpha