Support libarchive with C++ by adding appropriate conditional
extern "C" declarations.
This commit is contained in:
parent
43b1ef9bc2
commit
f87c3529a8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=146978
@ -29,6 +29,16 @@
|
||||
#ifndef ARCHIVE_H_INCLUDED
|
||||
#define ARCHIVE_H_INCLUDED
|
||||
|
||||
|
||||
#include <sys/types.h> /* Linux requires this for off_t */
|
||||
#include <inttypes.h> /* For int64_t */
|
||||
#include <unistd.h> /* For ssize_t and size_t */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* If ARCHIVE_API_VERSION != archive_api_version(), then the library you
|
||||
* were linked with is using an incompatible API. This is almost
|
||||
@ -51,10 +61,6 @@ int archive_api_feature(void);
|
||||
/* Textual name/version of the library. */
|
||||
const char * archive_version(void);
|
||||
|
||||
#include <sys/types.h> /* Linux requires this for off_t */
|
||||
#include <inttypes.h> /* For int64_t */
|
||||
#include <unistd.h> /* For ssize_t and size_t */
|
||||
|
||||
#define ARCHIVE_BYTES_PER_RECORD 512
|
||||
#define ARCHIVE_DEFAULT_BYTES_PER_BLOCK 10240
|
||||
|
||||
@ -318,4 +324,8 @@ const char *archive_format_name(struct archive *);
|
||||
int archive_format(struct archive *);
|
||||
void archive_set_error(struct archive *, int _err, const char *fmt, ...);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !ARCHIVE_H_INCLUDED */
|
||||
|
@ -32,6 +32,12 @@
|
||||
#include <unistd.h>
|
||||
#include <wchar.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Description of an archive entry.
|
||||
*
|
||||
@ -215,4 +221,9 @@ int archive_entry_acl_count(struct archive_entry *, int want_type);
|
||||
int __archive_entry_acl_parse_w(struct archive_entry *,
|
||||
const wchar_t *, int type);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !ARCHIVE_ENTRY_H_INCLUDED */
|
||||
|
Loading…
Reference in New Issue
Block a user