mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 13:56:22 +08:00
* bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
VA_OPEN, VA_FIXEDARG, VA_CLOSE. (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2001-09-26 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
|
||||||
|
VA_OPEN, VA_FIXEDARG, VA_CLOSE.
|
||||||
|
(bfd_archive_filename): Cast bfd_malloc arg to the correct size.
|
||||||
|
|
||||||
2001-09-25 Jakub Jelinek <jakub@redhat.com>
|
2001-09-25 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
|
* elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
|
||||||
|
43
bfd/bfd.c
43
bfd/bfd.c
@ -410,57 +410,24 @@ static const char *_bfd_error_program_name;
|
|||||||
|
|
||||||
/* This is the default routine to handle BFD error messages. */
|
/* This is the default routine to handle BFD error messages. */
|
||||||
|
|
||||||
#ifdef ANSI_PROTOTYPES
|
|
||||||
|
|
||||||
static void _bfd_default_error_handler PARAMS ((const char *s, ...));
|
static void _bfd_default_error_handler PARAMS ((const char *s, ...));
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_bfd_default_error_handler (const char *s, ...)
|
_bfd_default_error_handler VPARAMS ((const char *s, ...))
|
||||||
{
|
{
|
||||||
va_list p;
|
|
||||||
|
|
||||||
if (_bfd_error_program_name != NULL)
|
if (_bfd_error_program_name != NULL)
|
||||||
fprintf (stderr, "%s: ", _bfd_error_program_name);
|
fprintf (stderr, "%s: ", _bfd_error_program_name);
|
||||||
else
|
else
|
||||||
fprintf (stderr, "BFD: ");
|
fprintf (stderr, "BFD: ");
|
||||||
|
|
||||||
va_start (p, s);
|
VA_OPEN (p, s);
|
||||||
|
VA_FIXEDARG (p, const char *, s);
|
||||||
vfprintf (stderr, s, p);
|
vfprintf (stderr, s, p);
|
||||||
|
VA_CLOSE (p);
|
||||||
va_end (p);
|
|
||||||
|
|
||||||
fprintf (stderr, "\n");
|
fprintf (stderr, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* ! defined (ANSI_PROTOTYPES) */
|
|
||||||
|
|
||||||
static void _bfd_default_error_handler ();
|
|
||||||
|
|
||||||
static void
|
|
||||||
_bfd_default_error_handler (va_alist)
|
|
||||||
va_dcl
|
|
||||||
{
|
|
||||||
va_list p;
|
|
||||||
const char *s;
|
|
||||||
|
|
||||||
if (_bfd_error_program_name != NULL)
|
|
||||||
fprintf (stderr, "%s: ", _bfd_error_program_name);
|
|
||||||
else
|
|
||||||
fprintf (stderr, "BFD: ");
|
|
||||||
|
|
||||||
va_start (p);
|
|
||||||
|
|
||||||
s = va_arg (p, const char *);
|
|
||||||
vfprintf (stderr, s, p);
|
|
||||||
|
|
||||||
va_end (p);
|
|
||||||
|
|
||||||
fprintf (stderr, "\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* ! defined (ANSI_PROTOTYPES) */
|
|
||||||
|
|
||||||
/* This is a function pointer to the routine which should handle BFD
|
/* This is a function pointer to the routine which should handle BFD
|
||||||
error messages. It is called when a BFD routine encounters an
|
error messages. It is called when a BFD routine encounters an
|
||||||
error for which it wants to print a message. Going through a
|
error for which it wants to print a message. Going through a
|
||||||
@ -560,7 +527,7 @@ bfd_archive_filename (abfd)
|
|||||||
if (curr)
|
if (curr)
|
||||||
free (buf);
|
free (buf);
|
||||||
curr = needed + (needed >> 1);
|
curr = needed + (needed >> 1);
|
||||||
buf = bfd_malloc (curr);
|
buf = bfd_malloc ((bfd_size_type) curr);
|
||||||
/* If we can't malloc, fail safe by returning just the file
|
/* If we can't malloc, fail safe by returning just the file
|
||||||
name. This function is only used when building error
|
name. This function is only used when building error
|
||||||
messages. */
|
messages. */
|
||||||
|
Reference in New Issue
Block a user