From f559e52a8e79585e0b13156e949a7fd46060a714 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 30 Jul 2023 10:26:07 -0600 Subject: Remove PEI_HEADERS define I noticed a few files double-included libcoff.h, and digging deeper I found that the PEI_HEADERS define is a sort of external include guard. This patch adds include guards to the few files in include/coff that were missing one, and then removes the PEI_HEADERS workaround and the redundant includes. I didn't see anything in these files that indicated that double-inclusion would be useful, so it seems to me that this approach is ok. Tested by rebuilding with --enable-targets=all. 2023-08-02 Tom Tromey * pei-x86_64.c (PEI_HEADERS): Do not define. * pei-loongarch64.c (PEI_HEADERS): Do not define. * pei-aarch64.c (PEI_HEADERS): Do not define. * pe-x86_64.c (PEI_HEADERS): Do not define. * pe-aarch64.c (PEI_HEADERS): Do not define. * libpei.h (_LIBPEI_H): Add include guard. * coff-x86_64.c (PEI_HEADERS): Do not check. * coff-loongarch64.c (PEI_HEADERS): Do not check. * coff-aarch64.c (PEI_HEADERS): Do not check. include/ChangeLog 2023-08-02 Tom Tromey * coff/x86_64.h (COFF_X86_64_H): Add include guard. * coff/loongarch64.h (COFF_LOONGARCH64_H): Add include guard. * coff/aarch64.h (COFF_AARCH64_H): Add include guard. --- bfd/libpei.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bfd/libpei.h') diff --git a/bfd/libpei.h b/bfd/libpei.h index eafb9cf..9837d46 100644 --- a/bfd/libpei.h +++ b/bfd/libpei.h @@ -19,6 +19,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifndef _LIBPEI_H +#define _LIBPEI_H /* Most of this hacked by Steve Chamberlain, sac@cygnus.com @@ -445,3 +447,4 @@ bool _bfd_peAArch64_print_ce_compressed_pdata (bfd *, void *); bool _bfd_peLoongArch64_print_ce_compressed_pdata (bfd *, void *); bool _bfd_pep_print_ce_compressed_pdata (bfd *, void *); +#endif /* _LIBPEI_H */ -- cgit v1.1