diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/arbits/slbt_archive_meta.c | 12 | ||||
-rw-r--r-- | src/internal/slibtool_ar_impl.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/arbits/slbt_archive_meta.c b/src/arbits/slbt_archive_meta.c index f3dd39e..7279602 100644 --- a/src/arbits/slbt_archive_meta.c +++ b/src/arbits/slbt_archive_meta.c @@ -842,6 +842,18 @@ int slbt_get_archive_meta( if (m->memberv[idx]->ar_member_data == arlongnames) m->armeta.a_arref_longnames = m->memberv[idx]; + /* common binary format (information only) */ + for (idx=0,nmembers=0; idx<nentries; idx++) { + if (m->memberv[idx]->ar_member_attr == AR_MEMBER_ATTR_OBJECT) { + if (m->ofmtattr && (m->ofmtattr != m->memberv[idx]->ar_object_attr)) { + m->ofmtattr = 0; + idx = nentries; + } else if (!m->ofmtattr) { + m->ofmtattr = m->memberv[idx]->ar_object_attr; + } + } + } + /* member vector */ m->armeta.a_memberv = m->memberv; diff --git a/src/internal/slibtool_ar_impl.h b/src/internal/slibtool_ar_impl.h index b034c2b..e5bfca8 100644 --- a/src/internal/slibtool_ar_impl.h +++ b/src/internal/slibtool_ar_impl.h @@ -36,6 +36,7 @@ struct ar_armaps_impl { struct slbt_archive_meta_impl { const struct slbt_driver_ctx * dctx; + size_t ofmtattr; size_t nentries; void * hdrinfov; char * namestrs; |