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.
portage
Daniel Lange 2 years ago committed by BenBE
parent 8980d7a896
commit 179aeb0108
  1. 2
      AvailableColumnsPanel.c
  2. 2
      AvailableMetersPanel.c
  3. 2
      BatteryMeter.c
  4. 2
      CategoriesPanel.c
  5. 2
      ColumnsPanel.c
  6. 2
      DiskIOMeter.c
  7. 2
      DynamicScreen.c
  8. 2
      FileDescriptorMeter.c
  9. 2
      Header.c
  10. 2
      LoadAverageMeter.c
  11. 2
      Machine.c
  12. 2
      MainPanel.c
  13. 2
      MemorySwapMeter.c
  14. 2
      NetworkIOMeter.c
  15. 2
      OptionItem.c
  16. 2
      Panel.c
  17. 2
      RichString.c
  18. 2
      Scheduling.c
  19. 2
      ScreenTabsPanel.c
  20. 2
      ScreensPanel.c
  21. 2
      Settings.c
  22. 2
      SignalsPanel.c
  23. 2
      TasksMeter.c
  24. 2
      UptimeMeter.c
  25. 2
      Vector.c
  26. 7
      XUtils.h
  27. 2
      dragonflybsd/Platform.c
  28. 2
      freebsd/FreeBSDProcess.c
  29. 2
      linux/CGroupUtils.c
  30. 2
      linux/IOPriorityPanel.c
  31. 2
      linux/LinuxProcess.c
  32. 2
      linux/PressureStallMeter.c
  33. 2
      linux/SELinuxMeter.c
  34. 2
      linux/SystemdMeter.c
  35. 2
      netbsd/NetBSDMachine.c
  36. 2
      netbsd/NetBSDProcess.c
  37. 2
      netbsd/NetBSDProcessTable.c
  38. 2
      netbsd/Platform.c
  39. 2
      openbsd/OpenBSDMachine.c
  40. 2
      openbsd/OpenBSDProcess.c
  41. 2
      openbsd/OpenBSDProcessTable.c
  42. 2
      openbsd/Platform.c
  43. 2
      pcp/InDomTable.c
  44. 2
      pcp/PCPDynamicScreen.c
  45. 2
      pcp/PCPProcess.c
  46. 2
      solaris/Platform.c
  47. 2
      zfs/ZfsCompressedArcMeter.c

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "AvailableColumnsPanel.h"
#include <assert.h>

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "AvailableMetersPanel.h"
#include <assert.h>

@ -7,6 +7,8 @@ in the source distribution for its full text.
This meter written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).
*/
#include "config.h" // IWYU pragma: keep
#include "BatteryMeter.h"
#include <math.h>

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "CategoriesPanel.h"
#include <ctype.h>

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "ColumnsPanel.h"
#include <assert.h>

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "DiskIOMeter.h"
#include <stdbool.h>

@ -6,6 +6,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "DynamicScreen.h"
#include <stdbool.h>

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "FileDescriptorMeter.h"
#include <math.h>

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "Header.h"
#include <assert.h>

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "LoadAverageMeter.h"
#include "CRT.h"

@ -6,6 +6,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "Machine.h"
#include <stdlib.h>

@ -6,6 +6,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "MainPanel.h"
#include <ctype.h>

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "MemorySwapMeter.h"
#include <assert.h>

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "NetworkIOMeter.h"
#include <stdbool.h>

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "OptionItem.h"
#include <assert.h>

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "Panel.h"
#include <assert.h>

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "RichString.h"
#include <ctype.h>

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "Scheduling.h"
#include "EnvScreen.h"

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "ScreenTabsPanel.h"
#include <ctype.h>

@ -6,6 +6,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "ScreensPanel.h"
#include <stdlib.h>

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "Settings.h"
#include <ctype.h>

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "SignalsPanel.h"
// the above contains #include <signal.h> so do not add that here again (breaks Solaris build)

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "TasksMeter.h"
#include "CRT.h"

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "UptimeMeter.h"
#include "CRT.h"

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "Vector.h"
#include <assert.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>

@ -6,6 +6,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "dragonflybsd/Platform.h"
#include <math.h>

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "freebsd/FreeBSDProcess.h"
#include <stdlib.h>

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "linux/CGroupUtils.h"
#include "XUtils.h"

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "linux/IOPriorityPanel.h"
#include <stdbool.h>

@ -6,6 +6,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "linux/LinuxProcess.h"
#include <math.h>

@ -6,6 +6,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "linux/PressureStallMeter.h"
#include <stdbool.h>

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "linux/SELinuxMeter.h"
#include "CRT.h"

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "linux/SystemdMeter.h"
#include <dlfcn.h>

@ -8,6 +8,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "netbsd/NetBSDMachine.h"
#include <kvm.h>

@ -8,6 +8,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "netbsd/NetBSDProcess.h"
#include <stdlib.h>

@ -8,6 +8,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "netbsd/NetBSDProcessTable.h"
#include <kvm.h>

@ -9,6 +9,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "netbsd/Platform.h"
#include <errno.h>

@ -6,6 +6,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "openbsd/OpenBSDMachine.h"
#include <kvm.h>

@ -6,6 +6,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "openbsd/OpenBSDProcess.h"
#include <stdlib.h>

@ -6,6 +6,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "openbsd/OpenBSDProcessTable.h"
#include <kvm.h>

@ -6,6 +6,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "openbsd/Platform.h"
#include <errno.h>

@ -6,6 +6,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "InDomTable.h"
#include <assert.h>

@ -6,6 +6,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "pcp/PCPDynamicScreen.h"
#include <ctype.h>

@ -7,6 +7,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "pcp/PCPProcess.h"
#include <math.h>

@ -7,6 +7,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "solaris/Platform.h"
#include <kstat.h>

@ -5,6 +5,8 @@ Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
#include "zfs/ZfsCompressedArcMeter.h"
#include <stddef.h>

Loading…
Cancel
Save