]> git.ipfire.org Git - thirdparty/gcc.git/commit
a68: handle Darwin's #1/NN archive members
authorJose E. Marchesi <jemarch@gnu.org>
Wed, 25 Feb 2026 23:43:03 +0000 (00:43 +0100)
committerJose E. Marchesi <jemarch@gnu.org>
Wed, 25 Feb 2026 23:43:03 +0000 (00:43 +0100)
commitc073172dfda4a4e4a8959b227fcbf5d1283d18ca
treeb1c83c3015e68626fb12d019cae15be44b8cbf78
parent88371675670558a27005c5f362dc7f30ad5f211f
a68: handle Darwin's #1/NN archive members

In Darwin archives use an extension to encode the member names
off-header, in the first bytes of the contents.  The name in the
header proper is then #1/NN... where NN... is an ascii-encoded number
in decimal with the length of the name, which is encoded right after
the header as part of the contents.

This patch fixes the Algol 68 module importing from archives in Darwin
by acknowledging this extension.  Note that, for the moment, we don't
bother to fetch the actual member name.  This can lead to poor
diagnostics, so we probably will fix that at some point.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
gcc/algol68/ChangeLog

* a68-imports-archive.cc (Archive_file): Handle Darwin #1/NN
archive members.
gcc/algol68/a68-imports-archive.cc