Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:54:02

0001 /*
0002  * Copyright © 2006 Robert Millan
0003  * Copyright © 2009, 2011 Guillem Jover <guillem@hadrons.org>
0004  *
0005  * Redistribution and use in source and binary forms, with or without
0006  * modification, are permitted provided that the following conditions
0007  * are met:
0008  * 1. Redistributions of source code must retain the above copyright
0009  *    notice, this list of conditions and the following disclaimer.
0010  * 2. Redistributions in binary form must reproduce the above copyright
0011  *    notice, this list of conditions and the following disclaimer in the
0012  *    documentation and/or other materials provided with the distribution.
0013  * 3. The name of the author may not be used to endorse or promote products
0014  *    derived from this software without specific prior written permission.
0015  *
0016  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
0017  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
0018  * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
0019  * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
0020  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
0021  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
0022  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
0023  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
0024  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
0025  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0026  */
0027 
0028 #ifdef LIBBSD_OVERLAY
0029 #include <sys/cdefs.h>
0030 #if __has_include_next(<err.h>)
0031 #include_next <err.h>
0032 #else
0033 #define LIBBSD_NEED_ERR_H_FUNCS
0034 #endif
0035 #else
0036 #include <bsd/sys/cdefs.h>
0037 #if __has_include(<err.h>)
0038 #include <err.h>
0039 #else
0040 #define LIBBSD_NEED_ERR_H_FUNCS
0041 #endif
0042 #endif
0043 
0044 #ifndef LIBBSD_ERR_H
0045 #define LIBBSD_ERR_H
0046 
0047 #include <stdarg.h>
0048 
0049 __BEGIN_DECLS
0050 void vwarnc(int code, const char *format, va_list ap)
0051     __printflike(2, 0);
0052 void warnc(int code, const char *format, ...)
0053     __printflike(2, 3);
0054 
0055 void verrc(int status, int code, const char *format, va_list ap)
0056     __printflike(3, 0) __dead2;
0057 void errc(int status, int code, const char *format, ...)
0058     __printflike(3, 4) __dead2;
0059 
0060 #ifdef LIBBSD_NEED_ERR_H_FUNCS
0061 void vwarn(const char *format, va_list ap)
0062     __printflike(1, 0);
0063 void vwarnx(const char *format, va_list ap)
0064     __printflike(1, 0);
0065 void warn(const char *format, ...)
0066     __printflike(1, 2);
0067 void warnx(const char *format, ...)
0068     __printflike(1, 2);
0069 
0070 void verr(int status, const char *format, va_list ap)
0071     __printflike(2, 0) __dead2;
0072 void verrx(int status, const char *format, va_list ap)
0073     __printflike(2, 0) __dead2;
0074 void err(int status, const char *format, ...)
0075     __printflike(2, 3) __dead2;
0076 void errx(int status, const char *format, ...)
0077     __printflike(2, 3) __dead2;
0078 #endif
0079 __END_DECLS
0080 
0081 #endif