diff options
author | kientzle <kientzle@FreeBSD.org> | 2005-06-01 15:52:39 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2005-06-01 15:52:39 +0000 |
commit | 583200b7e67aa14ecf20d560c49ee4ff4ab6d37d (patch) | |
tree | 8b0726506b461ec34909f06cc5e3be340671c434 /lib/libarchive/archive_private.h | |
parent | cae6a1d6e9d7358ab1f46447fe83f0d9c49349ee (diff) | |
download | FreeBSD-src-583200b7e67aa14ecf20d560c49ee4ff4ab6d37d.zip FreeBSD-src-583200b7e67aa14ecf20d560c49ee4ff4ab6d37d.tar.gz |
Remove the C99-specific __func__ that is one of the few barrier to
compiling on IRIX and Solaris. Remove the "archive_check_magic" macro
that existed only to provide __func__ to the underlying __archive_check_magic
function.
Thanks to: Darin Broady
MFC after: 14 days
Diffstat (limited to 'lib/libarchive/archive_private.h')
-rw-r--r-- | lib/libarchive/archive_private.h | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/lib/libarchive/archive_private.h b/lib/libarchive/archive_private.h index c3f774c..0b96180 100644 --- a/lib/libarchive/archive_private.h +++ b/lib/libarchive/archive_private.h @@ -199,16 +199,6 @@ struct archive { }; -/* - * Utility function to format a USTAR header into a buffer. If - * "strict" is set, this tries to create the absolutely most portable - * version of a ustar header. If "strict" is set to 0, then it will - * relax certain requirements. - */ -int -__archive_write_format_header_ustar(struct archive *, char buff[512], - struct archive_entry *, int tartype, int strict); - #define ARCHIVE_STATE_ANY 0xFFFFU #define ARCHIVE_STATE_NEW 1U #define ARCHIVE_STATE_HEADER 2U @@ -218,12 +208,9 @@ __archive_write_format_header_ustar(struct archive *, char buff[512], #define ARCHIVE_STATE_FATAL 0x8000U /* Check magic value and state; exit if it isn't valid. */ -void -__archive_check_magic(struct archive *, unsigned magic, - unsigned state, const char *func); +void __archive_check_magic(struct archive *, unsigned magic, + unsigned state, const char *func); -#define archive_check_magic(a,m,s) \ - __archive_check_magic((a), (m), (s), __func__) int __archive_read_register_format(struct archive *a, void *format_data, @@ -241,4 +228,19 @@ void __archive_errx(int retvalue, const char *msg); #define err_combine(a,b) ((a) < (b) ? (a) : (b)) + +/* + * Utility function to format a USTAR header into a buffer. If + * "strict" is set, this tries to create the absolutely most portable + * version of a ustar header. If "strict" is set to 0, then it will + * relax certain requirements. + * + * Generally, format-specific declarations don't belong in this + * header; this is a rare example of a function that is shared by + * two very similar formats (ustar and pax). + */ +int +__archive_write_format_header_ustar(struct archive *, char buff[512], + struct archive_entry *, int tartype, int strict); + #endif |