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

Use #pragma once in header files #201

Merged
merged 1 commit into from
Feb 19, 2024
Merged

Conversation

hughsie
Copy link
Contributor

@hughsie hughsie commented Jan 23, 2024

All compilers have supported this for at least the 5 years, some like gcc and clang much longer.

All compilers have supported this for at least the 5 years, some like gcc and
clang much longer.

Signed-off-by: Richard Hughes <richard@hughsie.com>
@vathpela
Copy link
Contributor

I'm a bit concerned with replacing a well known and understood pattern with a pragma that has been "supported" for years but is completely undocumented. What do we gain?

@hughsie
Copy link
Contributor Author

hughsie commented Jan 23, 2024

What do we gain?

Not much -- but it modernizes the codebase and means we can add extra .h files for things like the test suite without verifying the define is duplicate. Having a non-local define like EFI_H looks really sketchy. Even GNOME projects before the migration to once used constructs like __EFI_H

@vathpela vathpela merged commit 9cbf722 into rhboot:main Feb 19, 2024
2 checks passed
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.

None yet

2 participants