diff options
author | Nick Clifton <nickc@redhat.com> | 2010-05-25 10:14:12 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2010-05-25 10:14:12 +0000 |
commit | 71bf0c407db5d0d73a1afe83b6407f65f456f21f (patch) | |
tree | e638660493e0f6715132ca6633c5893733fdc128 /bfd/archive.c | |
parent | bb8e5635ee8f9324915def448dc5c6b500d1e9ae (diff) | |
download | binutils-redhat-71bf0c407db5d0d73a1afe83b6407f65f456f21f.tar.gz |
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 e6c1e83853..fbe555b03f 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; |