Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firmware: support compiling on SDCC >=4.0.3 #70

Merged
merged 1 commit into from
Mar 22, 2022

Conversation

neggles
Copy link
Contributor

@neggles neggles commented Dec 28, 2021

Hi, as per issue #67 the SDCC compiler renamed _itoa, _uitoa, _ltoa and _ultoa to __itoa, __uitoa, __ltoa and __ultoa respectively.

This patch converts the only two calls I can find (both in printfl.c) to the new __ syntax, and adds a few preprocessor directives to compiler_defs.h to alias the __ versions to their old names in revisions of SDCC below the point where this was changed.

If it's desirable to maintain compatibility with compilers other than sdcc it may be worth doing this the other way around, or with a proper macro - happy to change that if you like - but this way seemed the least fraught with peril.

This builds with both SDCC 4.1.0 (latest release) and SDCC 3.8.0 (current Ubuntu Focal package) based on my own testing.

@tridge
Copy link
Contributor

tridge commented Mar 22, 2022

looks good, thanks!

@tridge tridge merged commit 7276fb9 into ArduPilot:master Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants