From 279c3a6961c60252f0368fdea889caf977f85fe0 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 13 May 2019 16:17:21 -0300 Subject: A few changes in tests about number of bits in integers - The preprocessor must work with at least 'long', and therefore must do shifts of up to 31 bits correctly. - Whenever possible, use unsigned types in shifts. --- lutf8lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lutf8lib.c') diff --git a/lutf8lib.c b/lutf8lib.c index 9786b60c..b4b787e7 100644 --- a/lutf8lib.c +++ b/lutf8lib.c @@ -28,7 +28,7 @@ /* ** Integer type for decoded UTF-8 values; MAXUTF needs 31 bits. */ -#if ((UINT_MAX >> 15) >> 15) >= 1 +#if (UINT_MAX >> 30) >= 1 typedef unsigned int utfint; #else typedef unsigned long utfint; -- cgit v1.2.3-55-g6feb