diff --git a/librz/analysis/block.c b/librz/analysis/block.c index 936ebcb29bd..b15866518e7 100644 --- a/librz/analysis/block.c +++ b/librz/analysis/block.c @@ -4,7 +4,7 @@ #include #include -#include +#include #include #define unwrap(rbnode) ((rbnode) ? container_of(rbnode, RzAnalysisBlock, _rb) : NULL) diff --git a/librz/analysis/p/analysis_arm_cs.c b/librz/analysis/p/analysis_arm_cs.c index 5ee9180dc42..d3f41565ef4 100644 --- a/librz/analysis/p/analysis_arm_cs.c +++ b/librz/analysis/p/analysis_arm_cs.c @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include #include diff --git a/librz/asm/arch/arm/arm_it.h b/librz/asm/arch/arm/arm_it.h index 42304db84eb..183d6efa42d 100644 --- a/librz/asm/arch/arm/arm_it.h +++ b/librz/asm/arch/arm/arm_it.h @@ -11,7 +11,7 @@ */ #include -#include +#include #include typedef struct rz_arm_it_context_t { diff --git a/librz/asm/p/asm_arm_cs.c b/librz/asm/p/asm_arm_cs.c index 8aa682513d4..4151d32eb35 100644 --- a/librz/asm/p/asm_arm_cs.c +++ b/librz/asm/p/asm_arm_cs.c @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include "../arch/arm/asm-arm.h" #include "../arch/arm/arm_it.h" diff --git a/librz/bin/format/coff/coff.h b/librz/bin/format/coff/coff.h index 1a17f120ec8..6d7b5e3fddf 100644 --- a/librz/bin/format/coff/coff.h +++ b/librz/bin/format/coff/coff.h @@ -8,8 +8,8 @@ #include #include #include -#include -#include +#include +#include #define COFF_IS_BIG_ENDIAN 1 #define COFF_IS_LITTLE_ENDIAN 0 diff --git a/librz/bin/format/coff/coff_reloc.c b/librz/bin/format/coff/coff_reloc.c index c1839e4fcc9..af3a7a85599 100644 --- a/librz/bin/format/coff/coff_reloc.c +++ b/librz/bin/format/coff/coff_reloc.c @@ -3,7 +3,7 @@ #include "coff.h" #include -#include +#include /// base vaddr where to map the artificial reloc target vfile RZ_API ut64 rz_coff_get_reloc_targets_map_base(struct rz_bin_coff_obj *obj) { diff --git a/librz/bin/format/elf/elf_dynamic.h b/librz/bin/format/elf/elf_dynamic.h index 4fb946adf4b..d350ef19a44 100644 --- a/librz/bin/format/elf/elf_dynamic.h +++ b/librz/bin/format/elf/elf_dynamic.h @@ -3,7 +3,7 @@ // SPDX-License-Identifier: LGPL-3.0-only #include "elf.h" -#include +#include #ifndef _INCLUDE_ELF_DYNAMIC_H_ #define _INCLUDE_ELF_DYNAMIC_H_ diff --git a/librz/bin/format/elf/elf_relocs.c b/librz/bin/format/elf/elf_relocs.c index a6850ab5655..4ddfc5ec519 100644 --- a/librz/bin/format/elf/elf_relocs.c +++ b/librz/bin/format/elf/elf_relocs.c @@ -5,7 +5,7 @@ // SPDX-License-Identifier: LGPL-3.0-only #include "elf.h" -#include +#include struct relocs_segment { ut64 offset; diff --git a/librz/bin/format/elf/elf_symbols.c b/librz/bin/format/elf/elf_symbols.c index 7fe5083f417..6eabfb4ab56 100644 --- a/librz/bin/format/elf/elf_symbols.c +++ b/librz/bin/format/elf/elf_symbols.c @@ -5,7 +5,7 @@ // SPDX-License-Identifier: LGPL-3.0-only #include "elf.h" -#include +#include #define HASH_NCHAIN_OFFSET(x) ((x) + 4) diff --git a/librz/bin/format/mach0/dyldcache.c b/librz/bin/format/mach0/dyldcache.c index 1b967b57808..bc8a6f2007c 100644 --- a/librz/bin/format/mach0/dyldcache.c +++ b/librz/bin/format/mach0/dyldcache.c @@ -6,7 +6,7 @@ #include "dyldcache.h" -#include +#include #define MAX_N_HDR 16 diff --git a/librz/bin/format/mach0/dyldcache.h b/librz/bin/format/mach0/dyldcache.h index 9643769ab70..ed426f0af1e 100644 --- a/librz/bin/format/mach0/dyldcache.h +++ b/librz/bin/format/mach0/dyldcache.h @@ -6,7 +6,7 @@ #define RZ_BIN_FORMAT_DYLDCACHE_H #include -#include +#include #define RZ_BIN_MACH064 1 diff --git a/librz/bin/format/mach0/mach0_relocs.c b/librz/bin/format/mach0/mach0_relocs.c index 0a53b1a2d05..fa91e89b9da 100644 --- a/librz/bin/format/mach0/mach0_relocs.c +++ b/librz/bin/format/mach0/mach0_relocs.c @@ -6,7 +6,7 @@ #include #include "mach0.h" -#include +#include #include "mach0_utils.inc" diff --git a/librz/bin/format/pe/pe_rsrc.c b/librz/bin/format/pe/pe_rsrc.c index 31b8ca765e6..bcaf8911230 100644 --- a/librz/bin/format/pe/pe_rsrc.c +++ b/librz/bin/format/pe/pe_rsrc.c @@ -4,7 +4,7 @@ // SPDX-License-Identifier: LGPL-3.0-only #include "pe.h" -#include +#include static void _free_resource(rz_pe_resource *rs) { if (rs) { diff --git a/librz/bin/p/bin_coff.c b/librz/bin/p/bin_coff.c index ef17b53c9f3..b446d25a9a0 100644 --- a/librz/bin/p/bin_coff.c +++ b/librz/bin/p/bin_coff.c @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include "coff/coff.h" diff --git a/librz/bin/p/bin_elf.inc b/librz/bin/p/bin_elf.inc index 7a2074d3f7a..8a4b94b4b5d 100644 --- a/librz/bin/p/bin_elf.inc +++ b/librz/bin/p/bin_elf.inc @@ -13,7 +13,7 @@ #include #include "../i/private.h" #include "elf/elf.h" -#include +#include #define rz_bin_file_get_elf(bf) ((ELFOBJ *)bf->o->bin_obj) diff --git a/librz/bin/p/bin_mach0.c b/librz/bin/p/bin_mach0.c index 9954a0bdb54..490857b8bf7 100644 --- a/librz/bin/p/bin_mach0.c +++ b/librz/bin/p/bin_mach0.c @@ -10,7 +10,7 @@ #include "../i/private.h" #include "mach0/mach0.h" #include "objc/mach0_classes.h" -#include +#include // wip settings diff --git a/librz/bin/p/bin_symbols.c b/librz/bin/p/bin_symbols.c index f5c30d8f76b..712cf0510e3 100644 --- a/librz/bin/p/bin_symbols.c +++ b/librz/bin/p/bin_symbols.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include "../i/private.h" #include "mach0/coresymbolication.h" diff --git a/librz/bin/relocs_patch.c b/librz/bin/relocs_patch.c index 0698aa7e5aa..074d32be491 100644 --- a/librz/bin/relocs_patch.c +++ b/librz/bin/relocs_patch.c @@ -2,7 +2,7 @@ // SPDX-License-Identifier: LGPL-3.0-only #include -#include +#include /// Finm a suitable location for putting the artificial reloc targets map RZ_API ut64 rz_bin_relocs_patch_find_targets_map_base(RzList /**/ *maps, ut64 target_sz) { diff --git a/librz/core/agraph.c b/librz/core/agraph.c index d3acea59715..695f81174d7 100644 --- a/librz/core/agraph.c +++ b/librz/core/agraph.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include "core_private.h" diff --git a/librz/core/analysis_tp.c b/librz/core/analysis_tp.c index 4c5317fd676..d0a6f4fbaaf 100644 --- a/librz/core/analysis_tp.c +++ b/librz/core/analysis_tp.c @@ -5,7 +5,7 @@ #include #include -#include +#include #include #define LOOP_MAX 10 diff --git a/librz/core/canalysis.c b/librz/core/canalysis.c index 4be6de67bdc..f1fa6b54814 100644 --- a/librz/core/canalysis.c +++ b/librz/core/canalysis.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/librz/core/cil.c b/librz/core/cil.c index a7cc129854b..28cb4c03080 100644 --- a/librz/core/cil.c +++ b/librz/core/cil.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include "core_private.h" diff --git a/librz/core/cmd/cmd_search.c b/librz/core/cmd/cmd_search.c index 7f4602ac8f0..eea6fdf2950 100644 --- a/librz/core/cmd/cmd_search.c +++ b/librz/core/cmd/cmd_search.c @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2010-2021 pancake // SPDX-License-Identifier: LGPL-3.0-only -#include +#include #include #include #include diff --git a/librz/diff/diff.c b/librz/diff/diff.c index a870e7524c5..5c24e6166f5 100644 --- a/librz/diff/diff.c +++ b/librz/diff/diff.c @@ -60,8 +60,8 @@ #include #include /**/ -#include -#include +#include +#include #define NUM2PTR(x) ((void *)(intptr_t)(x)) #define PTR2NUM(x) ((intptr_t)(void *)(x)) diff --git a/librz/il/il_validate.c b/librz/il/il_validate.c index b43b01af597..1ea28a9c043 100644 --- a/librz/il/il_validate.c +++ b/librz/il/il_validate.c @@ -2,7 +2,7 @@ // SPDX-License-Identifier: LGPL-3.0-only #include -#include +#include ///////////////////////////////////////////////////////// // ---------------------- context ----------------------- diff --git a/librz/include/rz_util/ht_pp.h b/librz/include/rz_util/ht_pp.h index 57a66dd9aad..baf566884f0 100644 --- a/librz/include/rz_util/ht_pp.h +++ b/librz/include/rz_util/ht_pp.h @@ -15,7 +15,7 @@ extern "C" { * value. The API functions starts with "ht_pp_" and the types starts with "HtPP". */ #define HT_TYPE 1 -#include "ht_inc.h" +#include RZ_API HtName_(Ht) * Ht_(new0)(void); RZ_API HtName_(Ht) * Ht_(new)(HT_(DupValue) valdup, HT_(KvFreeFunc) pair_free, HT_(CalcSizeV) valueSize); diff --git a/librz/include/rz_util/ht_pu.h b/librz/include/rz_util/ht_pu.h index a5812613cc5..551930b91d4 100644 --- a/librz/include/rz_util/ht_pu.h +++ b/librz/include/rz_util/ht_pu.h @@ -15,7 +15,7 @@ extern "C" { * value. The API functions starts with "ht_pu_" and the types starts with "HtPU". */ #define HT_TYPE 4 -#include "ht_inc.h" +#include RZ_API HtName_(Ht) * Ht_(new0)(void); #undef HT_TYPE diff --git a/librz/include/rz_util/ht_up.h b/librz/include/rz_util/ht_up.h index 48c39546869..ef7e0632f52 100644 --- a/librz/include/rz_util/ht_up.h +++ b/librz/include/rz_util/ht_up.h @@ -15,7 +15,7 @@ extern "C" { * value. The API functions starts with "ht_up_" and the types starts with "HtUP". */ #define HT_TYPE 2 -#include "ht_inc.h" +#include RZ_API HtName_(Ht) * Ht_(new0)(void); RZ_API HtName_(Ht) * Ht_(new)(HT_(DupValue) valdup, HT_(KvFreeFunc) pair_free, HT_(CalcSizeV) valueSize); diff --git a/librz/include/rz_util/ht_uu.h b/librz/include/rz_util/ht_uu.h index c139c2547c3..a9e53bc2390 100644 --- a/librz/include/rz_util/ht_uu.h +++ b/librz/include/rz_util/ht_uu.h @@ -15,7 +15,7 @@ extern "C" { * value. The API functions starts with "ht_" and the types starts with "Ht". */ #define HT_TYPE 3 -#include "ht_inc.h" +#include RZ_API HtName_(Ht) * Ht_(new0)(void); #undef HT_TYPE diff --git a/librz/include/rz_util/rz_event.h b/librz/include/rz_util/rz_event.h index c0da4f5826d..4ec71c3c94e 100644 --- a/librz/include/rz_util/rz_event.h +++ b/librz/include/rz_util/rz_event.h @@ -8,7 +8,7 @@ extern "C" { #endif -#include "ht_up.h" +#include #include typedef struct rz_event_t { diff --git a/librz/include/rz_util/rz_th_ht.h b/librz/include/rz_util/rz_th_ht.h index f4d1099c809..d3293567f94 100644 --- a/librz/include/rz_util/rz_th_ht.h +++ b/librz/include/rz_util/rz_th_ht.h @@ -6,10 +6,10 @@ #define RZ_TH_HASH_TABLE_H #include -#include "ht_pp.h" -#include "ht_up.h" -#include "ht_uu.h" -#include "ht_pu.h" +#include +#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/librz/include/rz_util/set.h b/librz/include/rz_util/set.h index 7bda2392d1b..4f79a5c0d79 100644 --- a/librz/include/rz_util/set.h +++ b/librz/include/rz_util/set.h @@ -4,8 +4,8 @@ #ifndef SDB_SET_H #define SDB_SET_H -#include "ht_pp.h" -#include "ht_up.h" +#include +#include #ifdef __cplusplus extern "C" { diff --git a/librz/util/ht/ht_pp.c b/librz/util/ht/ht_pp.c index da6a81feee7..9525aeeaa0d 100644 --- a/librz/util/ht/ht_pp.c +++ b/librz/util/ht/ht_pp.c @@ -4,7 +4,7 @@ // SPDX-License-Identifier: BSD-3-Clause #include "sdb.h" -#include "ht_pp.h" +#include #include "ht_inc.c" static HtName_(Ht) * internal_ht_default_new(ut32 size, ut32 prime_idx, HT_(DupValue) valdup, HT_(KvFreeFunc) pair_free, HT_(CalcSizeV) calcsizeV) { diff --git a/librz/util/ht/ht_pu.c b/librz/util/ht/ht_pu.c index d90d583060d..9e42e849b1d 100644 --- a/librz/util/ht/ht_pu.c +++ b/librz/util/ht/ht_pu.c @@ -4,7 +4,7 @@ // SPDX-License-Identifier: BSD-3-Clause #include "sdb.h" -#include "ht_pu.h" +#include #include "ht_inc.c" static void free_kv_key(HT_(Kv) * kv) { diff --git a/librz/util/ht/ht_up.c b/librz/util/ht/ht_up.c index c86ee90cd33..a1ea77e63f9 100644 --- a/librz/util/ht/ht_up.c +++ b/librz/util/ht/ht_up.c @@ -3,7 +3,7 @@ // SPDX-FileCopyrightText: 2016-2018 ret2libc // SPDX-License-Identifier: BSD-3-Clause -#include "ht_up.h" +#include #include "ht_inc.c" static HtName_(Ht) * internal_ht_default_new(ut32 size, ut32 prime_idx, HT_(DupValue) valdup, HT_(KvFreeFunc) pair_free, HT_(CalcSizeV) calcsizeV) { diff --git a/librz/util/ht/ht_uu.c b/librz/util/ht/ht_uu.c index c3d04baf9f4..8b42d6593cc 100644 --- a/librz/util/ht/ht_uu.c +++ b/librz/util/ht/ht_uu.c @@ -3,7 +3,7 @@ // SPDX-FileCopyrightText: 2016-2018 ret2libc // SPDX-License-Identifier: BSD-3-Clause -#include "ht_uu.h" +#include #include "ht_inc.c" diff --git a/librz/util/meson.build b/librz/util/meson.build index cca0823956f..8d505d54d99 100644 --- a/librz/util/meson.build +++ b/librz/util/meson.build @@ -117,7 +117,7 @@ else rz_util_sources += ['big.c'] endif -rz_util_includes = [platform_inc, include_directories('sdb/src', 'sdb', '../include/rz_util')] +rz_util_includes = [platform_inc, include_directories('sdb/src', 'sdb')] rz_util = library('rz_util', rz_util_sources, libsdb_sources, include_directories: rz_util_includes, diff --git a/librz/util/set.c b/librz/util/set.c index 27e13c2c725..991cf45cee0 100644 --- a/librz/util/set.c +++ b/librz/util/set.c @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2019 pancake // SPDX-License-Identifier: MIT -#include "set.h" +#include // p diff --git a/librz/util/sys.c b/librz/util/sys.c index f0ff91356c1..202c2b832ea 100644 --- a/librz/util/sys.c +++ b/librz/util/sys.c @@ -1364,7 +1364,7 @@ RZ_API int rz_sys_pipe_close(int fd) { } #elif __UNIX__ && HAVE_PIPE -#include +#include static HtUU *fd2close; // Use this lock to wraps pipe, close, exec*, system to ensure all pipe file // descriptors are either created AND added to fd2close or not created at all. diff --git a/test/unit/test_sdb_hash.c b/test/unit/test_sdb_hash.c index aa2ce048a46..79d80b90d49 100644 --- a/test/unit/test_sdb_hash.c +++ b/test/unit/test_sdb_hash.c @@ -3,10 +3,10 @@ #include "minunit.h" #include -#include -#include -#include -#include +#include +#include +#include +#include typedef struct _test_struct { char *name;