11539Srgrimes/*- 21539Srgrimes * Copyright (c) 1993 31539Srgrimes * The Regents of the University of California. All rights reserved. 41539Srgrimes * 51539Srgrimes * Redistribution and use in source and binary forms, with or without 61539Srgrimes * modification, are permitted provided that the following conditions 71539Srgrimes * are met: 81539Srgrimes * 1. Redistributions of source code must retain the above copyright 91539Srgrimes * notice, this list of conditions and the following disclaimer. 101539Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 111539Srgrimes * notice, this list of conditions and the following disclaimer in the 121539Srgrimes * documentation and/or other materials provided with the distribution. 13203964Simp * 3. Neither the name of the University nor the names of its contributors 141539Srgrimes * may be used to endorse or promote products derived from this software 151539Srgrimes * without specific prior written permission. 161539Srgrimes * 171539Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 181539Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 191539Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 201539Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 211539Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 221539Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 231539Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 241539Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 251539Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 261539Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 271539Srgrimes * SUCH DAMAGE. 281539Srgrimes * 2941284Sbde * @(#)err.h 8.1 (Berkeley) 6/2/93 3050473Speter * $FreeBSD$ 311539Srgrimes */ 321539Srgrimes 331539Srgrimes#ifndef _ERR_H_ 341539Srgrimes#define _ERR_H_ 351539Srgrimes 361539Srgrimes/* 371539Srgrimes * Don't use va_list in the err/warn prototypes. Va_list is typedef'd in two 381539Srgrimes * places (<machine/varargs.h> and <machine/stdarg.h>), so if we include one 391539Srgrimes * of them here we may collide with the utility's includes. It's unreasonable 401539Srgrimes * for utilities to have to include one of them to include err.h, so we get 41102227Smike * __va_list from <sys/_types.h> and use it. 421539Srgrimes */ 431539Srgrimes#include <sys/cdefs.h> 44102227Smike#include <sys/_types.h> 451539Srgrimes 461539Srgrimes__BEGIN_DECLS 4793032Simpvoid err(int, const char *, ...) __dead2 __printf0like(2, 3); 48102227Smikevoid verr(int, const char *, __va_list) __dead2 __printf0like(2, 0); 4993032Simpvoid errc(int, int, const char *, ...) __dead2 __printf0like(3, 4); 50102227Smikevoid verrc(int, int, const char *, __va_list) __dead2 5141284Sbde __printf0like(3, 0); 5293032Simpvoid errx(int, const char *, ...) __dead2 __printf0like(2, 3); 53102227Smikevoid verrx(int, const char *, __va_list) __dead2 __printf0like(2, 0); 5493032Simpvoid warn(const char *, ...) __printf0like(1, 2); 55102227Smikevoid vwarn(const char *, __va_list) __printf0like(1, 0); 5693032Simpvoid warnc(int, const char *, ...) __printf0like(2, 3); 57102227Smikevoid vwarnc(int, const char *, __va_list) __printf0like(2, 0); 5893032Simpvoid warnx(const char *, ...) __printflike(1, 2); 59102227Smikevoid vwarnx(const char *, __va_list) __printflike(1, 0); 6093032Simpvoid err_set_file(void *); 6193032Simpvoid err_set_exit(void (*)(int)); 621539Srgrimes__END_DECLS 631539Srgrimes 641539Srgrimes#endif /* !_ERR_H_ */ 65