Imported Upstream version 0.4b37
[debian/dump] / compat / include / compaterr.h
1 /*
2  *      Ported to Linux's Second Extended File System as part of the
3  *      dump and restore backup suit
4  *      Remy Card <card@Linux.EU.Org>, 1994-1997
5  *      Stelian Pop <stelian@popies.net>, 1999-2000
6  *      Stelian Pop <stelian@popies.net> - AlcĂ´ve <www.alcove.com>, 2000-2002
7  *
8  *      $Id: compaterr.h,v 1.10 2003/03/30 15:40:34 stelian Exp $
9  */
10
11 /*-
12  * Copyright (c) 1993
13  *      The Regents of the University of California.  All rights reserved.
14  *
15  * Redistribution and use in source and binary forms, with or without
16  * modification, are permitted provided that the following conditions
17  * are met:
18  * 1. Redistributions of source code must retain the above copyright
19  *    notice, this list of conditions and the following disclaimer.
20  * 2. Redistributions in binary form must reproduce the above copyright
21  *    notice, this list of conditions and the following disclaimer in the
22  *    documentation and/or other materials provided with the distribution.
23  * 3. Neither the name of the University nor the names of its contributors
24  *    may be used to endorse or promote products derived from this software
25  *    without specific prior written permission.
26  *
27  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37  * SUCH DAMAGE.
38  */
39
40 #ifndef _COMPATERR_H_
41 #define _COMPATERR_H_
42
43 #include <config.h>
44
45 #if defined(HAVE_ERR) || defined(HAVE_ERRX) || defined(HAVE_VERR) || defined(HAVE_VERRX) || defined(HAVE_VWARN) || defined(HAVE_VWARNX) || defined(HAVE_WARN) || defined(HAVE_WARNX)
46 #include <err.h>
47 #endif
48
49 #include <sys/cdefs.h>
50
51 #include <stdarg.h>
52
53 #ifndef _BSD_VA_LIST_
54 #define _BSD_VA_LIST_           va_list
55 #endif
56
57 #ifndef __dead
58 #define __dead                  volatile
59 #endif
60
61 __BEGIN_DECLS
62 #ifndef HAVE_ERR
63 __dead void     err __P((int, const char *, ...));
64 #endif
65 #ifndef HAVE_VERR
66 __dead void     verr __P((int, const char *, _BSD_VA_LIST_));
67 #endif
68 #ifndef HAVE_ERRX
69 __dead void     errx __P((int, const char *, ...));
70 #endif
71 #ifndef HAVE_VERRX
72 __dead void     verrx __P((int, const char *, _BSD_VA_LIST_));
73 #endif
74 #ifndef HAVE_WARN
75 void            warn __P((const char *, ...));
76 #endif
77 #ifndef HAVE_VWARN
78 void            vwarn __P((const char *, _BSD_VA_LIST_));
79 #endif
80 #ifndef HAVE_WARNX
81 void            warnx __P((const char *, ...));
82 #endif
83 #ifndef HAVE_VWARNX
84 void            vwarnx __P((const char *, _BSD_VA_LIST_));
85 #endif
86 __END_DECLS
87
88 #endif /* !_COMPATERR_H_ */