From: Alan Modra Date: Thu, 9 Feb 2012 04:51:44 +0000 (+0000) Subject: * sysdep.h: Include sys/stat.h here. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dbb7c4414b09c017dafc73b63de13640f19c5735;p=binutils-gdb.git * sysdep.h: Include sys/stat.h here. * ar.c: Don't include headers already included by sysdep.h. * bucomm.c: Likewise. * budbg.h: Likewise. * dlltool.h: Likewise. * elfedit.c: Likewise. * nlmconv.c: Likewise. * objcopy.c: Likewise. * objdump.c: Likewise. * objdump.h: Likewise. * readelf.c: Likewise. * rename.c: Likewise. * resrc.c: Likewise. * strings.c: Likewise. * windres.c: Likewise. * od-macho.c: Ensure #include sysdep.h is first. * od-xcoff.c: Likewise. * dllwrap.c: Remove alloca pragma handled by sysdep.h, and remove duplicate headers. * dlltool.c: Likewise and ensure #include sysdep.h is first. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 8e2976d5efe..1ff055525f6 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,26 @@ +2012-02-09 Alan Modra + + * sysdep.h: Include sys/stat.h here. + * ar.c: Don't include headers already included by sysdep.h. + * bucomm.c: Likewise. + * budbg.h: Likewise. + * dlltool.h: Likewise. + * elfedit.c: Likewise. + * nlmconv.c: Likewise. + * objcopy.c: Likewise. + * objdump.c: Likewise. + * objdump.h: Likewise. + * readelf.c: Likewise. + * rename.c: Likewise. + * resrc.c: Likewise. + * strings.c: Likewise. + * windres.c: Likewise. + * od-macho.c: Ensure #include sysdep.h is first. + * od-xcoff.c: Likewise. + * dllwrap.c: Remove alloca pragma handled by sysdep.h, and + remove duplicate headers. + * dlltool.c: Likewise and ensure #include sysdep.h is first. + 2012-02-01 Nick Clifton PR binutils/13493 diff --git a/binutils/ar.c b/binutils/ar.c index bb243a41a64..13637f40c73 100644 --- a/binutils/ar.c +++ b/binutils/ar.c @@ -37,7 +37,6 @@ #include "filenames.h" #include "binemul.h" #include "plugin.h" -#include #ifdef __GO32___ #define EXT_NAME_LEN 3 /* Bufflen of addition to name if it's MS-DOS. */ diff --git a/binutils/bucomm.c b/binutils/bucomm.c index a9e0cb9f3e5..86cb6e480a0 100644 --- a/binutils/bucomm.c +++ b/binutils/bucomm.c @@ -1,6 +1,6 @@ /* bucomm.c -- Bin Utils COMmon code. Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002, - 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 + 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -29,7 +29,6 @@ #include "filenames.h" #include "libbfd.h" -#include #include /* ctime, maybe time_t */ #include #include "bucomm.h" diff --git a/binutils/budbg.h b/binutils/budbg.h index b9de0223dd8..b87defbda46 100644 --- a/binutils/budbg.h +++ b/binutils/budbg.h @@ -1,5 +1,5 @@ /* budbg.c -- Interfaces to the generic debugging information routines. - Copyright 1995, 1996, 2002, 2003, 2005, 2007, 2008 + Copyright 1995, 1996, 2002, 2003, 2005, 2007, 2008, 2012 Free Software Foundation, Inc. Written by Ian Lance Taylor . @@ -23,8 +23,6 @@ #ifndef BUDBG_H #define BUDBG_H -#include - /* Routine used to read generic debugging information. */ extern void *read_debugging_info (bfd *, asymbol **, long, bfd_boolean); diff --git a/binutils/dlltool.c b/binutils/dlltool.c index a1b8d3ee68d..33101fc2b17 100644 --- a/binutils/dlltool.c +++ b/binutils/dlltool.c @@ -1,6 +1,6 @@ /* dlltool.c -- tool to generate stuff for PE style DLLs Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, 2011 Free Software Foundation, Inc. + 2005, 2006, 2007, 2008, 2009, 2011, 2012 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -232,15 +232,6 @@ .idata$7 = dll name (eg: "kernel32.dll"). (.idata$6 for ppc). */ -/* AIX requires this to be the first thing in the file. */ -#ifndef __GNUC__ -# ifdef _AIX - #pragma alloca -#endif -#endif - -#define show_allnames 0 - #include "sysdep.h" #include "bfd.h" #include "libiberty.h" @@ -252,8 +243,6 @@ #include "safe-ctype.h" #include -#include -#include #include #ifdef DLLTOOL_ARM @@ -319,6 +308,8 @@ static void mcore_elf_gen_out_file (void); #endif /* defined (_WIN32) && ! defined (__CYGWIN32__) */ #endif /* ! HAVE_SYS_WAIT_H */ +#define show_allnames 0 + /* ifunc and ihead data structures: ttk@cygnus.com 1997 When IMPORT declarations are encountered in a .def file the diff --git a/binutils/dlltool.h b/binutils/dlltool.h index 35a22801ff3..f3b203ba9f1 100644 --- a/binutils/dlltool.h +++ b/binutils/dlltool.h @@ -1,5 +1,6 @@ /* dlltool.h -- header file for dlltool - Copyright 1997, 1998, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. + Copyright 1997, 1998, 2003, 2004, 2005, 2007, 2009, 2012 + Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -18,9 +19,6 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "ansidecl.h" -#include - extern void def_code (int); extern void def_data (int); extern void def_description (const char *); diff --git a/binutils/dllwrap.c b/binutils/dllwrap.c index 293a49136be..a6dae902c40 100644 --- a/binutils/dllwrap.c +++ b/binutils/dllwrap.c @@ -1,6 +1,6 @@ /* dllwrap.c -- wrapper for DLLTOOL and GCC to generate PE style DLLs Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009, - 2011 Free Software Foundation, Inc. + 2011, 2012 Free Software Foundation, Inc. Contributed by Mumit Khan (khan@xraylith.wisc.edu). This file is part of GNU Binutils. @@ -20,13 +20,6 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -/* AIX requires this to be the first thing in the file. */ -#ifndef __GNUC__ -# ifdef _AIX - #pragma alloca -#endif -#endif - #include "sysdep.h" #include "bfd.h" #include "libiberty.h" @@ -35,7 +28,6 @@ #include "bucomm.h" #include -#include #ifdef HAVE_SYS_WAIT_H #include diff --git a/binutils/elfedit.c b/binutils/elfedit.c index f7bf9e99e7e..d9e23a12b50 100644 --- a/binutils/elfedit.c +++ b/binutils/elfedit.c @@ -1,5 +1,5 @@ /* elfedit.c -- Update the ELF header of an ELF format file - Copyright 2010 + Copyright 2010, 2011, 2012 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -19,10 +19,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "config.h" #include "sysdep.h" #include -#include #if __GNUC__ >= 2 /* Define BFD64 here, even if our default architecture is 32 bit ELF diff --git a/binutils/nlmconv.c b/binutils/nlmconv.c index 157b41c21f8..64214e71323 100644 --- a/binutils/nlmconv.c +++ b/binutils/nlmconv.c @@ -1,6 +1,7 @@ /* nlmconv.c -- NLM conversion program Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 + Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -42,8 +43,6 @@ #include "ansidecl.h" #include -#include -#include #include #include "getopt.h" diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 31ac0a2bb3e..230d3e56480 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -1,6 +1,6 @@ /* objcopy.c -- copy object file from input to output, optionally massaging it. Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 + 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -30,7 +30,6 @@ #include "filenames.h" #include "fnmatch.h" #include "elf-bfd.h" -#include #include "libbfd.h" #include "coff/internal.h" #include "libcoff.h" diff --git a/binutils/objdump.c b/binutils/objdump.c index ede9ba3b9aa..76ca2db726e 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -1,7 +1,7 @@ /* objdump.c -- dump information about an object file. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 - Free Software Foundation, Inc. + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, + 2012 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -71,8 +71,6 @@ #include #endif -#include - /* Internal headers for the ELF .stab-dump code - sorry. */ #define BYTES_IN_WORD 32 #include "aout/aout64.h" diff --git a/binutils/objdump.h b/binutils/objdump.h index d935c60a65f..214ecc69705 100644 --- a/binutils/objdump.h +++ b/binutils/objdump.h @@ -1,5 +1,5 @@ /* objdump.h - Copyright 2011 Free Software Foundation, Inc. + Copyright 2011, 2012 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -18,8 +18,6 @@ Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -#include - struct objdump_private_option { /* Option name. */ diff --git a/binutils/od-macho.c b/binutils/od-macho.c index d0b4cc1cb2a..ca1dba73b4a 100644 --- a/binutils/od-macho.c +++ b/binutils/od-macho.c @@ -19,9 +19,9 @@ Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "sysdep.h" #include #include -#include "sysdep.h" #include "safe-ctype.h" #include "bfd.h" #include "objdump.h" diff --git a/binutils/od-xcoff.c b/binutils/od-xcoff.c index 2b38cbdaca5..41f8ba3306c 100644 --- a/binutils/od-xcoff.c +++ b/binutils/od-xcoff.c @@ -1,5 +1,5 @@ /* od-xcoff.c -- dump information about an xcoff object file. - Copyright 2011 Free Software Foundation, Inc. + Copyright 2011, 2012 Free Software Foundation, Inc. Written by Tristan Gingold, Adacore. This file is part of GNU Binutils. @@ -19,9 +19,9 @@ Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "sysdep.h" #include #include -#include "sysdep.h" #include "safe-ctype.h" #include "bfd.h" #include "objdump.h" diff --git a/binutils/readelf.c b/binutils/readelf.c index 3ade53e8582..560df7ab80c 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -42,10 +42,8 @@ ELF file than is provided by objdump. In particular it can display DWARF debugging information which (at the moment) objdump cannot. */ -#include "config.h" #include "sysdep.h" #include -#include #include #ifdef HAVE_ZLIB_H #include diff --git a/binutils/rename.c b/binutils/rename.c index c07150c9556..5923a3f4ce2 100644 --- a/binutils/rename.c +++ b/binutils/rename.c @@ -22,8 +22,6 @@ #include "bfd.h" #include "bucomm.h" -#include - #ifdef HAVE_GOOD_UTIME_H #include #else /* ! HAVE_GOOD_UTIME_H */ diff --git a/binutils/resrc.c b/binutils/resrc.c index 62bc9fe588a..702d2f18183 100644 --- a/binutils/resrc.c +++ b/binutils/resrc.c @@ -32,11 +32,6 @@ #include "windres.h" #include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif #ifdef HAVE_SYS_WAIT_H #include diff --git a/binutils/strings.c b/binutils/strings.c index 4763512fb78..3eed63adad5 100644 --- a/binutils/strings.c +++ b/binutils/strings.c @@ -1,6 +1,6 @@ /* strings -- print the strings of printable characters in files Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011 + 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -65,7 +65,6 @@ #include "getopt.h" #include "libiberty.h" #include "safe-ctype.h" -#include #include "bucomm.h" #define STRING_ISGRAPHIC(c) \ diff --git a/binutils/sysdep.h b/binutils/sysdep.h index e573637b8c7..0e1d502fcdc 100644 --- a/binutils/sysdep.h +++ b/binutils/sysdep.h @@ -1,6 +1,6 @@ /* sysdep.h -- handle host dependencies for binutils Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009 + 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2012 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -69,6 +69,10 @@ extern char *strrchr (); #endif #endif +#ifdef HAVE_SYS_STAT_H +#include +#endif + #include "binary-io.h" #if !HAVE_DECL_STPCPY diff --git a/binutils/windres.c b/binutils/windres.c index b30ced9740d..7de73ef2f55 100644 --- a/binutils/windres.c +++ b/binutils/windres.c @@ -1,6 +1,6 @@ /* windres.c -- a program to manipulate Windows resources Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, - 2009, 2011 Free Software Foundation, Inc. + 2009, 2011, 2012 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. Rewritten by Kai Tietz, Onevision. @@ -45,7 +45,6 @@ #include "safe-ctype.h" #include "obstack.h" #include "windres.h" -#include /* Used by resrc.c at least. */