summaryrefslogtreecommitdiffstats
path: root/XUtils.h
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2023-11-29 17:44:20 +0100
committerBenBE <BenBE@geshi.org>2023-12-26 15:14:19 +0100
commit179aeb01082df9e7c19a285ae4d703a7714f4e2f (patch)
tree4e4c6d0ae1ba68be493025a90286c969e0fd7567 /XUtils.h
parent8980d7a896439f923861ea0810b4e4c36b757d4a (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.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/XUtils.h b/XUtils.h
index afe22112..1babb86e 100644
--- a/XUtils.h
+++ b/XUtils.h
@@ -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>

© 2014-2024 Faster IT GmbH | imprint | privacy policy