]> git.ipfire.org Git - thirdparty/elfutils.git/commit
Avoid double-including config.h
authorUlf Hermann <ulf.hermann@qt.io>
Thu, 20 Apr 2017 14:31:02 +0000 (16:31 +0200)
committerMark Wielaard <mark@klomp.org>
Tue, 2 May 2017 11:28:54 +0000 (13:28 +0200)
commit575198c29a427392823cc8f2400579a23d06a875
treef58d3f9bd42e16dfc6c58d26a56e0dfda960c7a0
parentfd9e7345b41eb2d6c11e0b8679e19df68e20171e
Avoid double-including config.h

config.h doesn't have include guards, so including it twice is bad. We
deal with this by checking for PACKAGE_NAME, but only in some places.
Once we start using gnulib, we will need to include config.h before any
gnulib-generated headers. This is problematic if we include it
transitively through our own private headers.

In order to set a clear rule about inclusion of config.h, it is now
included in every .c file as first header, but not in any header. This
will definitely avoid double-inclusion and satisfy the condition that it
has to be included before gnulib headers. It comes at the price of
adding some redundancy, but there is no clean way to avoid this.

Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
62 files changed:
lib/ChangeLog
lib/crc32.c
lib/system.h
libdwfl/ChangeLog
libdwfl/argp-std.c
libdwfl/cu.c
libdwfl/derelocate.c
libdwfl/dwfl_addrdie.c
libdwfl/dwfl_addrdwarf.c
libdwfl/dwfl_addrmodule.c
libdwfl/dwfl_begin.c
libdwfl/dwfl_build_id_find_debuginfo.c
libdwfl/dwfl_build_id_find_elf.c
libdwfl/dwfl_cumodule.c
libdwfl/dwfl_dwarf_line.c
libdwfl/dwfl_end.c
libdwfl/dwfl_frame.c
libdwfl/dwfl_frame_regs.c
libdwfl/dwfl_getdwarf.c
libdwfl/dwfl_getmodules.c
libdwfl/dwfl_getsrc.c
libdwfl/dwfl_getsrclines.c
libdwfl/dwfl_line_comp_dir.c
libdwfl/dwfl_linecu.c
libdwfl/dwfl_lineinfo.c
libdwfl/dwfl_linemodule.c
libdwfl/dwfl_module.c
libdwfl/dwfl_module_addrdie.c
libdwfl/dwfl_module_addrname.c
libdwfl/dwfl_module_addrsym.c
libdwfl/dwfl_module_build_id.c
libdwfl/dwfl_module_dwarf_cfi.c
libdwfl/dwfl_module_eh_cfi.c
libdwfl/dwfl_module_getdwarf.c
libdwfl/dwfl_module_getelf.c
libdwfl/dwfl_module_getsrc.c
libdwfl/dwfl_module_getsrc_file.c
libdwfl/dwfl_module_getsym.c
libdwfl/dwfl_module_info.c
libdwfl/dwfl_module_nextcu.c
libdwfl/dwfl_module_register_names.c
libdwfl/dwfl_module_report_build_id.c
libdwfl/dwfl_module_return_value_location.c
libdwfl/dwfl_nextcu.c
libdwfl/dwfl_onesrcline.c
libdwfl/dwfl_report_elf.c
libdwfl/dwfl_validate_address.c
libdwfl/dwfl_version.c
libdwfl/find-debuginfo.c
libdwfl/gzip.c
libdwfl/image-header.c
libdwfl/libdwflP.h
libdwfl/lines.c
libdwfl/linux-core-attach.c
libdwfl/linux-pid-attach.c
libdwfl/linux-proc-maps.c
libdwfl/offline.c
libdwfl/open.c
libdwfl/relocate.c
libdwfl/segment.c
libelf/ChangeLog
libelf/libelfP.h