diff options
author | Daniel Lange <DLange@git.local> | 2023-11-29 17:44:20 +0100 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2023-12-26 15:14:19 +0100 |
commit | 179aeb01082df9e7c19a285ae4d703a7714f4e2f (patch) | |
tree | 4e4c6d0ae1ba68be493025a90286c969e0fd7567 /XUtils.h | |
parent | 8980d7a896439f923861ea0810b4e4c36b757d4a (diff) |
Add includes for config.h as per the discussion in PR #1337
Many thanks to @Explorer09 Kang-Che Sung (宋岡哲).
Also add a #error stanza to XUtils.h in case somebody forgets the beautiful mess GNU forces on us.
Diffstat (limited to 'XUtils.h')
-rw-r--r-- | XUtils.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -3,11 +3,16 @@ /* htop - StringUtils.h (C) 2004-2011 Hisham H. Muhammad +(C) 2020-2023 htop dev team Released under the GNU GPLv2+, see the COPYING file in the source distribution for its full text. */ -#include "config.h" // IWYU pragma: keep +// IWYU pragma: no_include "config.h" +#ifndef PACKAGE +// strchrnul() needs _GNU_SOURCE defined, see PR #1337 for details +#error "Must have #include \"config.h\" line at the top of the file that includes these XUtils helper functions" +#endif #include <stdbool.h> #include <stdio.h> |