err.h revision 303975
122347Spst/*-
222347Spst * Copyright (c) 1993
329964Sache *	The Regents of the University of California.  All rights reserved.
492906Smarkm *
592906Smarkm * Redistribution and use in source and binary forms, with or without
622347Spst * modification, are permitted provided that the following conditions
722347Spst * are met:
822347Spst * 1. Redistributions of source code must retain the above copyright
922347Spst *    notice, this list of conditions and the following disclaimer.
1022347Spst * 2. Redistributions in binary form must reproduce the above copyright
1122347Spst *    notice, this list of conditions and the following disclaimer in the
1222347Spst *    documentation and/or other materials provided with the distribution.
1322347Spst * 3. Neither the name of the University nor the names of its contributors
1422347Spst *    may be used to endorse or promote products derived from this software
1522347Spst *    without specific prior written permission.
1659118Skris *
1759118Skris * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1822347Spst * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1922347Spst * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2022347Spst * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2122347Spst * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2222347Spst * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2322347Spst * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2422347Spst * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2522347Spst * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2622347Spst * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2722347Spst * SUCH DAMAGE.
2822347Spst *
2922347Spst *	@(#)err.h	8.1 (Berkeley) 6/2/93
3022347Spst * $FreeBSD: releng/11.0/include/err.h 203964 2010-02-16 19:39:50Z imp $
3122347Spst */
3222347Spst
3322347Spst#ifndef _ERR_H_
3422347Spst#define	_ERR_H_
3522347Spst
3622347Spst/*
3722347Spst * Don't use va_list in the err/warn prototypes.   Va_list is typedef'd in two
3822347Spst * places (<machine/varargs.h> and <machine/stdarg.h>), so if we include one
3922347Spst * of them here we may collide with the utility's includes.  It's unreasonable
4022347Spst * for utilities to have to include one of them to include err.h, so we get
4122347Spst * __va_list from <sys/_types.h> and use it.
4222347Spst */
4322347Spst#include <sys/cdefs.h>
4422347Spst#include <sys/_types.h>
4522347Spst
4622347Spst__BEGIN_DECLS
4722347Spstvoid	err(int, const char *, ...) __dead2 __printf0like(2, 3);
4822347Spstvoid	verr(int, const char *, __va_list) __dead2 __printf0like(2, 0);
4922347Spstvoid	errc(int, int, const char *, ...) __dead2 __printf0like(3, 4);
5022347Spstvoid	verrc(int, int, const char *, __va_list) __dead2
5122347Spst	    __printf0like(3, 0);
5222347Spstvoid	errx(int, const char *, ...) __dead2 __printf0like(2, 3);
5322347Spstvoid	verrx(int, const char *, __va_list) __dead2 __printf0like(2, 0);
5422347Spstvoid	warn(const char *, ...) __printf0like(1, 2);
5522347Spstvoid	vwarn(const char *, __va_list) __printf0like(1, 0);
5622347Spstvoid	warnc(int, const char *, ...) __printf0like(2, 3);
5722347Spstvoid	vwarnc(int, const char *, __va_list) __printf0like(2, 0);
5822347Spstvoid	warnx(const char *, ...) __printflike(1, 2);
5922347Spstvoid	vwarnx(const char *, __va_list) __printflike(1, 0);
6022347Spstvoid	err_set_file(void *);
6122347Spstvoid	err_set_exit(void (*)(int));
6222347Spst__END_DECLS
6322347Spst
6422347Spst#endif /* !_ERR_H_ */
6522347Spst