diff options
author | kientzle <kientzle@FreeBSD.org> | 2004-03-19 22:37:06 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2004-03-19 22:37:06 +0000 |
commit | ef0d6eb5985e7a4f4fd2f0f42925e8328b8cf004 (patch) | |
tree | 31fad164e4fe18412497337d4c8e1a7e7c792609 /lib/libarchive/archive_platform.h | |
parent | edf0b18239fcd09677972580f323c10d3a59afab (diff) | |
download | FreeBSD-src-ef0d6eb5985e7a4f4fd2f0f42925e8328b8cf004.zip FreeBSD-src-ef0d6eb5985e7a4f4fd2f0f42925e8328b8cf004.tar.gz |
Many fixes:
* 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>
Diffstat (limited to 'lib/libarchive/archive_platform.h')
-rw-r--r-- | lib/libarchive/archive_platform.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/lib/libarchive/archive_platform.h b/lib/libarchive/archive_platform.h index fca65a1..ee6c08e 100644 --- a/lib/libarchive/archive_platform.h +++ b/lib/libarchive/archive_platform.h @@ -38,14 +38,38 @@ /* FreeBSD-specific definitions. */ #ifdef __FreeBSD__ #include <sys/cdefs.h> /* For __FBSDID */ +/* + * Note that SUSv3 says that inttypes.h includes stdint.h. + * Since inttypes.h predates stdint.h, it's safest to always + * use inttypes.h instead of stdint.h. + */ +#include <inttypes.h> /* For int64_t, etc. */ + #define HAVE_POSIX_ACL 1 #define HAVE_CHFLAGS 1 #define HAVE_LUTIMES 1 #define HAVE_LCHMOD 1 #define ARCHIVE_ERRNO_FILE_FORMAT EFTYPE -#define ARCHIVE_ERRNO_PROGRAMMER EDOOFUS +#define ARCHIVE_ERRNO_PROGRAMMER EINVAL #define ARCHIVE_ERRNO_MISC (-1) + +/* + * Older versions of inttypes.h don't have INT64_MAX, etc. Since + * SUSv3 requires them to be macros when they are defined, we can + * easily test for and define them here if necessary. + */ +#ifndef INT64_MAX +/* XXX Is this really necessary? XXX */ +#ifdef __i386__ +#define INT64_MAX 0x7fffffffffffffffLL +#define UINT64_MAX 0xffffffffffffffffULL +#else /* __alpha__ */ +#define INT64_MAX 0x7fffffffffffffffL +#define UINT64_MAX 0xffffffffffffffffUL #endif +#endif /* ! INT64_MAX */ + +#endif /* __FreeBSD__ */ /* No non-FreeBSD platform will have __FBSDID, so just define it here. */ #ifndef __FreeBSD__ @@ -54,6 +78,7 @@ /* Linux */ #ifdef LINUX +#include <inttypes.h> #define ARCHIVE_ERRNO_FILE_FORMAT EILSEQ #define ARCHIVE_ERRNO_PROGRAMMER EINVAL #define ARCHIVE_ERRNO_MISC (-1) |