Module: wine Branch: refs/heads/master Commit: 9e73da7340947390d81f035abc70d37d31c029c0 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=9e73da7340947390d81f035a...
Author: Bill Medland billmedland@mercuryspeed.com Date: Thu Apr 20 15:32:00 2006 -0700
wpp: Implement long long constant parsing.
---
libs/wpp/ppl.l | 21 ++++++++++++++++++--- 1 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/libs/wpp/ppl.l b/libs/wpp/ppl.l index 073a6ac..990fbb1 100644 --- a/libs/wpp/ppl.l +++ b/libs/wpp/ppl.l @@ -821,9 +821,24 @@ static int make_number(int radix, YYSTYP }
if(is_ll) - pp_internal_error(__FILE__, __LINE__, "long long constants not implemented yet"); - - if(is_u && is_l) + { +/* Assume as in the declaration of wrc_ull_t and wrc_sll_t */ +#if defined(SIZEOF_LONGLONG) && SIZEOF_LONGLONG >= 8 + if (is_u) + { + val->ull = strtoull(str, NULL, radix); + return tULONGLONG; + } + else + { + val->sll = strtoll(str, NULL, radix); + return tSLONGLONG; + } +#else + pp_internal_error(__FILE__, __LINE__, "long long constants not supported on this platform"); +#endif + } + else if(is_u && is_l) { val->ulong = strtoul(str, NULL, radix); return tULONG;