xref: /illumos-gate/usr/src/head/err.h (revision 9f7c8a62)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5e3320f40Smarkfen  * Common Development and Distribution License (the "License").
6e3320f40Smarkfen  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
22e3320f40Smarkfen  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
26621b6cf7SAndy Fiddaman /*
27621b6cf7SAndy Fiddaman  * Copyright 2022 OmniOS Community Edition (OmniOSce) Association.
28621b6cf7SAndy Fiddaman  */
29621b6cf7SAndy Fiddaman 
307c478bd9Sstevel@tonic-gate #ifndef	_ERR_H
317c478bd9Sstevel@tonic-gate #define	_ERR_H
327c478bd9Sstevel@tonic-gate 
337c478bd9Sstevel@tonic-gate #ifdef __cplusplus
347c478bd9Sstevel@tonic-gate extern "C" {
357c478bd9Sstevel@tonic-gate #endif
367c478bd9Sstevel@tonic-gate 
37d362b749Svk #include <stdio.h>
387c478bd9Sstevel@tonic-gate #include <stdarg.h>
395ea5e6a1SRichard Lowe #include <sys/ccompile.h>
407c478bd9Sstevel@tonic-gate 
41d362b749Svk /* Program exit and warning calls */
42*9f7c8a62SRobert Mustacchi void err(int, const char *, ...) __PRINTFLIKE(2) __NORETURN;
43*9f7c8a62SRobert Mustacchi void verr(int, const char *, va_list) __VPRINTFLIKE(2) __NORETURN;
44*9f7c8a62SRobert Mustacchi void errc(int, int, const char *, ...) __PRINTFLIKE(3) __NORETURN;
45*9f7c8a62SRobert Mustacchi void verrc(int, int, const char *, va_list) __VPRINTFLIKE(3) __NORETURN;
46*9f7c8a62SRobert Mustacchi void errx(int, const char *, ...) __PRINTFLIKE(2) __NORETURN;
47*9f7c8a62SRobert Mustacchi void verrx(int, const char *, va_list) __VPRINTFLIKE(2) __NORETURN;
48*9f7c8a62SRobert Mustacchi void warn(const char *, ...) __PRINTFLIKE(1);
49*9f7c8a62SRobert Mustacchi void vwarn(const char *, va_list) __VPRINTFLIKE(1);
50*9f7c8a62SRobert Mustacchi void warnc(int, const char *, ...) __PRINTFLIKE(2);
51*9f7c8a62SRobert Mustacchi void vwarnc(int, const char *, va_list) __VPRINTFLIKE(2);
52*9f7c8a62SRobert Mustacchi void warnx(const char *, ...) __PRINTFLIKE(1);
53*9f7c8a62SRobert Mustacchi void vwarnx(const char *, va_list) __VPRINTFLIKE(1);
547c478bd9Sstevel@tonic-gate 
557c478bd9Sstevel@tonic-gate #ifdef __cplusplus
567c478bd9Sstevel@tonic-gate }
577c478bd9Sstevel@tonic-gate #endif
587c478bd9Sstevel@tonic-gate 
597c478bd9Sstevel@tonic-gate #endif	/* _ERR_H */
60