From: Ulf Hermann Date: Thu, 20 Apr 2017 14:31:02 +0000 (+0200) Subject: Avoid double-including config.h X-Git-Tag: elfutils-0.169~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=575198c29a427392823cc8f2400579a23d06a875;p=thirdparty%2Felfutils.git 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 --- diff --git a/lib/ChangeLog b/lib/ChangeLog index 84290f79d..8cac7afb3 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2017-04-20 Ulf Hermann + + * crc32.c: include config.h. + * system.h: Don't include config.h. + 2017-02-16 Ulf Hermann * Makefile.am (libeu_a_SOURCES): Remove version.c, add printversion.c diff --git a/lib/crc32.c b/lib/crc32.c index 1a76b1b37..758602ea0 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -25,6 +25,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#if HAVE_CONFIG_H +#include +#endif + #include #include "system.h" diff --git a/lib/system.h b/lib/system.h index 2d0570250..920333552 100644 --- a/lib/system.h +++ b/lib/system.h @@ -29,10 +29,6 @@ #ifndef LIB_SYSTEM_H #define LIB_SYSTEM_H 1 -#ifdef HAVE_CONFIG_H -# include -#endif - #include #include #include diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index b9be1bce1..1fc9da69d 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,61 @@ +2017-04-20 Ulf Hermann + + * libdwflP.h: Don't include config.h. + * argp-std.c: Include config.h. + * cu.c: Likewise. + * derelocate.c: Likewise. + * dwfl_addrdie.c: Likewise. + * dwfl_addrdwarf.c: Likewise. + * dwfl_addrmodule.c: Likewise. + * dwfl_begin.c: Likewise. + * dwfl_build_id_find_debuginfo.c: Likewise. + * dwfl_build_id_find_elf.c: Likewise. + * dwfl_cumodule.c: Likewise. + * dwfl_dwarf_line.c: Likewise. + * dwfl_end.c: Likewise. + * dwfl_frame.c: Likewise. + * dwfl_frame_regs.c: Likewise. + * dwfl_getdwarf.c: Likewise. + * dwfl_getmodules.c: Likewise. + * dwfl_getsrc.c: Likewise. + * dwfl_getsrclines.c: Likewise. + * dwfl_line_comp_dir.c: Likewise. + * dwfl_linecu.c: Likewise. + * dwfl_lineinfo.c: Likewise. + * dwfl_linemodule.c: Likewise. + * dwfl_module.c: Likewise. + * dwfl_module_addrdie.c: Likewise. + * dwfl_module_addrname.c: Likewise. + * dwfl_module_addrsym.c: Likewise. + * dwfl_module_build_id.c: Likewise. + * dwfl_module_dwarf_cfi.c: Likewise. + * dwfl_module_eh_cfi.c: Likewise. + * dwfl_module_getdarf.c: Likewise. + * dwfl_module_getelf.c: Likewise. + * dwfl_module_getsrc.c: Likewise. + * dwfl_module_getsrc_file.c: Likewise. + * dwfl_module_getsym.c: Likewise. + * dwfl_module_info.c: Likewise. + * dwfl_module_nextcu.c: Likewise. + * dwfl_module_register_names.c: Likewise. + * dwfl_module_report_build_id.c: Likewise. + * dwfl_module_return_value_location.c: Likewise. + * dwfl_nextcu.c: Likewise. + * dwfl_onesrcline.c: Likewise. + * dwfl_report_elf.c: Likewise. + * dwfl_validate_address.c: Likewise. + * dwfl_version.c: Likewise. + * find-debuginfo.c: Likewise. + * gzip.c: Likewise. + * image-header.c: Likewise. + * lines.c: Likewise. + * linux-core-attach.c: Likewise. + * linux-pid-attach.c: Likewise. + * offline.c: Likewise. + * open.c: Likewise. + * relocate.c: Likewise. + * segment.c: Likewise. + 2017-04-20 Ulf Hermann * libdwfl.h: Use __const_attribute__. diff --git a/libdwfl/argp-std.c b/libdwfl/argp-std.c index 501530a5b..347a05b40 100644 --- a/libdwfl/argp-std.c +++ b/libdwfl/argp-std.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include #include diff --git a/libdwfl/cu.c b/libdwfl/cu.c index 5182054d3..7aa23b501 100644 --- a/libdwfl/cu.c +++ b/libdwfl/cu.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "../libdw/libdwP.h" #include "../libdw/memory-access.h" diff --git a/libdwfl/derelocate.c b/libdwfl/derelocate.c index 439a24e3b..e5c3e12e1 100644 --- a/libdwfl/derelocate.c +++ b/libdwfl/derelocate.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" struct dwfl_relocation diff --git a/libdwfl/dwfl_addrdie.c b/libdwfl/dwfl_addrdie.c index 1e9b3ab64..c5b1d68ef 100644 --- a/libdwfl/dwfl_addrdie.c +++ b/libdwfl/dwfl_addrdie.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwarf_Die * diff --git a/libdwfl/dwfl_addrdwarf.c b/libdwfl/dwfl_addrdwarf.c index ba412eca6..4f9efabf5 100644 --- a/libdwfl/dwfl_addrdwarf.c +++ b/libdwfl/dwfl_addrdwarf.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwarf * diff --git a/libdwfl/dwfl_addrmodule.c b/libdwfl/dwfl_addrmodule.c index 9234eb713..abf1ff484 100644 --- a/libdwfl/dwfl_addrmodule.c +++ b/libdwfl/dwfl_addrmodule.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwfl_Module * diff --git a/libdwfl/dwfl_begin.c b/libdwfl/dwfl_begin.c index 44c16a921..b03f5cf4b 100644 --- a/libdwfl/dwfl_begin.c +++ b/libdwfl/dwfl_begin.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwfl * diff --git a/libdwfl/dwfl_build_id_find_debuginfo.c b/libdwfl/dwfl_build_id_find_debuginfo.c index f1c64bcd5..273e5e5f1 100644 --- a/libdwfl/dwfl_build_id_find_debuginfo.c +++ b/libdwfl/dwfl_build_id_find_debuginfo.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include diff --git a/libdwfl/dwfl_build_id_find_elf.c b/libdwfl/dwfl_build_id_find_elf.c index d4737c9f1..ee0c16468 100644 --- a/libdwfl/dwfl_build_id_find_elf.c +++ b/libdwfl/dwfl_build_id_find_elf.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include #include diff --git a/libdwfl/dwfl_cumodule.c b/libdwfl/dwfl_cumodule.c index c5cf004da..2b593f226 100644 --- a/libdwfl/dwfl_cumodule.c +++ b/libdwfl/dwfl_cumodule.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwfl_Module * diff --git a/libdwfl/dwfl_dwarf_line.c b/libdwfl/dwfl_dwarf_line.c index e96f859af..e22e984c5 100644 --- a/libdwfl/dwfl_dwarf_line.c +++ b/libdwfl/dwfl_dwarf_line.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "../libdw/libdwP.h" diff --git a/libdwfl/dwfl_end.c b/libdwfl/dwfl_end.c index 0b35bd282..74ee9e072 100644 --- a/libdwfl/dwfl_end.c +++ b/libdwfl/dwfl_end.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include diff --git a/libdwfl/dwfl_frame.c b/libdwfl/dwfl_frame.c index 1dc0c8dd3..881f735af 100644 --- a/libdwfl/dwfl_frame.c +++ b/libdwfl/dwfl_frame.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include diff --git a/libdwfl/dwfl_frame_regs.c b/libdwfl/dwfl_frame_regs.c index 10803fe73..83b1abef1 100644 --- a/libdwfl/dwfl_frame_regs.c +++ b/libdwfl/dwfl_frame_regs.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" bool diff --git a/libdwfl/dwfl_getdwarf.c b/libdwfl/dwfl_getdwarf.c index 8d1d9ba79..edd088eca 100644 --- a/libdwfl/dwfl_getdwarf.c +++ b/libdwfl/dwfl_getdwarf.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" struct module_callback_info diff --git a/libdwfl/dwfl_getmodules.c b/libdwfl/dwfl_getmodules.c index eed9b4ff2..243cb04d6 100644 --- a/libdwfl/dwfl_getmodules.c +++ b/libdwfl/dwfl_getmodules.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" ptrdiff_t diff --git a/libdwfl/dwfl_getsrc.c b/libdwfl/dwfl_getsrc.c index 8d4ae0224..d853aed47 100644 --- a/libdwfl/dwfl_getsrc.c +++ b/libdwfl/dwfl_getsrc.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwfl_Line * diff --git a/libdwfl/dwfl_getsrclines.c b/libdwfl/dwfl_getsrclines.c index bdfcf5c6a..1ce78fcb7 100644 --- a/libdwfl/dwfl_getsrclines.c +++ b/libdwfl/dwfl_getsrclines.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" int diff --git a/libdwfl/dwfl_line_comp_dir.c b/libdwfl/dwfl_line_comp_dir.c index bda09c466..77c3fdf15 100644 --- a/libdwfl/dwfl_line_comp_dir.c +++ b/libdwfl/dwfl_line_comp_dir.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include diff --git a/libdwfl/dwfl_linecu.c b/libdwfl/dwfl_linecu.c index ce78d297c..2043b17fd 100644 --- a/libdwfl/dwfl_linecu.c +++ b/libdwfl/dwfl_linecu.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #undef dwfl_linecu diff --git a/libdwfl/dwfl_lineinfo.c b/libdwfl/dwfl_lineinfo.c index 7ddbfb07f..961871287 100644 --- a/libdwfl/dwfl_lineinfo.c +++ b/libdwfl/dwfl_lineinfo.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "../libdw/libdwP.h" diff --git a/libdwfl/dwfl_linemodule.c b/libdwfl/dwfl_linemodule.c index e4a35e096..d243f0d21 100644 --- a/libdwfl/dwfl_linemodule.c +++ b/libdwfl/dwfl_linemodule.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwfl_Module * diff --git a/libdwfl/dwfl_module.c b/libdwfl/dwfl_module.c index 515092f33..510bd6910 100644 --- a/libdwfl/dwfl_module.c +++ b/libdwfl/dwfl_module.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "../libdw/cfi.h" #include diff --git a/libdwfl/dwfl_module_addrdie.c b/libdwfl/dwfl_module_addrdie.c index 20d2842a0..b44ec139a 100644 --- a/libdwfl/dwfl_module_addrdie.c +++ b/libdwfl/dwfl_module_addrdie.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwarf_Die * diff --git a/libdwfl/dwfl_module_addrname.c b/libdwfl/dwfl_module_addrname.c index 88a8139dd..3142b3eb2 100644 --- a/libdwfl/dwfl_module_addrname.c +++ b/libdwfl/dwfl_module_addrname.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" const char * diff --git a/libdwfl/dwfl_module_addrsym.c b/libdwfl/dwfl_module_addrsym.c index 5a7bf7145..db302e636 100644 --- a/libdwfl/dwfl_module_addrsym.c +++ b/libdwfl/dwfl_module_addrsym.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" struct search_state diff --git a/libdwfl/dwfl_module_build_id.c b/libdwfl/dwfl_module_build_id.c index c9a42ca72..6ca937613 100644 --- a/libdwfl/dwfl_module_build_id.c +++ b/libdwfl/dwfl_module_build_id.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" static int diff --git a/libdwfl/dwfl_module_dwarf_cfi.c b/libdwfl/dwfl_module_dwarf_cfi.c index 1dac26d5a..0e5b43561 100644 --- a/libdwfl/dwfl_module_dwarf_cfi.c +++ b/libdwfl/dwfl_module_dwarf_cfi.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "../libdw/cfi.h" diff --git a/libdwfl/dwfl_module_eh_cfi.c b/libdwfl/dwfl_module_eh_cfi.c index dbe43b0f5..c296e3997 100644 --- a/libdwfl/dwfl_module_eh_cfi.c +++ b/libdwfl/dwfl_module_eh_cfi.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "../libdw/cfi.h" diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c index c8b839dcd..9775aced3 100644 --- a/libdwfl/dwfl_module_getdwarf.c +++ b/libdwfl/dwfl_module_getdwarf.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include #include diff --git a/libdwfl/dwfl_module_getelf.c b/libdwfl/dwfl_module_getelf.c index f20fb0429..6358de4c1 100644 --- a/libdwfl/dwfl_module_getelf.c +++ b/libdwfl/dwfl_module_getelf.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Elf * diff --git a/libdwfl/dwfl_module_getsrc.c b/libdwfl/dwfl_module_getsrc.c index f7e340bc6..fc99b163e 100644 --- a/libdwfl/dwfl_module_getsrc.c +++ b/libdwfl/dwfl_module_getsrc.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "../libdw/libdwP.h" diff --git a/libdwfl/dwfl_module_getsrc_file.c b/libdwfl/dwfl_module_getsrc_file.c index 4eaaeaffa..cea2ba414 100644 --- a/libdwfl/dwfl_module_getsrc_file.c +++ b/libdwfl/dwfl_module_getsrc_file.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "../libdw/libdwP.h" diff --git a/libdwfl/dwfl_module_getsym.c b/libdwfl/dwfl_module_getsym.c index 42d2b6792..8de9a3eb8 100644 --- a/libdwfl/dwfl_module_getsym.c +++ b/libdwfl/dwfl_module_getsym.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" const char * diff --git a/libdwfl/dwfl_module_info.c b/libdwfl/dwfl_module_info.c index df16be419..af1faab40 100644 --- a/libdwfl/dwfl_module_info.c +++ b/libdwfl/dwfl_module_info.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" const char * diff --git a/libdwfl/dwfl_module_nextcu.c b/libdwfl/dwfl_module_nextcu.c index 6f81f4ccf..32ee6bc25 100644 --- a/libdwfl/dwfl_module_nextcu.c +++ b/libdwfl/dwfl_module_nextcu.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwarf_Die * diff --git a/libdwfl/dwfl_module_register_names.c b/libdwfl/dwfl_module_register_names.c index 18fed3733..9ea093711 100644 --- a/libdwfl/dwfl_module_register_names.c +++ b/libdwfl/dwfl_module_register_names.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" diff --git a/libdwfl/dwfl_module_report_build_id.c b/libdwfl/dwfl_module_report_build_id.c index b41512b4d..31e17c863 100644 --- a/libdwfl/dwfl_module_report_build_id.c +++ b/libdwfl/dwfl_module_report_build_id.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" // XXX vs report changed module: punting old file diff --git a/libdwfl/dwfl_module_return_value_location.c b/libdwfl/dwfl_module_return_value_location.c index 29da61fb1..ff6f56f81 100644 --- a/libdwfl/dwfl_module_return_value_location.c +++ b/libdwfl/dwfl_module_return_value_location.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" diff --git a/libdwfl/dwfl_nextcu.c b/libdwfl/dwfl_nextcu.c index 9ea83881b..64bd52195 100644 --- a/libdwfl/dwfl_nextcu.c +++ b/libdwfl/dwfl_nextcu.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwarf_Die * diff --git a/libdwfl/dwfl_onesrcline.c b/libdwfl/dwfl_onesrcline.c index 4c20d6578..b1e705554 100644 --- a/libdwfl/dwfl_onesrcline.c +++ b/libdwfl/dwfl_onesrcline.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwfl_Line * diff --git a/libdwfl/dwfl_report_elf.c b/libdwfl/dwfl_report_elf.c index 73a5511a8..6950a37b4 100644 --- a/libdwfl/dwfl_report_elf.c +++ b/libdwfl/dwfl_report_elf.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include #include diff --git a/libdwfl/dwfl_validate_address.c b/libdwfl/dwfl_validate_address.c index 7334c3e27..15e2602a9 100644 --- a/libdwfl/dwfl_validate_address.c +++ b/libdwfl/dwfl_validate_address.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" int diff --git a/libdwfl/dwfl_version.c b/libdwfl/dwfl_version.c index d1c5d9180..c27d4f6de 100644 --- a/libdwfl/dwfl_version.c +++ b/libdwfl/dwfl_version.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" const char * diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c index 80515dbd8..6d5a42a6d 100644 --- a/libdwfl/find-debuginfo.c +++ b/libdwfl/find-debuginfo.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include #include diff --git a/libdwfl/gzip.c b/libdwfl/gzip.c index 078e1da48..c2c13bafb 100644 --- a/libdwfl/gzip.c +++ b/libdwfl/gzip.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "system.h" diff --git a/libdwfl/image-header.c b/libdwfl/image-header.c index 62ccc3e35..25fbfd999 100644 --- a/libdwfl/image-header.c +++ b/libdwfl/image-header.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "system.h" diff --git a/libdwfl/libdwflP.h b/libdwfl/libdwflP.h index 2a83646e3..7d5f795cb 100644 --- a/libdwfl/libdwflP.h +++ b/libdwfl/libdwflP.h @@ -29,9 +29,6 @@ #ifndef _LIBDWFLP_H #define _LIBDWFLP_H 1 -#ifndef PACKAGE_NAME -# include -#endif #include #include #include diff --git a/libdwfl/lines.c b/libdwfl/lines.c index 721e29ccd..128c0c977 100644 --- a/libdwfl/lines.c +++ b/libdwfl/lines.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "../libdw/libdwP.h" diff --git a/libdwfl/linux-core-attach.c b/libdwfl/linux-core-attach.c index f82ed0321..9f05f72a0 100644 --- a/libdwfl/linux-core-attach.c +++ b/libdwfl/linux-core-attach.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include #include "system.h" diff --git a/libdwfl/linux-pid-attach.c b/libdwfl/linux-pid-attach.c index 398df96d0..e6a5c419c 100644 --- a/libdwfl/linux-pid-attach.c +++ b/libdwfl/linux-pid-attach.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libelfP.h" #include "libdwflP.h" #include diff --git a/libdwfl/linux-proc-maps.c b/libdwfl/linux-proc-maps.c index 094dd53da..c4438c0f9 100644 --- a/libdwfl/linux-proc-maps.c +++ b/libdwfl/linux-proc-maps.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include #include diff --git a/libdwfl/offline.c b/libdwfl/offline.c index c0a259926..80c80a168 100644 --- a/libdwfl/offline.c +++ b/libdwfl/offline.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include #include diff --git a/libdwfl/open.c b/libdwfl/open.c index 92f2798b4..4e0461bd2 100644 --- a/libdwfl/open.c +++ b/libdwfl/open.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "../libelf/libelfP.h" #undef _ #include "libdwflP.h" diff --git a/libdwfl/relocate.c b/libdwfl/relocate.c index a44126e82..176824335 100644 --- a/libdwfl/relocate.c +++ b/libdwfl/relocate.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" typedef uint8_t GElf_Byte; diff --git a/libdwfl/segment.c b/libdwfl/segment.c index 2983cf232..d9599a7fd 100644 --- a/libdwfl/segment.c +++ b/libdwfl/segment.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" GElf_Addr diff --git a/libelf/ChangeLog b/libelf/ChangeLog index 3772c6d17..594bec995 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,7 @@ +2017-04-20 Ulf Hermann + + * libelfP.h: Don't include config.h. + 2017-04-20 Ulf Hermann * elf_begin.c: Use F_GETFD rather than F_GETFL. diff --git a/libelf/libelfP.h b/libelf/libelfP.h index 44599827e..7ee6625a4 100644 --- a/libelf/libelfP.h +++ b/libelf/libelfP.h @@ -30,10 +30,6 @@ #ifndef _LIBELFP_H #define _LIBELFP_H 1 -#ifdef HAVE_CONFIG_H -# include -#endif - #include #include