xref: /minix3/include/err.h (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc /*	$NetBSD: err.h,v 1.17 2014/01/16 17:22:06 christos Exp $	*/
2a89d141eSErik van der Kouwe 
3a89d141eSErik van der Kouwe /*-
4a89d141eSErik van der Kouwe  * Copyright (c) 1993
5a89d141eSErik van der Kouwe  *	The Regents of the University of California.  All rights reserved.
6a89d141eSErik van der Kouwe  *
7a89d141eSErik van der Kouwe  * Redistribution and use in source and binary forms, with or without
8a89d141eSErik van der Kouwe  * modification, are permitted provided that the following conditions
9a89d141eSErik van der Kouwe  * are met:
10a89d141eSErik van der Kouwe  * 1. Redistributions of source code must retain the above copyright
11a89d141eSErik van der Kouwe  *    notice, this list of conditions and the following disclaimer.
12a89d141eSErik van der Kouwe  * 2. Redistributions in binary form must reproduce the above copyright
13a89d141eSErik van der Kouwe  *    notice, this list of conditions and the following disclaimer in the
14a89d141eSErik van der Kouwe  *    documentation and/or other materials provided with the distribution.
15a89d141eSErik van der Kouwe  * 3. Neither the name of the University nor the names of its contributors
16a89d141eSErik van der Kouwe  *    may be used to endorse or promote products derived from this software
17a89d141eSErik van der Kouwe  *    without specific prior written permission.
18a89d141eSErik van der Kouwe  *
19a89d141eSErik van der Kouwe  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20a89d141eSErik van der Kouwe  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21a89d141eSErik van der Kouwe  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22a89d141eSErik van der Kouwe  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23a89d141eSErik van der Kouwe  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24a89d141eSErik van der Kouwe  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25a89d141eSErik van der Kouwe  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26a89d141eSErik van der Kouwe  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27a89d141eSErik van der Kouwe  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28a89d141eSErik van der Kouwe  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29a89d141eSErik van der Kouwe  * SUCH DAMAGE.
30a89d141eSErik van der Kouwe  *
31a89d141eSErik van der Kouwe  *	@(#)err.h	8.1 (Berkeley) 6/2/93
32a89d141eSErik van der Kouwe  */
33a89d141eSErik van der Kouwe 
34a89d141eSErik van der Kouwe #ifndef _ERR_H_
35a89d141eSErik van der Kouwe #define	_ERR_H_
36a89d141eSErik van der Kouwe 
37042b5bf6SArun Thomas #include <sys/cdefs.h>
38f14fb602SLionel Sambuc #include <stdarg.h>
39a89d141eSErik van der Kouwe 
40a89d141eSErik van der Kouwe __BEGIN_DECLS
41a89d141eSErik van der Kouwe __dead void	err(int, const char *, ...)
422fe8fb19SBen Gras 		     __printflike(2, 3) __dead;
43f14fb602SLionel Sambuc __dead void	verr(int, const char *, va_list)
442fe8fb19SBen Gras 		    __printflike(2, 0) __dead;
45a89d141eSErik van der Kouwe __dead void	errx(int, const char *, ...)
462fe8fb19SBen Gras 		     __printflike(2, 3) __dead;
47f14fb602SLionel Sambuc __dead void	verrx(int, const char *, va_list)
482fe8fb19SBen Gras 		    __printflike(2, 0) __dead;
49*0a6a1f1dSLionel Sambuc __dead void	errc(int, int, const char *, ...)
50*0a6a1f1dSLionel Sambuc 		     __printflike(3, 4) __dead;
51*0a6a1f1dSLionel Sambuc __dead void	verrc(int, int, const char *, va_list)
52*0a6a1f1dSLionel Sambuc 		    __printflike(3, 0) __dead;
53a89d141eSErik van der Kouwe void		warn(const char *, ...)
542fe8fb19SBen Gras 		    __printflike(1, 2);
55f14fb602SLionel Sambuc void		vwarn(const char *, va_list)
562fe8fb19SBen Gras 		    __printflike(1, 0);
57a89d141eSErik van der Kouwe void		warnx(const char *, ...)
582fe8fb19SBen Gras 		    __printflike(1, 2);
59f14fb602SLionel Sambuc void		vwarnx(const char *, va_list)
602fe8fb19SBen Gras 		    __printflike(1, 0);
61*0a6a1f1dSLionel Sambuc void		warnc(int, const char *, ...)
62*0a6a1f1dSLionel Sambuc 		    __printflike(2, 3);
63*0a6a1f1dSLionel Sambuc void		vwarnc(int, const char *, va_list)
64*0a6a1f1dSLionel Sambuc 		    __printflike(2, 0);
65a89d141eSErik van der Kouwe __END_DECLS
66a89d141eSErik van der Kouwe 
67a89d141eSErik van der Kouwe #endif /* !_ERR_H_ */
68