X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=gold%2Fbinary.cc;h=c68524669a4c5fbb2af3a605500557c7f2368bf2;hb=b3adc24a0713411ab38a21dc894dd40dbc5c8f4f;hp=12ca296eb90670da8eb16cb9e85d9ca1cac3fe1e;hpb=b90efa5b79ac1524ec260f8eb89d1be37e0219a7;p=thirdparty%2Fbinutils-gdb.git diff --git a/gold/binary.cc b/gold/binary.cc index 12ca296eb90..c68524669a4 100644 --- a/gold/binary.cc +++ b/gold/binary.cc @@ -1,6 +1,6 @@ // binary.cc -- binary input files for gold -// Copyright (C) 2008-2015 Free Software Foundation, Inc. +// Copyright (C) 2008-2020 Free Software Foundation, Inc. // Written by Ian Lance Taylor . // This file is part of gold. @@ -24,7 +24,6 @@ #include #include -#include "safe-ctype.h" #include "elfcpp.h" #include "stringpool.h" @@ -32,6 +31,13 @@ #include "output.h" #include "binary.h" +// safe-ctype.h interferes with macros defined by the system . +// Some C++ system headers might include and rely on its macro +// definitions being intact. So make sure that safe-ctype.h is included +// only after any C++ system headers, whether directly here (above) or via +// other local header files (e.g. #include in "binary.h"). +#include "safe-ctype.h" + // Support for reading binary files as input. These become blobs in // the final output. These files are treated as though they have a // single .data section and define three symbols: