forked from mpaland/printf
-
Notifications
You must be signed in to change notification settings - Fork 58
Closed
Labels
platform-incompatibilityThe library is making assumptions causing it to fail on platforms where they do not hold.The library is making assumptions causing it to fail on platforms where they do not hold.resolved-on-developA changeset fixing this issue has been commiutted to the development branchA changeset fixing this issue has been commiutted to the development branch
Description
As noted in README.md:
The implementation currently assumes each of intmax_t, signed size_t, and ptrdiff_t has the same size as long int or as long long int. If this is not the case for your platform, please open an issue.
With msp430-elf-gcc for the 16-bit msp430 microcontroller sizeof(size_t) == 2
, which is the same as int
and not as long
(sizeof(long) == 4
). A change like this should be portable and fixes the issue (intmax_t
and ptrdiff_t
will need similar changes):
flags |= sizeof(size_t) <= sizeof(int) ? FLAGS_INT : sizeof(size_t) == sizeof(long) ? FLAGS_LONG : FLAGS_LONG_LONG;
Metadata
Metadata
Assignees
Labels
platform-incompatibilityThe library is making assumptions causing it to fail on platforms where they do not hold.The library is making assumptions causing it to fail on platforms where they do not hold.resolved-on-developA changeset fixing this issue has been commiutted to the development branchA changeset fixing this issue has been commiutted to the development branch