On Mon, Jan 19, 2026 at 11:05:32AM +0100, Markus Armbruster wrote:
> Our use of header guards is rather sloppy.  Sloppiness there can lead
> to confusing compilation errors.  This series cleans up existing
> header guards.  In particular, it normalizes guard symbols to follow a
> common pattern, in the hope of making clashes less likely.  It doesn't
> add new header guards.  We have more than 300 headers without a
> recognizable header guard.  A few of them are for multiple inclusion,
> many don't need header guards because they don't do anything but
> include, but quite a few probably should have one.  Left for another
> day.
> 
> Previously cleaned up in merge commit ec11dc41eec (2022), merge commit
> 01807c8b0e9 (2019), and merge commit ca3d87d4c84 (2016).

No objection to applying these fixups since you've done the work
already.

Based on the repeated cleanups, and your notes above that we still
have many problems though, can I again suggest we just adopt the
GCC/CLang extension of adding

  #pragma once

at the top of every header and burn all the #ifdefs.

It is easy & cheap to verify that it is present on every single .h file,
and there are no style variations to get wrong, or closing statements to
make inconsistent.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Reply via email to