summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/archive_platform.h
Commit message (Collapse)AuthorAgeFilesLines
* Update libarchive to 2.4.10. This includes a number of improvementskientzle2007-12-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | that I've been working on but put off committing until after the RELENG_7 branch, including: * New manpages: cpio.5 mtree.5 * New archive_entry_strmode() * New archive_entry_link_resolver() * New read support: mtree format * Internal API change: read format auction only runs once * Running the auction only once allowed simplifying a lot of bid logic. * Cpio robustness: search for next header after a sync error * Support device nodes on ISO9660 images * Eliminate a lot of unnecessary copies for uncompressed archives * Corrected handling of new GNU --sparse --posix formats * Correctly handle a zero-byte write to a compressed archive * Fixed memory leaks Many of these improvements were motivated by the upcoming bsdcpio front-end. There have also been extensive improvements to the libarchive_test test harness, which I'll commit separately.
* libarchive 2.2.3kientzle2007-05-291-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * "compression_program" support uses an external program * Portability: no longer uses "struct stat" as a primary data interchange structure internally * Part of the above: refactor archive_entry to separate out copy_stat() and stat() functions * More complete tests for archive_entry * Finish archive_entry_clone() * Isolate major()/minor()/makedev() in archive_entry; remove these from everywhere else. * Bug fix: properly handle decompression look-ahead at end-of-data * Bug fixes to 'ar' support * Fix memory leak in ZIP reader * Portability: better timegm() emulation in iso9660 reader * New write_disk flags to suppress auto dir creation and not overwrite newer files (for future cpio front-end) * Simplify trailing-'/' fixup when writing tar and pax * Test enhancements: fix various compiler warnings, improve portability, add lots of new tests. * Documentation: document new functions, first draft of libarchive_internals.3 MFC after: 14 days Thanks to: Joerg Sonnenberger (compression_program) Thanks to: Kai Wang (ar) Thanks to: Colin Percival (many small fixes) Thanks to: Many others who sent me various patches and problem reports.
* Consolidate numeric limit macros in one place; include themkientzle2007-04-151-0/+17
| | | | only on platforms that need them. FreeBSD doesn't.
* Now that libarchive is being built in more environments,kientzle2007-04-121-7/+4
| | | | | | factor out the platform-specific configuration header a bit more cleanly. Suggested by: Joerg Sonnenberger
* Fix the copyright notice; it was always intended to bekientzle2007-01-091-3/+2
| | | | | | | | | a vanilla 2-clause BSD license, but somehow some confusing extra verbage get copied from somewhere. Also, update the copyright dates to 2007 for all of the files. Prompted by: several questions about what those extra words really mean
* Special case to support hard-coded configuration for building on Windows.kientzle2007-01-071-0/+3
|
* Minor refactoring; move the FreeBSD-specific config info intokientzle2006-12-081-78/+13
| | | | | | config_freebsd.h. archive_platform.h decides which config file to bring in and uses some of those selectors to define wrapper macros and other compatibility glue.
* Portability and style fixes:kientzle2006-11-101-6/+16
| | | | | | | | | | | | | | * Actually use the HAVE_<header>_H macros to conditionally include system headers. They've been defined for a long time, but only used in a few places. Now they're used pretty consistently throughout. * Fill in a lot of missing casts for conversions from void*. Although Standard C doesn't require this, some people have been trying to use C++ compilers with this code, and they do require it. Bit-for-bit, the compiled object files are identical, except for one assert() whose line number changed, so I'm pretty confident I didn't break anything. ;-)
* Remove configure.ac.in and reorganize a few other things. This iskientzle2006-03-081-1/+1
| | | | | part of a program to remove the non-FreeBSD autoconf/automake build system for libarchive from the FreeBSD source tree.
* Portability: timegm() isn't standard, so check for timegm() inkientzle2005-11-061-0/+1
| | | | | | the configure script and substitute mktime() when necessary. Thanks to: Darin Broady
* Minor style nit: tab instead of space after #definekientzle2005-10-121-1/+1
|
* Minor configuration fix to disable ACL support on MacOS X (whichkientzle2005-08-101-4/+5
| | | | | | lacks ACL_USER). Thanks to: Marcus Geiger, Joe Esch, and Markus Slopianka
* Minor clean up for flags restoration: Use fchflags/lchflags whenkientzle2005-06-041-1/+3
| | | | | available, stub out flags restore on platforms that don't support it, update autoconf to probe for fchflags and lchflags support.
* Start to address the race issue between restoring a file's contentskientzle2005-05-211-0/+13
| | | | | | | | | | | | | | and restoring the metadata. In particular, the metadata-restore functions now all accept a file descriptor and a pathname. If the file descriptor is set and the platform supports the appropriate syscall, restore the metadata through the file descriptor. Otherwise, restore it through the pathname. This is complicated by varying syscall support (FreeBSD has an fchmod(2) but no fchflags(2), for example) and because non-file entries don't have an fd to use in restoring attributes (for example, mknod(2) doesn't return a file handle). MFC after: 14 days
* Fix broken ACL configuration on FreeBSD 4 and Linux.kientzle2005-04-231-5/+12
| | | | Thanks to: Greg Lewis, Juergen Lock, Jaakko Heinonen for reporting and testing
* Implement a custom print formatter (archive_string_vsprintf)kientzle2005-01-161-0/+6
| | | | | | | | | | | | | | for libarchive error messages. Mostly, this avoids a portability headache related to copying va_list arguments (some FreeBSD 5 platforms require va_copy; FreeBSD 4 doesn't support va_copy at all). It also dramatically reduces the size of libarchive for embedded applications: a minimal "untar" program using libarchive can now be under 64k statically linked (as opposed to ~100k using library *printf() functions). MFC after: 14 days
* libarchive now has two complete build systems. The usual "Makefile"kientzle2004-08-071-25/+0
| | | | | | | | | | | | | | is present for FreeBSD. If you "make distfile" on FreeBSD, you will soon have a tar.gz file suitable for deploying to other systems (complete with the expected "configure" script, etc). This latter relies (at least for now) on the GNU auto??? tools. (I like autoconf okay, but someday I hope to write a custom Makefile.in and dispense with automake, which is somewhat odious.) As part of this, I've cleaned up some of the conditional compilation options, added make-foo to construct archive.h dynamically (it now contains some version constants), and added some useful informational files.
* Minor style nits.kientzle2004-07-241-2/+2
|
* Rework the feature-detection logic in archive_platform.h so thatkientzle2004-07-241-63/+116
| | | | it will work cleanly with autoconf.
* Use "linux" instead of "LINUX" to control Linux-specific code.kientzle2004-07-241-0/+3
| | | | | | | | Thanks to: David O'Brien for pointing this out. Also, add in a few additional portability tweaks and make a few more things conditional on features (HAVE_XXXX macros) rather than platform.
* Consistify: #define gets 1 tab character afterwardskientzle2004-05-031-37/+37
| | | | Pointed out by: Simon Nielsen
* More portability improvements, thanks to Juergen Lock.kientzle2004-04-211-6/+33
| | | | | | High-resolution mtime/ctime/atime is not POSIX-standard, so hide set/get of high-resolution time fields behind easily-mutable macros. That makes it easier to change how those fields are accessed.
* Only enable the ACL restore logic on FreeBSD versions >= 5.0.kientzle2004-04-161-0/+3
| | | | | | | | | Earlier versions of FreeBSD don't support ACLs. Note that the ACL support code in archive_entry is standalone code and unaffected by this. (In particular, it should be possible to manipulate archives containing ACLs even if the ACLs cannot be restored on the current system.)
* Linux still uses 32-bit off_t by default. Ask for 64-bit off_t onkientzle2004-04-071-0/+1
| | | | Linux.
* Just use autoconf-compatible feature macros; don't try to be clever.kientzle2004-03-221-2/+3
|
* Bug: Standard C still requires declarations to precede statements. <sigh>kientzle2004-03-201-0/+2
| | | | | Portability: Eliminate an accidental __unused, accomodate systems with non-POSIX strerror_r
* Many fixes:kientzle2004-03-191-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Disabled shared-library building, as some API breakage is still likely. (I didn't realize it was turned on by default.) If you have an existing /usr/lib/libarchive.so.2, I recommend deleting it. * Pax interchange format now correctly stores and reads UTF8 for extended attributes. In particular, pax format can portably handle arbitrarily long pathnames containing arbitrary characters. * Library compiles cleanly at -O2, -O3, and WARNS=6 on all FreeBSD-CURRENT platforms. * Minor portability improvements inspired by Juergen Lock and Greg Lewis. (Less reliance on stdint.h, isolating of various portability-challenged constructs.) * archive_entry transparently converts multi-byte <-> wide character strings, allowing clients and format handlers to deal with either one, as appropriate. * Support for reading 'L' and 'K' entries in standard tar archives for star compatibility. * Recognize (but don't yet handle) ACL entries from Solaris tar. * Pushed format-specific data for format readers down into format-specific storage and out of library-global storage. This should make it easier to maintain individual formats without mucking with the core library management. * Documentation updates to track the above changes. * Updates to tar.5 to correct a few mistakes and add some additional information about GNU tar and Solaris tar formats. Notes: * The basic 'tar' reader is getting more general; there's not much point in keeping the 'gnutar' reader separate. Merging the two would lose a bunch of duplicate code. * The libc ACL support is looking increasingly inadequate for my needs here. I might need to assemble some fairly significant code for parsing and building ACLs. <sigh>
* Many fixes.kientzle2004-03-091-0/+73
Portability: Thanks to Juergen Lock, libarchive now compiles cleanly on Linux. Along the way, I cleaned up a lot of error return codes and reorganized some code to simplify conditional compilation of certain sections. Bug fixes: * pax format now actually stores filenames that are 101-154 characters long. * pax format now allows newline characters in extended attributes (this fixes a long-standing bug in ACL handling) * mtime/atime are now restored for directories * directory list is now sorted prior to fix-up to permit correct restore of non-writable dir heirarchies
OpenPOWER on IntegriCloud