From: Jens Hamisch Date: Tue, 14 Nov 2000 19:16:23 +0000 (+0100) Subject: Use UINT64_C(). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d7578b48f7f0f6fe2e06a87cf3e42a80af5a338f;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/utf8.c b/utf8.c index a54726f..5d0fdc6 100644 --- a/utf8.c +++ b/utf8.c @@ -69,7 +69,7 @@ Perl_uv_to_utf8(pTHX_ U8 *d, UV uv) return d; } #ifdef HAS_QUAD - if (uv < 0x1000000000LL) + if (uv < UTF8_QUAD_MAX) #endif { *d++ = 0xfe; /* Can't match U+FEFF! */ diff --git a/utf8.h b/utf8.h index 269ad3e..522f4a9 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 : \