1d362b749Svk199839 /* 2d362b749Svk199839 * CDDL HEADER START 3d362b749Svk199839 * 4d362b749Svk199839 * The contents of this file are subject to the terms of the 5d362b749Svk199839 * Common Development and Distribution License (the "License"). 6d362b749Svk199839 * You may not use this file except in compliance with the License. 7d362b749Svk199839 * 8d362b749Svk199839 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9d362b749Svk199839 * or http://www.opensolaris.org/os/licensing. 10d362b749Svk199839 * See the License for the specific language governing permissions 11d362b749Svk199839 * and limitations under the License. 12d362b749Svk199839 * 13d362b749Svk199839 * When distributing Covered Code, include this CDDL HEADER in each 14d362b749Svk199839 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15d362b749Svk199839 * If applicable, add the following below this CDDL HEADER, with the 16d362b749Svk199839 * fields enclosed by brackets "[]" replaced with your own identifying 17d362b749Svk199839 * information: Portions Copyright [yyyy] [name of copyright owner] 18d362b749Svk199839 * 19d362b749Svk199839 * CDDL HEADER END 20d362b749Svk199839 */ 21d362b749Svk199839 /* 22d362b749Svk199839 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23d362b749Svk199839 * Use is subject to license terms. 24d362b749Svk199839 */ 25d362b749Svk199839 26621b6cf7SAndy Fiddaman /* 27621b6cf7SAndy Fiddaman * Copyright 2022 OmniOS Community Edition (OmniOSce) Association. 28621b6cf7SAndy Fiddaman */ 29621b6cf7SAndy Fiddaman 30d362b749Svk199839 #ifndef _ERR_H 31d362b749Svk199839 #define _ERR_H 32d362b749Svk199839 33d362b749Svk199839 #ifdef __cplusplus 34d362b749Svk199839 extern "C" { 35d362b749Svk199839 #endif 36d362b749Svk199839 37d362b749Svk199839 #include <stdio.h> 38d362b749Svk199839 #include <stdarg.h> 395ea5e6a1SRichard Lowe #include <sys/ccompile.h> 40d362b749Svk199839 41d362b749Svk199839 /* 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); 54d362b749Svk199839 55d362b749Svk199839 #ifdef __cplusplus 56d362b749Svk199839 } 57d362b749Svk199839 #endif 58d362b749Svk199839 59d362b749Svk199839 #endif /* _ERR_H */ 60