Mercurial > hg > th-libs
diff th_printf.c @ 725:5c8936e326d6
On 64bit 'l' printf specifier is 64bit, on 32bit 'll' is 64bit.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 18 Oct 2021 01:56:55 +0300 |
parents | 4ca6a3b30fe8 |
children | 29e44a58bc73 |
line wrap: on
line diff
--- a/th_printf.c Mon Oct 18 01:56:09 2021 +0300 +++ b/th_printf.c Mon Oct 18 01:56:55 2021 +0300 @@ -499,13 +499,18 @@ switch (*fmt) { case 'l': - if (*++fmt == 'l') + fmt++; + if (*fmt == 'l') { f_flags |= TH_PF_LONGLONG; fmt++; } else +#if TH_ARCH == 64 + f_flags |= TH_PF_LONGLONG; +#else f_flags |= TH_PF_LONG; +#endif break; case 'L':