breakpad/src/client
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
..
apple/Framework Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
ios Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
linux Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
mac Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
solaris/handler Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
windows Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
minidump_file_writer-inl.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
minidump_file_writer.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00
minidump_file_writer.h Update copyright boilerplate, 2022 edition (Breakpad) 2022-09-07 16:59:53 +00:00
minidump_file_writer_unittest.cc Add #include <config.h> to the beginning of all cc files 2023-02-27 19:31:32 +00:00