Don't declare xmalloc or xrealloc in bucomm.h

It's better to include the proper header, which has declarations with
various attributes.  Commit 096aefc040 in 1994 introduced this wart.

	* bucomm.h (xmalloc, xrealloc): Delete declaration.
	* od-macho.c: Include libiberty.h.
	* od-xcoff.c: Include libiberty.h.
This commit is contained in:
Alan Modra
2023-08-02 07:53:26 +09:30
parent 665b41c0ce
commit b6456e91d4
3 changed files with 2 additions and 6 deletions

View File

@@ -76,12 +76,6 @@ extern void set_times (const char *, const struct stat *);
extern int smart_rename (const char *, const char *, int, extern int smart_rename (const char *, const char *, int,
struct stat *, bool); struct stat *, bool);
/* In libiberty. */
void *xmalloc (size_t);
void *xrealloc (void *, size_t);
#if __GNUC__ >= 7 #if __GNUC__ >= 7
#define _mul_overflow(a, b, res) __builtin_mul_overflow (a, b, res) #define _mul_overflow(a, b, res) __builtin_mul_overflow (a, b, res)
#else #else

View File

@@ -23,6 +23,7 @@
#include <stddef.h> #include <stddef.h>
#include <time.h> #include <time.h>
#include "safe-ctype.h" #include "safe-ctype.h"
#include "libiberty.h"
#include "bfd.h" #include "bfd.h"
#include "objdump.h" #include "objdump.h"
#include "bucomm.h" #include "bucomm.h"

View File

@@ -23,6 +23,7 @@
#include <stddef.h> #include <stddef.h>
#include <time.h> #include <time.h>
#include "safe-ctype.h" #include "safe-ctype.h"
#include "libiberty.h"
#include "bfd.h" #include "bfd.h"
#include "objdump.h" #include "objdump.h"
#include "bucomm.h" #include "bucomm.h"