mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 03:50:21 +00:00
wpp: Implement long long constant parsing.
This commit is contained in:
parent
2dca5f959f
commit
9e73da7340
|
@ -821,9 +821,24 @@ static int make_number(int radix, YYSTYPE *val, const char *str, int len)
|
|||
}
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue