err.h revision 40739
1163048Sru/*-
2163048Sru * Copyright (c) 1993
3163048Sru *	The Regents of the University of California.  All rights reserved.
4163048Sru *
5163048Sru * Redistribution and use in source and binary forms, with or without
6163048Sru * modification, are permitted provided that the following conditions
7163048Sru * are met:
8163048Sru * 1. Redistributions of source code must retain the above copyright
9163048Sru *    notice, this list of conditions and the following disclaimer.
10163048Sru * 2. Redistributions in binary form must reproduce the above copyright
11163048Sru *    notice, this list of conditions and the following disclaimer in the
12163048Sru *    documentation and/or other materials provided with the distribution.
13163048Sru * 3. All advertising materials mentioning features or use of this software
14163048Sru *    must display the following acknowledgement:
15163048Sru *	This product includes software developed by the University of
16163048Sru *	California, Berkeley and its contributors.
17163048Sru * 4. Neither the name of the University nor the names of its contributors
18163048Sru *    may be used to endorse or promote products derived from this software
19163048Sru *    without specific prior written permission.
20163048Sru *
21163048Sru * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22163048Sru * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23163048Sru * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24163048Sru * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25163048Sru * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26163048Sru * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27163048Sru * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28163048Sru * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29163048Sru * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30163048Sru * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31163048Sru * SUCH DAMAGE.
32163048Sru *
33163048Sru *	From: @(#)err.h	8.1 (Berkeley) 6/2/93
34163048Sru *	$Id: err.h,v 1.5 1998/09/12 21:02:15 wollman Exp $
35163048Sru */
36163048Sru
37163048Sru#ifndef _ERR_H_
38163048Sru#define	_ERR_H_
39163048Sru
40163048Sru/*
41163048Sru * Don't use va_list in the err/warn prototypes.   Va_list is typedef'd in two
42163048Sru * places (<machine/varargs.h> and <machine/stdarg.h>), so if we include one
43163048Sru * of them here we may collide with the utility's includes.  It's unreasonable
44163048Sru * for utilities to have to include one of them to include err.h, so we get
45163048Sru * _BSD_VA_LIST_ from <machine/ansi.h> and use it.
46163048Sru */
47163048Sru#include <machine/ansi.h>
48163048Sru#include <sys/cdefs.h>
49163048Sru
50163048Sru__BEGIN_DECLS
51163048Sruvoid	err __P((int, const char *, ...)) __printf0like(2, 3) __dead2;
52163048Sruvoid	verr __P((int, const char *, _BSD_VA_LIST_)) __dead2;
53163048Sruvoid	errc __P((int, int, const char *, ...)) __printf0like(3, 4) __dead2;
54163048Sruvoid	verrc __P((int, int, const char *, _BSD_VA_LIST_)) __dead2;
55163048Sruvoid	errx __P((int, const char *, ...)) __printf0like(2, 3) __dead2;
56163048Sruvoid	verrx __P((int, const char *, _BSD_VA_LIST_)) __dead2;
57163048Sruvoid	warn __P((const char *, ...)) __printf0like(1, 2);
58163048Sruvoid	vwarn __P((const char *, _BSD_VA_LIST_));
59163048Sruvoid	warnc __P((int, const char *, ...)) __printf0like(2, 3);
60163048Sruvoid	vwarnc __P((int, const char *, _BSD_VA_LIST_));
61163048Sruvoid	warnx __P((const char *, ...)) __printflike(1, 2);
62163048Sruvoid	vwarnx __P((const char *, _BSD_VA_LIST_));
63163048Sruvoid	err_set_file __P((void *));
64163048Sruvoid	err_set_exit __P((void (*)(int)));
65163048Sru__END_DECLS
66163048Sru
67163048Sru#endif /* !_ERR_H_ */
68163048Sru