summaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorJens Hamisch <jens@Strawberry.COM>2000-11-14 20:16:23 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2000-11-15 02:20:12 +0000
commitd7578b48f7f0f6fe2e06a87cf3e42a80af5a338f (patch)
treeb15e7fde02e6a43a8aeec8f77d661f9914a8c8da /utf8.h
parente8c951909ff48204642537ff8810d8cd16a0dee9 (diff)
downloadperl-d7578b48f7f0f6fe2e06a87cf3e42a80af5a338f.tar.gz
Use UINT64_C().
Subject: [ID 20001114.006] 5.7.0-7680 Solaris 8, 64 bit, utf8 patch Message-Id: <20001114191623.G20559@Strawberry.COM> p4raw-id: //depot/perl@7691
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/utf8.h b/utf8.h
index 269ad3e8a7..522f4a9d7c 100644
--- a/utf8.h
+++ b/utf8.h
@@ -9,6 +9,8 @@
START_EXTERN_C
+#include "handy.h"
+
#ifdef DOINIT
EXTCONST unsigned char PL_utf8skip[] = {
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ascii */
@@ -48,6 +50,8 @@ END_EXTERN_C
#define UTF8SKIP(s) PL_utf8skip[*(U8*)s]
+#define UTF8_QUAD_MAX UINT64_C(0x1000000000)
+
#ifdef HAS_QUAD
#define UNISKIP(uv) ( (uv) < 0x80 ? 1 : \
(uv) < 0x800 ? 2 : \
@@ -55,7 +59,7 @@ END_EXTERN_C
(uv) < 0x200000 ? 4 : \
(uv) < 0x4000000 ? 5 : \
(uv) < 0x80000000 ? 6 : \
- (uv) < 0x1000000000LL ? 7 : 13 )
+ (uv) < UTF8_QUAD_MAX ? 7 : 13 )
#else
/* No, I'm not even going to *TRY* putting #ifdef inside a #define */
#define UNISKIP(uv) ( (uv) < 0x80 ? 1 : \