From 85fe9d3e46ca45f86886f8baf9aa21fa6ec2ece7 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 7 Aug 1996 18:17:22 +0000 Subject: [PATCH] Wed Aug 7 14:11:44 1996 Philippe De Muyter * configure.in: Call BFD_NEEDED_DECLARATION on strstr and realloc. * acconfig.h (NEED_DECLARATION_STRSTR): New macro. (NEED_DECLARATION_REALLOC): New macro. * configure, config.in: Rebuild. * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR. (realloc): Declare if NEED_DECLARATION_REALLOC. --- bfd/ChangeLog | 15 +++++++++++++++ bfd/acconfig.h | 6 ++++++ bfd/sysdep.h | 13 ++++++++++--- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0f98577..b22f625 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,18 @@ +Wed Aug 7 14:11:44 1996 Philippe De Muyter + + * configure.in: Call BFD_NEEDED_DECLARATION on strstr and + realloc. + * acconfig.h (NEED_DECLARATION_STRSTR): New macro. + (NEED_DECLARATION_REALLOC): New macro. + * configure, config.in: Rebuild. + * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR. + (realloc): Declare if NEED_DECLARATION_REALLOC. + + * aclocal.m4 (BFD_NEED_DECLARATION): Include or + if they exist. + + * ieee.c (ieee_set_section_contents): Cast bfd_alloc return. + Wed Aug 7 12:12:03 1996 Ian Lance Taylor Based on patches from Eric Valette : diff --git a/bfd/acconfig.h b/bfd/acconfig.h index 647798c..496c0ae 100644 --- a/bfd/acconfig.h +++ b/bfd/acconfig.h @@ -1,7 +1,13 @@ +/* Whether strstr must be declared even if is included. */ +#undef NEED_DECLARATION_STRSTR + /* Whether malloc must be declared even if is included. */ #undef NEED_DECLARATION_MALLOC +/* Whether realloc must be declared even if is included. */ +#undef NEED_DECLARATION_REALLOC + /* Whether free must be declared even if is included. */ #undef NEED_DECLARATION_FREE @TOP@ diff --git a/bfd/sysdep.h b/bfd/sysdep.h index dd8146a..4a0b821 100644 --- a/bfd/sysdep.h +++ b/bfd/sysdep.h @@ -46,7 +46,6 @@ extern int errno; #else extern char *strchr (); extern char *strrchr (); -extern char *strstr (); #endif #endif @@ -54,11 +53,11 @@ extern char *strstr (); #include #endif -#if TIME_WITH_SYS_TIME +#ifdef TIME_WITH_SYS_TIME #include #include #else -#if HAVE_SYS_TIME_H +#ifdef HAVE_SYS_TIME_H #include #else #include @@ -103,10 +102,18 @@ extern char *strstr (); #define SEEK_CUR 1 #endif +#ifdef NEED_DECLARATION_STRSTR +extern char *strstr (); +#endif + #ifdef NEED_DECLARATION_MALLOC extern PTR malloc (); #endif +#ifdef NEED_DECLARATION_REALLOC +extern PTR realloc (); +#endif + #ifdef NEED_DECLARATION_FREE extern void free (); #endif -- 2.7.4