xref: /minix3/external/bsd/libarchive/dist/libarchive_fe/err.h (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1543adbedSBen Gras /*-
2543adbedSBen Gras  * Copyright (c) 2009 Joerg Sonnenberger
3543adbedSBen Gras  * All rights reserved.
4543adbedSBen Gras  *
5543adbedSBen Gras  * Redistribution and use in source and binary forms, with or without
6543adbedSBen Gras  * modification, are permitted provided that the following conditions
7543adbedSBen Gras  * are met:
8543adbedSBen Gras  * 1. Redistributions of source code must retain the above copyright
9543adbedSBen Gras  *    notice, this list of conditions and the following disclaimer.
10543adbedSBen Gras  * 2. Redistributions in binary form must reproduce the above copyright
11543adbedSBen Gras  *    notice, this list of conditions and the following disclaimer in the
12543adbedSBen Gras  *    documentation and/or other materials provided with the distribution.
13543adbedSBen Gras  *
14543adbedSBen Gras  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
15543adbedSBen Gras  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16543adbedSBen Gras  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17543adbedSBen Gras  * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
18543adbedSBen Gras  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19543adbedSBen Gras  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20543adbedSBen Gras  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21543adbedSBen Gras  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22543adbedSBen Gras  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23543adbedSBen Gras  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24543adbedSBen Gras  */
25543adbedSBen Gras 
26543adbedSBen Gras #ifndef LAFE_ERR_H
27543adbedSBen Gras #define LAFE_ERR_H
28543adbedSBen Gras 
29543adbedSBen Gras #if defined(__GNUC__) && (__GNUC__ > 2 || \
30543adbedSBen Gras                           (__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
31543adbedSBen Gras #define __LA_DEAD       __attribute__((__noreturn__))
32543adbedSBen Gras #else
33543adbedSBen Gras #define __LA_DEAD
34543adbedSBen Gras #endif
35543adbedSBen Gras 
36543adbedSBen Gras extern const char *lafe_progname;
37543adbedSBen Gras 
38*0a6a1f1dSLionel Sambuc void	lafe_warnc(int code, const char *fmt, ...) __printflike(2, 3);
39*0a6a1f1dSLionel Sambuc void	lafe_errc(int eval, int code, const char *fmt, ...)
40*0a6a1f1dSLionel Sambuc     __LA_DEAD __printflike(3, 4);
41543adbedSBen Gras 
42543adbedSBen Gras #endif
43