X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fmware%2Fformatwr.c;h=7293c4dc7a0b4f624314b83a2de072f0f02ee97b;hb=77958b8e9d27594aa22e76132b4bbb8d0335bfc2;hp=996f8df04c5e7562d100f5760a86765cb8c15eb5;hpb=6b98b0991528daa601e3b732b92c343d2752749f;p=bertos.git diff --git a/bertos/mware/formatwr.c b/bertos/mware/formatwr.c index 996f8df0..7293c4dc 100644 --- a/bertos/mware/formatwr.c +++ b/bertos/mware/formatwr.c @@ -505,14 +505,21 @@ NEXT_FLAG: { case 'l': case 'L': + #if SIZEOF_SIZE_T == SIZEOF_LONG case 'z': flags.l_L_modifier = true; + #elif SIZEOF_SIZE_T == SIZEOF_INT + flags.l_L_modifier = true; + case 'z': + #endif format++; break; + case 'h': flags.h_modifier = true; format++; break; + } /* @@ -853,10 +860,13 @@ FLOATING_CONVERSION: switch (PGM_READ_CHAR(format)) { case 'l': + #if SIZEOF_SIZE_T == SIZEOF_LONG case 'z': - /* for the 'z' modifier, we make this assumption */ - STATIC_ASSERT(sizeof(size_t) == sizeof(long)); l_modifier = true; + #elif SIZEOF_SIZE_T == SIZEOF_INT + l_modifier = true; + case 'z': + #endif format++; break;