Make _bfd_error_handler available outside libbfd
authorAlan Modra <amodra@gmail.com>
Fri, 1 Jun 2018 01:30:46 +0000 (11:00 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 1 Jun 2018 03:40:33 +0000 (13:10 +0930)
Needed when building libopcodes.so.

bfd/
* bfd.c (_bfd_error_handler): Arrange for this function to be
declared in bfd-in2.h.
* libbfd-in.h (_bfd_error_handler): Don't declare.
* libbfd.h: Regenerate.
* bfd-in2.h: Regenerate.
opcodes/
* sysdep.h (_bfd_error_handler): Don't declare.
* msp430-decode.opc: Include bfd.h.  Don't include ansidecl.h here.
* rl78-decode.opc: Likewise.
* msp430-decode.c: Regenerate.
* rl78-decode.c: Regenerate.

bfd/ChangeLog
bfd/bfd-in2.h
bfd/bfd.c
bfd/libbfd-in.h
bfd/libbfd.h
opcodes/ChangeLog
opcodes/msp430-decode.c
opcodes/msp430-decode.opc
opcodes/rl78-decode.c
opcodes/rl78-decode.opc
opcodes/sysdep.h

index 829305e570ba63434c6c9bb47d4c75d7a4ca3a35..afc4d4fbee5d4d1847da833c8758b371da1a9ac6 100644 (file)
@@ -1,3 +1,11 @@
+2018-06-01  Alan Modra  <amodra@gmail.com>
+
+       * bfd.c (_bfd_error_handler): Arrange for this function to be
+       declared in bfd-in2.h.
+       * libbfd-in.h (_bfd_error_handler): Don't declare.
+       * libbfd.h: Regenerate.
+       * bfd-in2.h: Regenerate.
+
 2018-05-30  Amaan Cheval <amaan.cheval@gmail.com>
 
        * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
index 9d643f3ed3d0d345369f8364edc79279e0330a99..ef62f319534249637cf43e03352f7a00df8fa941 100644 (file)
@@ -7111,6 +7111,8 @@ void bfd_perror (const char *message);
 
 typedef void (*bfd_error_handler_type) (const char *, va_list);
 
+void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1;
+
 bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
 
 void bfd_set_error_program_name (const char *);
index 3bf56a6219ffc48bf40bb7ad9761c2649997ac82..09c817df4f5cdb0bb7f22a619e7a6d02a40c1d33 100644 (file)
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -1087,14 +1087,6 @@ _bfd_doprnt_scan (const char *format, union _bfd_doprnt_args *args)
   return arg_count;
 }
 
-/* This is the default routine to handle BFD error messages.
-   Like fprintf (stderr, ...), but also handles some extra format specifiers.
-
-   %pA section name from section.  For group components, prints group name too.
-   %pB file name from bfd.  For archive components, prints archive too.
-
-   Beware: Only supports a maximum of 9 format arguments.  */
-
 static void
 error_handler_internal (const char *fmt, va_list ap)
 {
@@ -1156,6 +1148,26 @@ error_handler_internal (const char *fmt, va_list ap)
 
 static bfd_error_handler_type _bfd_error_internal = error_handler_internal;
 
+/*
+FUNCTION
+       _bfd_error_handler
+
+SYNOPSIS
+       void _bfd_error_handler (const char *fmt, ...) ATTRIBUTE_PRINTF_1;
+
+DESCRIPTION
+       This is the default routine to handle BFD error messages.
+       Like fprintf (stderr, ...), but also handles some extra format
+       specifiers.
+
+       %pA section name from section.  For group components, prints
+       group name too.
+       %pB file name from bfd.  For archive components, prints
+       archive too.
+
+       Beware: Only supports a maximum of 9 format arguments.
+*/
+
 void
 _bfd_error_handler (const char *fmt, ...)
 {
index 9796f2d67ecc62fccbf65a876046d8f3a41cdcf2..3c55adf0753cfc17f06307962eb327ee914c5513 100644 (file)
@@ -123,9 +123,6 @@ extern void *bfd_realloc2
 extern void *bfd_zmalloc2
   (bfd_size_type, bfd_size_type) ATTRIBUTE_HIDDEN;
 
-extern void _bfd_error_handler (const char *s, ...)
-  ATTRIBUTE_PRINTF_1 ATTRIBUTE_HIDDEN;
-
 /* These routines allocate and free things on the BFD's objalloc.  */
 
 extern void *bfd_alloc2
index f357e0e4ab10d04b1bbc1105d08262879a9e8bc3..12b1a96557239f8a3b6ce5b455a9e515dfcd0c56 100644 (file)
@@ -128,9 +128,6 @@ extern void *bfd_realloc2
 extern void *bfd_zmalloc2
   (bfd_size_type, bfd_size_type) ATTRIBUTE_HIDDEN;
 
-extern void _bfd_error_handler (const char *s, ...)
-  ATTRIBUTE_PRINTF_1 ATTRIBUTE_HIDDEN;
-
 /* These routines allocate and free things on the BFD's objalloc.  */
 
 extern void *bfd_alloc2
index 005ca9355824c2c224af92429b652c430911c279..725bf15358589491c50b3fe5797928e85e59fc63 100644 (file)
@@ -1,3 +1,11 @@
+2018-06-01  Alan Modra  <amodra@gmail.com>
+
+       * sysdep.h (_bfd_error_handler): Don't declare.
+       * msp430-decode.opc: Include bfd.h.  Don't include ansidecl.h here.
+       * rl78-decode.opc: Likewise.
+       * msp430-decode.c: Regenerate.
+       * rl78-decode.c: Regenerate.
+
 2018-05-30  Amit Pawar <Amit.Pawar@amd.com>
 
        * i386-gen.c (cpu_flag_init): Add CPU_ZNVER2_FLAGS.
index eb101169ca9eb584ebb2a5eaceade6c30ac2480d..68d9073f582b1d7c281ca8f8d8f2cc7ae500bb49 100644 (file)
@@ -26,7 +26,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include "ansidecl.h"
+#include "bfd.h"
 #include "opintl.h"
 #include "opcode/msp430-decode.h"
 
index 8cdae5afaefaff55980b1b23d308e1f264492f34..71ff762d91fad0df7e32d112778630cd9f641e36 100644 (file)
@@ -24,7 +24,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include "ansidecl.h"
+#include "bfd.h"
 #include "opintl.h"
 #include "opcode/msp430-decode.h"
 
index 18d007603c43d27dc68122e370fe5672721770f6..3edc8ace8a02780e8acf18ce6a726fdd5b38060b 100644 (file)
@@ -26,7 +26,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include "ansidecl.h"
+#include "bfd.h"
 #include "opintl.h"
 #include "opcode/rl78.h"
 
index 49e9e69d9581b1d9be1db1d4ce1f7fc092503165..444ced27647475ae68f6715b906f90bffe1be0e9 100644 (file)
@@ -24,7 +24,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include "ansidecl.h"
+#include "bfd.h"
 #include "opintl.h"
 #include "opcode/rl78.h"
 
index 20f5828082af6e306d9c6a70ea8770f67391374f..8e5e6af1aea242d7dd5f0fc55c0e9325acadcb1d 100644 (file)
@@ -57,7 +57,6 @@ extern char *stpcpy (char *__dest, const char *__src);
 #endif
 
 #define opcodes_error_handler _bfd_error_handler
-extern void _bfd_error_handler (const char *, ...) ATTRIBUTE_PRINTF_1;
 
 /* Use sigsetjmp/siglongjmp without saving the signal mask if possible.
    It is faster than setjmp/longjmp on systems where the signal mask is
This page took 0.034717 seconds and 4 git commands to generate.