breakpad/src/processor
Ian Barkley-Yeung f5123d7196 Add #include <config.h> to the beginning of all cc files
Added
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
to the beginning of all source files that didn't have it.

This ensures that configuration options are respected in all source
files. In particular, it ensures that the defines needed to fix Large
File System issues are set before including system headers.

More generally, it ensures consistency between the source files, and
avoids the possibility of ODR violations between source files that were
including config.h and source files that were not.

Process:
Ran
find . \( -name third_party -prune \) -o \( -name '.git*' -prune \) -o \( \( -name '*.cc' -o -name '*.c' \) -exec sed -i '0,/^#include/ s/^#include/#ifdef HAVE_CONFIG_H\n#include <config.h>  \/\/ Must come first\n#endif\n\n#include/' {} + \)
and then manually fixed up src/common/linux/guid_creator.cc,
src/tools/solaris/dump_syms/testdata/dump_syms_regtest.cc,
src/tools/windows/dump_syms/testdata/dump_syms_regtest.cc,
src/common/stabs_reader.h, and src/common/linux/breakpad_getcontext.h.

BUG=google-breakpad:877
Fixed: google-breakpad:877
TEST=./configure && make && make check
TEST=Did the find/sed in ChromeOS's copy, ensured emerge-hana google-breakpad
worked and had fewer LFS violations.
TEST=Did the find/sed in Chrome's copy, ensured compiling hana, windows, linux, and
eve still worked (since Chrome doesn't used config.h)

Change-Id: I16cededbba0ea0c28e919b13243e35300999e799
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4289676
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2023-02-27 19:31:32 +00:00
..
proto Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
testdata Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
address_map-inl.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
address_map.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
address_map_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
basic_code_module.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
basic_code_modules.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
basic_code_modules.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
basic_source_line_resolver.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
basic_source_line_resolver_types.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
basic_source_line_resolver_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
call_stack.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
cfi_frame_info-inl.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
cfi_frame_info.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
cfi_frame_info.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
cfi_frame_info_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
contained_range_map-inl.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
contained_range_map.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
contained_range_map_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
convert_old_arm64_context.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
convert_old_arm64_context.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
disassembler_objdump.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
disassembler_objdump.h Add DisassemblerObjdump. 2022-10-12 17:19:44 +00:00
disassembler_objdump_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
disassembler_x86.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
disassembler_x86.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
disassembler_x86_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
dump_context.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
dump_object.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
exploitability.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
exploitability_linux.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
exploitability_linux.h Add DisassemblerObjdump. 2022-10-12 17:19:44 +00:00
exploitability_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
exploitability_win.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
exploitability_win.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
fast_source_line_resolver.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
fast_source_line_resolver_types.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
fast_source_line_resolver_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
linked_ptr.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
logging.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
logging.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
map_serializers-inl.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
map_serializers.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
map_serializers_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
microdump.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
microdump_processor.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
microdump_processor_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
microdump_stackwalk.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
microdump_stackwalk_machine_readable_test Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
microdump_stackwalk_test Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
microdump_stackwalk_test_vars Microdumps: support aarch64 and lib mapping from APK 2014-12-02 15:31:25 +00:00
minidump.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
minidump_dump.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
minidump_dump_test Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
minidump_processor.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
minidump_processor_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
minidump_stackwalk.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
minidump_stackwalk_machine_readable_test Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
minidump_stackwalk_test Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
minidump_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
module_comparer.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
module_comparer.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
module_factory.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
module_serializer.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
module_serializer.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
pathname_stripper.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
pathname_stripper.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
pathname_stripper_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
postfix_evaluator-inl.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
postfix_evaluator.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
postfix_evaluator_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
proc_maps_linux.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
proc_maps_linux_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
process_state.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
range_map-inl.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
range_map.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
range_map_truncate_lower_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
range_map_truncate_upper_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
range_map_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
simple_serializer-inl.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
simple_serializer.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
simple_symbol_supplier.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
simple_symbol_supplier.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
source_line_resolver_base.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
source_line_resolver_base_types.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
stack_frame_cpu.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stack_frame_symbolizer.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalk_common.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalk_common.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
stackwalker.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_address_list.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_address_list.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
stackwalker_address_list_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_amd64.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_amd64.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
stackwalker_amd64_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_arm.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_arm.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
stackwalker_arm64.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_arm64.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
stackwalker_arm64_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_arm_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_mips.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_mips.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
stackwalker_mips64_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_mips_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_ppc.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_ppc.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
stackwalker_ppc64.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_ppc64.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
stackwalker_riscv.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_riscv.h Added riscv and riscv64 support for Linux 2022-09-09 08:44:46 +00:00
stackwalker_riscv64.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_riscv64.h Added riscv and riscv64 support for Linux 2022-09-09 08:44:46 +00:00
stackwalker_riscv64_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_riscv_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_selftest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_selftest_sol.s Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
stackwalker_sparc.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_sparc.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
stackwalker_unittest_utils.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
stackwalker_x86.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
stackwalker_x86.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
stackwalker_x86_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
static_address_map-inl.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
static_address_map.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
static_address_map_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
static_contained_range_map-inl.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
static_contained_range_map.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
static_contained_range_map_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
static_map-inl.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
static_map.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
static_map_iterator-inl.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
static_map_iterator.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
static_map_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
static_range_map-inl.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
static_range_map.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
static_range_map_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
symbolic_constants_win.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
symbolic_constants_win.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
synth_minidump.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
synth_minidump.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
synth_minidump_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
synth_minidump_unittest_data.h Use stdint types everywhere 2013-03-06 14:04:42 +00:00
tokenize.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
tokenize.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
windows_frame_info.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00