rhboot / efibootmgr

efibootmgr development tree
GNU General Public License v2.0
519 stars 98 forks source link

Use #pragma once in header files #201

Closed hughsie closed 8 months ago

hughsie commented 9 months ago

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

vathpela commented 9 months ago

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 commented 9 months ago

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