diff options
author | Tom Tromey <tom@tromey.com> | 2023-08-27 12:11:00 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-11-07 17:30:15 -0700 |
commit | 426931be4b538078c89c09d89ae3ecbab3146f46 (patch) | |
tree | 1e07032d9436e655db96d5a724fc5e3d61b21bef /bfd/libbfd.h | |
parent | 9da76ef30c4001de2f84ebfc9c67f7424f3b7387 (diff) | |
download | gdb-426931be4b538078c89c09d89ae3ecbab3146f46.zip gdb-426931be4b538078c89c09d89ae3ecbab3146f46.tar.gz gdb-426931be4b538078c89c09d89ae3ecbab3146f46.tar.bz2 |
Make _bfd_error_buf static
This makes _bfd_error_buf static and adds a way to clear it. I felt
that this made the subsequent patches a little cleaner.
* bfd.c (_bfd_error_buf): Now static.
(bfd_set_input_error): Use _bfd_clear_error_data.
(_bfd_clear_error_data): New function.
(bfd_init): Use _bfd_clear_error_data.
* libbfd.h: Regenerate.
* opncls.c (bfd_close_all_done): Use _bfd_clear_error_data.
* po/bfd.pot: Regenerate.
Diffstat (limited to 'bfd/libbfd.h')
-rw-r--r-- | bfd/libbfd.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bfd/libbfd.h b/bfd/libbfd.h index fce0680..498ce8d 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -929,8 +929,7 @@ bool bfd_write_bigendian_4byte_int (bfd *, unsigned int) ATTRIBUTE_HIDDEN; unsigned int bfd_log2 (bfd_vma x) ATTRIBUTE_HIDDEN; /* Extracted from bfd.c. */ -/* A buffer that is freed on bfd_close. */ -extern char *_bfd_error_buf; +void _bfd_clear_error_data (void) ATTRIBUTE_HIDDEN; char *bfd_asprintf (const char *fmt, ...) ATTRIBUTE_HIDDEN; |