summaryrefslogtreecommitdiffstats
path: root/lib/libarchive
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2005-06-04 22:24:04 +0000
committerkientzle <kientzle@FreeBSD.org>2005-06-04 22:24:04 +0000
commit15f8d4f33e3ab69e93c1682582c11564f2ec96aa (patch)
treeaa1b2b3c7559402dbc037cad65ec79d3e7be3848 /lib/libarchive
parent7ed2aa04eb87e659ee6d136737b62df2394af5c3 (diff)
downloadFreeBSD-src-15f8d4f33e3ab69e93c1682582c11564f2ec96aa.zip
FreeBSD-src-15f8d4f33e3ab69e93c1682582c11564f2ec96aa.tar.gz
Support libarchive with C++ by adding appropriate conditional
extern "C" declarations.
Diffstat (limited to 'lib/libarchive')
-rw-r--r--lib/libarchive/archive.h.in18
-rw-r--r--lib/libarchive/archive_entry.h11
2 files changed, 25 insertions, 4 deletions
diff --git a/lib/libarchive/archive.h.in b/lib/libarchive/archive.h.in
index 1754cca..149e82d 100644
--- a/lib/libarchive/archive.h.in
+++ b/lib/libarchive/archive.h.in
@@ -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 */
diff --git a/lib/libarchive/archive_entry.h b/lib/libarchive/archive_entry.h
index c4d494b..dec8b96 100644
--- a/lib/libarchive/archive_entry.h
+++ b/lib/libarchive/archive_entry.h
@@ -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 */
OpenPOWER on IntegriCloud