mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-29 08:24:05 +08:00
Rename _doprnt -> _bfd_doprnt to fix DJGPP bfd build (and likely others)
Building bfd/ for DJGPP, I see: ../../src/bfd/bfd.c:642:1: error: conflicting types for '_doprnt' _doprnt (FILE *stream, const char *format, va_list ap) ^~~~~~~ In file included from ../../src/bfd/sysdep.h:37:0, from ../../src/bfd/bfd.c:367: /usr/lib64/gcc/i586-pc-msdosdjgpp/6.1.0/include-fixed/stdio.h:171:5: note: previous declaration of '_doprnt' was here int _doprnt(const char *_fmt, va_list _args, FILE *_f); ^~~~~~~ Possible fixes the build on other systems too -- _doprnt was/is an exported symbol on old Unix/BSD systems too. bfd/ChangeLog: 2017-10-11 Pedro Alves <palves@redhat.com> * bfd.c (_doprnt): Rename to ... (_bfd_doprnt): ... this. (error_handler_internal): Adjust.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2017-10-11 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
|
* bfd.c (_doprnt): Rename to ...
|
||||||
|
(_bfd_doprnt): ... this.
|
||||||
|
(error_handler_internal): Adjust.
|
||||||
|
|
||||||
2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
|
2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
|
* elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
|
||||||
|
13
bfd/bfd.c
13
bfd/bfd.c
@ -626,10 +626,11 @@ CODE_FRAGMENT
|
|||||||
|
|
||||||
static const char *_bfd_error_program_name;
|
static const char *_bfd_error_program_name;
|
||||||
|
|
||||||
/* This macro and _doprnt taken from libiberty _doprnt.c, tidied a
|
/* This macro and _bfd_doprnt (originally _doprint) taken from
|
||||||
little and extended to handle '%A' and '%B'. 'L' as a modifer for
|
libiberty _doprnt.c, tidied a little and extended to handle '%A'
|
||||||
integer formats is used for bfd_vma and bfd_size_type args, which
|
and '%B'. 'L' as a modifer for integer formats is used for bfd_vma
|
||||||
vary in size depending on BFD configuration. */
|
and bfd_size_type args, which vary in size depending on BFD
|
||||||
|
configuration. */
|
||||||
|
|
||||||
#define PRINT_TYPE(TYPE) \
|
#define PRINT_TYPE(TYPE) \
|
||||||
do \
|
do \
|
||||||
@ -639,7 +640,7 @@ static const char *_bfd_error_program_name;
|
|||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_doprnt (FILE *stream, const char *format, va_list ap)
|
_bfd_doprnt (FILE *stream, const char *format, va_list ap)
|
||||||
{
|
{
|
||||||
const char *ptr = format;
|
const char *ptr = format;
|
||||||
char specifier[128];
|
char specifier[128];
|
||||||
@ -883,7 +884,7 @@ error_handler_internal (const char *fmt, va_list ap)
|
|||||||
else
|
else
|
||||||
fprintf (stderr, "BFD: ");
|
fprintf (stderr, "BFD: ");
|
||||||
|
|
||||||
_doprnt (stderr, fmt, ap);
|
_bfd_doprnt (stderr, fmt, ap);
|
||||||
|
|
||||||
/* On AIX, putc is implemented as a macro that triggers a -Wunused-value
|
/* On AIX, putc is implemented as a macro that triggers a -Wunused-value
|
||||||
warning, so use the fputc function to avoid it. */
|
warning, so use the fputc function to avoid it. */
|
||||||
|
Reference in New Issue
Block a user