forked from Imagelibrary/binutils-gdb
Move realoc() decl to utils.c. s/realloc()/xrealloc()/.
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
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>
|
2001-03-19 Andrew Cagney <ac131313@redhat.com>
|
||||||
|
|
||||||
* defs.h (free): Move declaration from here.
|
* defs.h (free): Move declaration from here.
|
||||||
|
|||||||
@@ -42,5 +42,3 @@
|
|||||||
#define MALLOC_INCOMPATIBLE
|
#define MALLOC_INCOMPATIBLE
|
||||||
|
|
||||||
extern void *malloc (size_t);
|
extern void *malloc (size_t);
|
||||||
|
|
||||||
extern void *realloc (void *, size_t);
|
|
||||||
|
|||||||
@@ -951,10 +951,6 @@ extern double atof (const char *); /* X3.159-1989 4.10.1.1 */
|
|||||||
extern PTR malloc ();
|
extern PTR malloc ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NEED_DECLARATION_REALLOC
|
|
||||||
extern PTR realloc ();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* MALLOC_INCOMPATIBLE */
|
#endif /* MALLOC_INCOMPATIBLE */
|
||||||
|
|
||||||
/* Various possibilities for alloca. */
|
/* Various possibilities for alloca. */
|
||||||
|
|||||||
@@ -544,8 +544,9 @@ create_file_handler (int fd, int mask, handler_func * proc, gdb_client_data clie
|
|||||||
gdb_notifier.num_fds++;
|
gdb_notifier.num_fds++;
|
||||||
if (gdb_notifier.poll_fds)
|
if (gdb_notifier.poll_fds)
|
||||||
gdb_notifier.poll_fds =
|
gdb_notifier.poll_fds =
|
||||||
(struct pollfd *) realloc (gdb_notifier.poll_fds,
|
(struct pollfd *) xrealloc (gdb_notifier.poll_fds,
|
||||||
(gdb_notifier.num_fds) * sizeof (struct pollfd));
|
(gdb_notifier.num_fds
|
||||||
|
* sizeof (struct pollfd)));
|
||||||
else
|
else
|
||||||
gdb_notifier.poll_fds =
|
gdb_notifier.poll_fds =
|
||||||
(struct pollfd *) xmalloc (sizeof (struct pollfd));
|
(struct pollfd *) xmalloc (sizeof (struct pollfd));
|
||||||
|
|||||||
@@ -780,8 +780,8 @@ insert_thread (int tid, int lid, td_thr_state_e state, td_thr_type_e type)
|
|||||||
if (threadlist_top >= threadlist_max)
|
if (threadlist_top >= threadlist_max)
|
||||||
{
|
{
|
||||||
threadlist_max += THREADLIST_ALLOC;
|
threadlist_max += THREADLIST_ALLOC;
|
||||||
threadlist = realloc (threadlist,
|
threadlist = xrealloc (threadlist,
|
||||||
threadlist_max * sizeof (threadinfo));
|
threadlist_max * sizeof (threadinfo));
|
||||||
if (threadlist == NULL)
|
if (threadlist == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1782,8 +1782,8 @@ add_filename_language (char *ext, enum language lang)
|
|||||||
if (fl_table_next >= fl_table_size)
|
if (fl_table_next >= fl_table_size)
|
||||||
{
|
{
|
||||||
fl_table_size += 10;
|
fl_table_size += 10;
|
||||||
filename_language_table = realloc (filename_language_table,
|
filename_language_table = xrealloc (filename_language_table,
|
||||||
fl_table_size);
|
fl_table_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
filename_language_table[fl_table_next].ext = xstrdup (ext);
|
filename_language_table[fl_table_next].ext = xstrdup (ext);
|
||||||
|
|||||||
@@ -57,6 +57,9 @@
|
|||||||
#include <readline/readline.h>
|
#include <readline/readline.h>
|
||||||
|
|
||||||
#ifndef MALLOC_INCOMPATIBLE
|
#ifndef MALLOC_INCOMPATIBLE
|
||||||
|
#ifdef NEED_DECLARATION_REALLOC
|
||||||
|
extern PTR realloc ();
|
||||||
|
#endif
|
||||||
#ifdef NEED_DECLARATION_FREE
|
#ifdef NEED_DECLARATION_FREE
|
||||||
extern void free ();
|
extern void free ();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user