* 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-09 Alan Modra <amodra@gmail.com>
+
+ * 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 <nickc@redhat.com>
PR binutils/13493
#include "filenames.h"
#include "binemul.h"
#include "plugin.h"
-#include <sys/stat.h>
#ifdef __GO32___
#define EXT_NAME_LEN 3 /* Bufflen of addition to name if it's MS-DOS. */
/* 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.
#include "filenames.h"
#include "libbfd.h"
-#include <sys/stat.h>
#include <time.h> /* ctime, maybe time_t */
#include <assert.h>
#include "bucomm.h"
/* 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 <ian@cygnus.com>.
#ifndef BUDBG_H
#define BUDBG_H
-#include <stdio.h>
-
/* Routine used to read generic debugging information. */
extern void *read_debugging_info (bfd *, asymbol **, long, bfd_boolean);
/* 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.
.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"
#include "safe-ctype.h"
#include <time.h>
-#include <sys/stat.h>
-#include <stdarg.h>
#include <assert.h>
#ifdef DLLTOOL_ARM
#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
/* 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.
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include "ansidecl.h"
-#include <stdio.h>
-
extern void def_code (int);
extern void def_data (int);
extern void def_description (const char *);
/* 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.
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"
#include "bucomm.h"
#include <time.h>
-#include <sys/stat.h>
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
/* 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.
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
\f
-#include "config.h"
#include "sysdep.h"
#include <assert.h>
-#include <sys/stat.h>
#if __GNUC__ >= 2
/* Define BFD64 here, even if our default architecture is 32 bit ELF
/* 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.
#include "ansidecl.h"
#include <time.h>
-#include <sys/stat.h>
-#include <sys/file.h>
#include <assert.h>
#include "getopt.h"
/* 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.
#include "filenames.h"
#include "fnmatch.h"
#include "elf-bfd.h"
-#include <sys/stat.h>
#include "libbfd.h"
#include "coff/internal.h"
#include "libcoff.h"
/* 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.
#include <sys/mman.h>
#endif
-#include <sys/stat.h>
-
/* Internal headers for the ELF .stab-dump code - sorry. */
#define BYTES_IN_WORD 32
#include "aout/aout64.h"
/* objdump.h
- Copyright 2011 Free Software Foundation, Inc.
+ Copyright 2011, 2012 Free Software Foundation, Inc.
This file is part of GNU Binutils.
Foundation, 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
-#include <stdio.h>
-
struct objdump_private_option
{
/* Option name. */
Foundation, 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
+#include "sysdep.h"
#include <stddef.h>
#include <time.h>
-#include "sysdep.h"
#include "safe-ctype.h"
#include "bfd.h"
#include "objdump.h"
/* 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.
Foundation, 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
+#include "sysdep.h"
#include <stddef.h>
#include <time.h>
-#include "sysdep.h"
#include "safe-ctype.h"
#include "bfd.h"
#include "objdump.h"
ELF file than is provided by objdump. In particular it can display DWARF
debugging information which (at the moment) objdump cannot. */
\f
-#include "config.h"
#include "sysdep.h"
#include <assert.h>
-#include <sys/stat.h>
#include <time.h>
#ifdef HAVE_ZLIB_H
#include <zlib.h>
#include "bfd.h"
#include "bucomm.h"
-#include <sys/stat.h>
-
#ifdef HAVE_GOOD_UTIME_H
#include <utime.h>
#else /* ! HAVE_GOOD_UTIME_H */
#include "windres.h"
#include <assert.h>
-#include <errno.h>
-#include <sys/stat.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
/* 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
#include "getopt.h"
#include "libiberty.h"
#include "safe-ctype.h"
-#include <sys/stat.h>
#include "bucomm.h"
#define STRING_ISGRAPHIC(c) \
/* 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.
#endif
#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
#include "binary-io.h"
#if !HAVE_DECL_STPCPY
/* 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.
#include "safe-ctype.h"
#include "obstack.h"
#include "windres.h"
-#include <sys/stat.h>
/* Used by resrc.c at least. */