diff options
author | Nick Clifton <nickc@redhat.com> | 2010-05-25 10:14:16 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2010-05-25 10:14:16 +0000 |
commit | 9fcd9da67989f554961747332188536869222218 (patch) | |
tree | a4bd82b35558a6c42be7f5beb4bd0332149ed9f5 /bfd/archive.c | |
parent | 770c040b7ea961f5fa87658361a8384308204fa0 (diff) | |
download | gdb-9fcd9da67989f554961747332188536869222218.zip gdb-9fcd9da67989f554961747332188536869222218.tar.gz gdb-9fcd9da67989f554961747332188536869222218.tar.bz2 |
PR ld/11624
* archive.c (_bfd_calloc_wrapper): New function.
(_bfd_add_bfd_to_archive_cache): Use it.
* configure.in: Add alpha*-*-*vms* to list of natives.
* configure: Regenerate.
* vms-misc.c: Define globalref if necessary.
(vms_convert_to_var_unix_filename): Rename to
_bfd_vms_convert_to_var_unix_filename and export.
* vms.h: Add prototype for _bfd_vms_convert_to_var_unix_filename.
* vms-alpha.c (vms_close_and_cleanup): Update invocation of
vms_convert_to_var_unix_filename.
Diffstat (limited to 'bfd/archive.c')
-rw-r--r-- | bfd/archive.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bfd/archive.c b/bfd/archive.c index e6c1e83..fbe555b 100644 --- a/bfd/archive.c +++ b/bfd/archive.c @@ -303,6 +303,15 @@ eq_file_ptr (const PTR p1, const PTR p2) return arc1->ptr == arc2->ptr; } +/* The calloc function doesn't always take size_t (e.g. on VMS) + so wrap it to avoid a compile time warning. */ + +static void * +_bfd_calloc_wrapper (size_t a, size_t b) +{ + return calloc (a, b); +} + /* Kind of stupid to call cons for each one, but we don't do too many. */ bfd_boolean @@ -315,7 +324,7 @@ _bfd_add_bfd_to_archive_cache (bfd *arch_bfd, file_ptr filepos, bfd *new_elt) if (hash_table == NULL) { hash_table = htab_create_alloc (16, hash_file_ptr, eq_file_ptr, - NULL, calloc, free); + NULL, _bfd_calloc_wrapper, free); if (hash_table == NULL) return FALSE; bfd_ardata (arch_bfd)->cache = hash_table; |