err.h revision 50473
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. 131539Srgrimes * 3. All advertising materials mentioning features or use of this software 141539Srgrimes * must display the following acknowledgement: 151539Srgrimes * This product includes software developed by the University of 161539Srgrimes * California, Berkeley and its contributors. 171539Srgrimes * 4. Neither the name of the University nor the names of its contributors 181539Srgrimes * may be used to endorse or promote products derived from this software 191539Srgrimes * without specific prior written permission. 201539Srgrimes * 211539Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 221539Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 231539Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 241539Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 251539Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 261539Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 271539Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 281539Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 291539Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 301539Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 311539Srgrimes * SUCH DAMAGE. 321539Srgrimes * 3341284Sbde * @(#)err.h 8.1 (Berkeley) 6/2/93 3450473Speter * $FreeBSD: head/include/err.h 50473 1999-08-27 23:45:13Z peter $ 351539Srgrimes */ 361539Srgrimes 371539Srgrimes#ifndef _ERR_H_ 381539Srgrimes#define _ERR_H_ 391539Srgrimes 401539Srgrimes/* 411539Srgrimes * Don't use va_list in the err/warn prototypes. Va_list is typedef'd in two 421539Srgrimes * places (<machine/varargs.h> and <machine/stdarg.h>), so if we include one 431539Srgrimes * of them here we may collide with the utility's includes. It's unreasonable 441539Srgrimes * for utilities to have to include one of them to include err.h, so we get 451539Srgrimes * _BSD_VA_LIST_ from <machine/ansi.h> and use it. 461539Srgrimes */ 471539Srgrimes#include <machine/ansi.h> 481539Srgrimes#include <sys/cdefs.h> 491539Srgrimes 501539Srgrimes__BEGIN_DECLS 5141284Sbdevoid err __P((int, const char *, ...)) __dead2 __printf0like(2, 3); 5241284Sbdevoid verr __P((int, const char *, _BSD_VA_LIST_)) __dead2 5341284Sbde __printf0like(2, 0); 5441284Sbdevoid errc __P((int, int, const char *, ...)) __dead2 __printf0like(3, 4); 5541284Sbdevoid verrc __P((int, int, const char *, _BSD_VA_LIST_)) __dead2 5641284Sbde __printf0like(3, 0); 5741284Sbdevoid errx __P((int, const char *, ...)) __dead2 __printf0like(2, 3); 5841284Sbdevoid verrx __P((int, const char *, _BSD_VA_LIST_)) __dead2 5941284Sbde __printf0like(2, 0); 6040739Sjdpvoid warn __P((const char *, ...)) __printf0like(1, 2); 6141284Sbdevoid vwarn __P((const char *, _BSD_VA_LIST_)) __printf0like(1, 0); 6240739Sjdpvoid warnc __P((int, const char *, ...)) __printf0like(2, 3); 6341284Sbdevoid vwarnc __P((int, const char *, _BSD_VA_LIST_)) __printf0like(2, 0); 6440739Sjdpvoid warnx __P((const char *, ...)) __printflike(1, 2); 6541284Sbdevoid vwarnx __P((const char *, _BSD_VA_LIST_)) __printflike(1, 0); 6618286Sbdevoid err_set_file __P((void *)); 6718286Sbdevoid err_set_exit __P((void (*)(int))); 681539Srgrimes__END_DECLS 691539Srgrimes 701539Srgrimes#endif /* !_ERR_H_ */ 71