summaryrefslogtreecommitdiff
path: root/libarchive
diff options
context:
space:
mode:
authorMartin Matuska <martin@matuska.org>2016-12-30 23:44:27 +0100
committerMartin Matuska <martin@matuska.org>2016-12-30 23:44:27 +0100
commitab94a813b0f64cbc1bcb952bf55424a2d9c7f1d9 (patch)
tree759ae3e89c6923e203cf7dfd829a698a9d07c697 /libarchive
parent2a2488a81599f9cd065a8254b16a6fd48d81c3b4 (diff)
downloadlibarchive-ab94a813b0f64cbc1bcb952bf55424a2d9c7f1d9.tar.gz
Use __LA_DEPRECATED for functions deprecated in 379867e
Reported-By: Jamie Kenyon
Diffstat (limited to 'libarchive')
-rw-r--r--libarchive/archive_entry.h10
-rw-r--r--libarchive/archive_entry_locale.h3
2 files changed, 9 insertions, 4 deletions
diff --git a/libarchive/archive_entry.h b/libarchive/archive_entry.h
index 0f09b985..9f1955bd 100644
--- a/libarchive/archive_entry.h
+++ b/libarchive/archive_entry.h
@@ -105,6 +105,12 @@ typedef int64_t la_int64_t;
# define __LA_DECL
#endif
+#if defined(__GNUC__) && __GNUC__ >= 3 && __GNUC_MINOR__ >= 1
+# define __LA_DEPRECATED __attribute__((deprecated))
+#else
+# define __LA_DEPRECATED
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -529,9 +535,9 @@ __LA_DECL int archive_entry_acl_from_text(struct archive_entry *,
/* Deprecated functions */
__LA_DECL const wchar_t *archive_entry_acl_text_w(struct archive_entry *,
- int /* flags */) __attribute__ ((deprecated));
+ int /* flags */) __LA_DEPRECATED;
__LA_DECL const char *archive_entry_acl_text(struct archive_entry *,
- int /* flags */) __attribute__ ((deprecated));
+ int /* flags */) __LA_DEPRECATED;
/* Return bitmask of ACL types in an archive entry */
__LA_DECL int archive_entry_acl_types(struct archive_entry *);
diff --git a/libarchive/archive_entry_locale.h b/libarchive/archive_entry_locale.h
index c7c90088..44550c51 100644
--- a/libarchive/archive_entry_locale.h
+++ b/libarchive/archive_entry_locale.h
@@ -63,8 +63,7 @@ int _archive_entry_uname_l(struct archive_entry *,
const char **, size_t *, struct archive_string_conv *);
#define archive_entry_acl_text_l _archive_entry_acl_text_l
int _archive_entry_acl_text_l(struct archive_entry *, int,
-const char **, size_t *, struct archive_string_conv *)
-__attribute__ ((deprecated));
+const char **, size_t *, struct archive_string_conv *) __LA_DEPRECATED;
#define archive_entry_acl_to_text_l _archive_entry_acl_to_text_l
char *_archive_entry_acl_to_text_l(struct archive_entry *, ssize_t *, int,
struct archive_string_conv *);