From fa9a301ccc519f93cf516e1da4555f92f3b92d85 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Sun, 19 Oct 2008 13:17:29 -0400 Subject: [PATCH] __LA_DEAD is a private convention; don't publicize it. Also, clean up leaks of a few other __LA_ symbols that were introduced to make the public headers more portable. SVN-Revision: 220 --- cpio/cpio_platform.h | 8 ++++++++ libarchive/archive.h | 12 ++++-------- libarchive/archive_private.h | 7 +++++++ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/cpio/cpio_platform.h b/cpio/cpio_platform.h index 314519829..c251fa439 100644 --- a/cpio/cpio_platform.h +++ b/cpio/cpio_platform.h @@ -81,4 +81,12 @@ #endif #endif +/* How to mark functions that don't return. */ +#if defined(__GNUC__) && (__GNUC__ > 2 || \ + (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)) +#define __LA_DEAD __attribute__((__noreturn__)) +#else +#define __LA_DEAD +#endif + #endif /* !CPIO_PLATFORM_H_INCLUDED */ diff --git a/libarchive/archive.h b/libarchive/archive.h index 669ec5903..34ba9d6d1 100644 --- a/libarchive/archive.h +++ b/libarchive/archive.h @@ -82,14 +82,6 @@ # define __LA_DECL #endif -#if defined(__GNUC__) && (__GNUC__ > 2 || \ - (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)) -#define __LA_DEAD __attribute__((__noreturn__)) -#else -#define __LA_DEAD -#endif - - #ifdef __cplusplus extern "C" { #endif @@ -598,5 +590,9 @@ __LA_DECL void archive_copy_error(struct archive *dest, /* This is meaningless outside of this header. */ #undef __LA_DECL +#undef __LA_GID_T +#undef __LA_INT64_T +#undef __LA_SSIZE_T +#undef __LA_UID_T #endif /* !ARCHIVE_H_INCLUDED */ diff --git a/libarchive/archive_private.h b/libarchive/archive_private.h index 9e5d0dac0..df5fc7dea 100644 --- a/libarchive/archive_private.h +++ b/libarchive/archive_private.h @@ -31,6 +31,13 @@ #include "archive.h" #include "archive_string.h" +#if defined(__GNUC__) && (__GNUC__ > 2 || \ + (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)) +#define __LA_DEAD __attribute__((__noreturn__)) +#else +#define __LA_DEAD +#endif + #define ARCHIVE_WRITE_MAGIC (0xb0c5c0deU) #define ARCHIVE_READ_MAGIC (0xdeb0c5U) #define ARCHIVE_WRITE_DISK_MAGIC (0xc001b0c5U) -- 2.47.3