xref: /openbsd/lib/libc/gen/errc.c (revision 9b9d2a55)
1*9b9d2a55Sguenther /*	$OpenBSD: errc.c,v 1.2 2015/08/31 02:53:57 guenther Exp $ */
2d01ec059Sguenther /*-
3d01ec059Sguenther  * Copyright (c) 1993
4d01ec059Sguenther  *	The Regents of the University of California.  All rights reserved.
5d01ec059Sguenther  *
6d01ec059Sguenther  * Redistribution and use in source and binary forms, with or without
7d01ec059Sguenther  * modification, are permitted provided that the following conditions
8d01ec059Sguenther  * are met:
9d01ec059Sguenther  * 1. Redistributions of source code must retain the above copyright
10d01ec059Sguenther  *    notice, this list of conditions and the following disclaimer.
11d01ec059Sguenther  * 2. Redistributions in binary form must reproduce the above copyright
12d01ec059Sguenther  *    notice, this list of conditions and the following disclaimer in the
13d01ec059Sguenther  *    documentation and/or other materials provided with the distribution.
14d01ec059Sguenther  * 3. Neither the name of the University nor the names of its contributors
15d01ec059Sguenther  *    may be used to endorse or promote products derived from this software
16d01ec059Sguenther  *    without specific prior written permission.
17d01ec059Sguenther  *
18d01ec059Sguenther  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19d01ec059Sguenther  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20d01ec059Sguenther  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21d01ec059Sguenther  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22d01ec059Sguenther  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23d01ec059Sguenther  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24d01ec059Sguenther  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25d01ec059Sguenther  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26d01ec059Sguenther  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27d01ec059Sguenther  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28d01ec059Sguenther  * SUCH DAMAGE.
29d01ec059Sguenther  */
30d01ec059Sguenther 
31d01ec059Sguenther #include <err.h>
32d01ec059Sguenther #include <stdarg.h>
33d01ec059Sguenther 
34d01ec059Sguenther __dead void
errc(int eval,int code,const char * fmt,...)35*9b9d2a55Sguenther errc(int eval, int code, const char *fmt, ...)
36d01ec059Sguenther {
37d01ec059Sguenther 	va_list ap;
38d01ec059Sguenther 
39d01ec059Sguenther 	va_start(ap, fmt);
40*9b9d2a55Sguenther 	verrc(eval, code, fmt, ap);
41d01ec059Sguenther 	va_end(ap);
42d01ec059Sguenther }
43*9b9d2a55Sguenther DEF_WEAK(errc);
44