]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Introduce __LA_DEAD to replace current unportable use of
authorJoerg Sonnenberger <joerg.sonnenberger@gmail.com>
Wed, 1 Oct 2008 14:07:50 +0000 (10:07 -0400)
committerJoerg Sonnenberger <joerg.sonnenberger@gmail.com>
Wed, 1 Oct 2008 14:07:50 +0000 (10:07 -0400)
__dead2 as discussed in August.

SVN-Revision: 217

cpio/cpio.h
libarchive/archive.h
libarchive/archive_private.h
tar/bsdtar.h

index a4c17108e2d2a65aa291a0802c3f9062aa30a27a..41841f941dff9854876992a04e0a24d6f85fbb4e 100644 (file)
@@ -85,7 +85,7 @@ struct cpio {
 /* Name of this program; used in error reporting, initialized in main(). */
 const char *cpio_progname;
 
-void   cpio_errc(int _eval, int _code, const char *fmt, ...) __dead2;
+void   cpio_errc(int _eval, int _code, const char *fmt, ...) __LA_DEAD;
 void   cpio_warnc(int _code, const char *fmt, ...);
 
 int    owner_parse(const char *, int *, int *);
index 8ae1757bdb202ef4a9997c288708f9688f0ad9f6..669ec5903d4c2fbc2f8bf919c70e34a8c9912762 100644 (file)
 # 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" {
index a859417a6d96997e73ff7d945a62dfea3a2200c1..9e5d0dac0f3b5f5b6f92a9ff0735d69e6695cd71 100644 (file)
@@ -92,7 +92,7 @@ struct archive {
 void   __archive_check_magic(struct archive *, unsigned int magic,
            unsigned int state, const char *func);
 
-void   __archive_errx(int retvalue, const char *msg) __dead2;
+void   __archive_errx(int retvalue, const char *msg) __LA_DEAD;
 
 #define        err_combine(a,b)        ((a) < (b) ? (a) : (b))
 
index 59f24c20e62eff625b5995d3e99cd1f9bf168074..fb256d8dfc4ac73fd42dd0d0ac707b750cf253c5 100644 (file)
@@ -103,7 +103,7 @@ struct bsdtar {
 };
 
 void   bsdtar_errc(struct bsdtar *, int _eval, int _code,
-           const char *fmt, ...) __dead2;
+           const char *fmt, ...) __LA_DEAD;
 void   bsdtar_warnc(struct bsdtar *, int _code, const char *fmt, ...);
 void   cleanup_exclusions(struct bsdtar *);
 void   do_chdir(struct bsdtar *);