cvs commit: src/lib/libarchive archive_write_set_format_ar.c

Kai Wang kaiw at FreeBSD.org
Thu Jan 31 00:11:02 PST 2008


kaiw        2008-01-31 08:11:01 UTC

  FreeBSD src repository

  Modified files:
    lib/libarchive       archive_write_set_format_ar.c 
  Log:
  Add hook routine archive_write_ar_finish() which writes the 'ar'
  global header if nothing else has been written before the closing of
  the archive. This will change the behaviour when creating archives
  without members, i.e., instead of generating a 0-size archive file, an
  archive with just the global header (8 bytes in total) will be created
  and it is indeed a valid archive by the definition of libarchive, thus
  subsequent operation on this archive will be accepted. This especially
  solves the failure caused by following sequence: (several ports do)
  
  % ar cru libfoo.a           # without specifying obj files
  % ranlib libfoo.a
  
  Reviewed by:    kientzle, jkoshy
  Approved by:    kientzle
  Approved by:    jkoshy  (mentor)
  Reported by:    erwin
  MFC after:      1 month
  
  Revision  Changes    Path
  1.5       +19 -1     src/lib/libarchive/archive_write_set_format_ar.c


More information about the cvs-src mailing list