This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Change in 'ar' behaviour


Alan Modra <amodra@bigpond.net.au> writes:

> On Tue, Aug 10, 2004 at 10:28:12AM -0400, Jeff Baker wrote:
>> One of our customers has noticed a change in the behaviour of 'ar' 
>> between 2.10.1 and 2.12.1 or later.
>> 
>> 2.10.1
>> ------
>> $ ar rcs test.a object.o
>> $ ar rcs test.a dir/object.o
>> $ ar tv test.a
>> rw-rw-rw- 1003/513  21368 Jul 27 13:14 2004 object.o
>> rw-rw-rw- 1003/513  12384 Jul 27 13:14 2004 dir/object.o
>> 
>> 2.12.1 (or later)
>> -----------------
>> $ ar rcs test.a object.o
>> $ ar rcs test.a dir/object.o
>> $ ar tv test.a
>> rw-rw-rw- 1003/513  12384 Jul 27 13:14 2004 object.o
>
> I suspect this was a deliberate change, to make GNU ar comply with
> posix.

Yes, this is what POSIX says:

  All file operands can be pathnames. However, files within archives shall
  be named by a filename, which is the last component of the pathname used
  when the file was entered into the archive. The comparison of file
  operands to the names of files in archives shall be performed by
  comparing the last component of the operand to the name of the file in
  the archive.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]