From d3818bb045a01909ad545b8f5a9452b12d425db1 Mon Sep 17 00:00:00 2001 From: bebbo Date: Sat, 18 Feb 2017 11:33:19 +0100 Subject: [PATCH] @I add #include "config.h" and add an explicit void to remove warnings with some compilers --- binutils/ar.c | 3 ++- binutils/arlex.c | 1 + binutils/arparse.c | 1 + binutils/arsup.c | 1 + binutils/binemul.c | 1 + binutils/bucomm.c | 3 +++ binutils/rename.c | 1 + binutils/version.c | 1 + ld/ldmain.c | 2 +- 9 files changed, 12 insertions(+), 2 deletions(-) diff --git a/binutils/ar.c b/binutils/ar.c index 9a6946e..656246a 100644 --- a/binutils/ar.c +++ b/binutils/ar.c @@ -26,6 +26,7 @@ when name truncated. No way to specify pos_end. Error messages should be more consistant. */ +#include "config.h" #include "bfd.h" #include "libiberty.h" #include "progress.h" @@ -351,7 +352,7 @@ static FILE *output_file = NULL; static bfd *output_bfd = NULL; static void -remove_output () +remove_output (void) { if (output_filename != NULL) { diff --git a/binutils/arlex.c b/binutils/arlex.c index 61704d7..1402d70 100644 --- a/binutils/arlex.c +++ b/binutils/arlex.c @@ -20,6 +20,7 @@ #include #include #include +#include /* end standard C headers. */ diff --git a/binutils/arparse.c b/binutils/arparse.c index 3093130..0258328 100644 --- a/binutils/arparse.c +++ b/binutils/arparse.c @@ -50,6 +50,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ */ #define DONTDECLARE_MALLOC +#include "config.h" #include "bfd.h" #include "bucomm.h" #include "arsup.h" diff --git a/binutils/arsup.c b/binutils/arsup.c index b3e9672..c670f62 100644 --- a/binutils/arsup.c +++ b/binutils/arsup.c @@ -25,6 +25,7 @@ This file looks after requests from arparse.y, to provide the MRI style librarian command syntax + 1 word LIST. */ +#include "config.h" #include "bfd.h" #include "arsup.h" #include "libiberty.h" diff --git a/binutils/binemul.c b/binutils/binemul.c index 67aaba8..ae311ea 100644 --- a/binutils/binemul.c +++ b/binutils/binemul.c @@ -18,6 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include "config.h" #include "binemul.h" extern bin_emulation_xfer_type bin_dummy_emulation; diff --git a/binutils/bucomm.c b/binutils/bucomm.c index 237f934..66cb36a 100644 --- a/binutils/bucomm.c +++ b/binutils/bucomm.c @@ -22,6 +22,7 @@ /* We might put this in a library someday so it could be dynamically loaded, but for now it's not necessary. */ +#include "config.h" #include "bfd.h" #include "bfdver.h" #include "libiberty.h" @@ -34,9 +35,11 @@ #ifndef HAVE_TIME_T_IN_TIME_H #ifndef HAVE_TIME_T_IN_TYPES_H +#ifndef _TIME_T_DEFINED typedef long time_t; #endif #endif +#endif static const char * endian_string PARAMS ((enum bfd_endian)); static int display_target_list PARAMS ((void)); diff --git a/binutils/rename.c b/binutils/rename.c index 82185b6..5dca249 100644 --- a/binutils/rename.c +++ b/binutils/rename.c @@ -18,6 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include "config.h" #include "bfd.h" #include "bucomm.h" diff --git a/binutils/version.c b/binutils/version.c index 0a7baa3..eefc889 100644 --- a/binutils/version.c +++ b/binutils/version.c @@ -19,6 +19,7 @@ along with this program; if not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include +#include "config.h" #include "bfd.h" #include "bfdver.h" #include "bucomm.h" diff --git a/ld/ldmain.c b/ld/ldmain.c index b5fc307..9d957dd 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -162,7 +162,7 @@ static struct bfd_link_callbacks link_callbacks = struct bfd_link_info link_info; static void -remove_output () +remove_output (void) { if (output_filename) {