2001-03-19 Andrew Cagney <ac131313@redhat.com>
+ * defs.h (realloc): Move declaration from here.
+ * utils.c (realloc): To here.
+ * config/pa/xm-hppah.h (realloc): Delete declaration.
+ * lin-thread.c (insert_thread): Use xrealloc instead of realloc.
+ * symfile.c (add_filename_language): Ditto.
+ * event-loop.c (create_file_handler): Ditto.
+
+2001-03-19 Andrew Cagney <ac131313@redhat.com>
+
* defs.h (free): Move declaration from here.
* utils.c (free): To here.
(xfree): Document as the only call to free().
#define MALLOC_INCOMPATIBLE
extern void *malloc (size_t);
-
-extern void *realloc (void *, size_t);
extern PTR malloc ();
#endif
-#ifdef NEED_DECLARATION_REALLOC
-extern PTR realloc ();
-#endif
-
#endif /* MALLOC_INCOMPATIBLE */
/* Various possibilities for alloca. */
gdb_notifier.num_fds++;
if (gdb_notifier.poll_fds)
gdb_notifier.poll_fds =
- (struct pollfd *) realloc (gdb_notifier.poll_fds,
- (gdb_notifier.num_fds) * sizeof (struct pollfd));
+ (struct pollfd *) xrealloc (gdb_notifier.poll_fds,
+ (gdb_notifier.num_fds
+ * sizeof (struct pollfd)));
else
gdb_notifier.poll_fds =
(struct pollfd *) xmalloc (sizeof (struct pollfd));
if (threadlist_top >= threadlist_max)
{
threadlist_max += THREADLIST_ALLOC;
- threadlist = realloc (threadlist,
- threadlist_max * sizeof (threadinfo));
+ threadlist = xrealloc (threadlist,
+ threadlist_max * sizeof (threadinfo));
if (threadlist == NULL)
return NULL;
}
if (fl_table_next >= fl_table_size)
{
fl_table_size += 10;
- filename_language_table = realloc (filename_language_table,
- fl_table_size);
+ filename_language_table = xrealloc (filename_language_table,
+ fl_table_size);
}
filename_language_table[fl_table_next].ext = xstrdup (ext);
#include <readline/readline.h>
#ifndef MALLOC_INCOMPATIBLE
+#ifdef NEED_DECLARATION_REALLOC
+extern PTR realloc ();
+#endif
#ifdef NEED_DECLARATION_FREE
extern void free ();
#endif