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

Backport 2.28: mbedtls/platform.h: Avoid potential macro redefinition warnings. #7636

Merged
merged 1 commit into from
May 23, 2023

Conversation

ucko
Copy link
Contributor

@ucko ucko commented May 22, 2023

Some identifiers (e.g. mbedtls_free) can name either functions or macros depending on configuration settings. For those that turn out to name macros, first clear out any existing macro definitions to accommodate possible unconditional bulk symbol renaming. (There remains no standard provision for such renaming, but it's nevertheless straightforward enough to do as desired, particularly with this change in place.)

Description

Backport of #6943.

PR checklist

Please tick as appropriate and edit the reasons (e.g.: "backport: not needed because this is a new feature")

  • changelog provided, or not required
  • backport done, or not required
  • tests provided, or not required

Notes for the submitter

Please refer to the contributing guidelines, especially the
checklist for PR contributors.

Some identifiers (e.g. mbedtls_free) can name either functions or
macros depending on configuration settings.  For those that turn out
to name macros, first clear out any existing macro definitions to
accommodate possible unconditional bulk symbol renaming.  (There
remains no standard provision for such renaming, but it's nevertheless
straightforward enough to do as desired, particularly with this change
in place.)

Signed-off-by: Aaron M. Ucko <[email protected]>
@tom-daubney-arm tom-daubney-arm added enhancement component-platform Portability layer and build scripts size-s Estimated task size: small (~2d) priority-medium Medium priority - this can be reviewed as time permits needs-ci Needs to pass CI tests labels May 22, 2023
@tom-daubney-arm tom-daubney-arm self-requested a review May 22, 2023 14:15
@gilles-peskine-arm gilles-peskine-arm changed the title mbedtls/platform.h: Avoid potential macro redefinition warnings. Backport 2.28: mbedtls/platform.h: Avoid potential macro redefinition warnings. May 22, 2023
@daverodgman daverodgman added needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review single-reviewer This PR qualifies for having only one reviewer and removed needs-ci Needs to pass CI tests labels May 23, 2023
@daverodgman daverodgman merged commit 45350b6 into Mbed-TLS:mbedtls-2.28 May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-platform Portability layer and build scripts enhancement needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review priority-medium Medium priority - this can be reviewed as time permits single-reviewer This PR qualifies for having only one reviewer size-s Estimated task size: small (~2d)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants