1*86ed47b3Sjoerg /* $NetBSD: warnc.c,v 1.3 2014/06/06 11:38:41 joerg Exp $ */
2eaffbb92Schristos
3eaffbb92Schristos /*-
4eaffbb92Schristos * Copyright (c) 1993
5eaffbb92Schristos * The Regents of the University of California. All rights reserved.
6eaffbb92Schristos *
7eaffbb92Schristos * Redistribution and use in source and binary forms, with or without
8eaffbb92Schristos * modification, are permitted provided that the following conditions
9eaffbb92Schristos * are met:
10eaffbb92Schristos * 1. Redistributions of source code must retain the above copyright
11eaffbb92Schristos * notice, this list of conditions and the following disclaimer.
12eaffbb92Schristos * 2. Redistributions in binary form must reproduce the above copyright
13eaffbb92Schristos * notice, this list of conditions and the following disclaimer in the
14eaffbb92Schristos * documentation and/or other materials provided with the distribution.
15eaffbb92Schristos * 3. Neither the name of the University nor the names of its contributors
16eaffbb92Schristos * may be used to endorse or promote products derived from this software
17eaffbb92Schristos * without specific prior written permission.
18eaffbb92Schristos *
19eaffbb92Schristos * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20eaffbb92Schristos * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21eaffbb92Schristos * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22eaffbb92Schristos * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23eaffbb92Schristos * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24eaffbb92Schristos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25eaffbb92Schristos * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26eaffbb92Schristos * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27eaffbb92Schristos * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28eaffbb92Schristos * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29eaffbb92Schristos * SUCH DAMAGE.
30eaffbb92Schristos */
31eaffbb92Schristos
32eaffbb92Schristos #if HAVE_NBTOOL_CONFIG_H
33eaffbb92Schristos #include "nbtool_config.h"
34eaffbb92Schristos #endif
35eaffbb92Schristos
36eaffbb92Schristos #include <sys/cdefs.h>
37eaffbb92Schristos #if defined(LIBC_SCCS) && !defined(lint)
38eaffbb92Schristos #if 0
39eaffbb92Schristos static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
40eaffbb92Schristos #else
41*86ed47b3Sjoerg __RCSID("$NetBSD: warnc.c,v 1.3 2014/06/06 11:38:41 joerg Exp $");
42eaffbb92Schristos #endif
43eaffbb92Schristos #endif /* LIBC_SCCS and not lint */
44eaffbb92Schristos
45eaffbb92Schristos #include "namespace.h"
46eaffbb92Schristos #include <err.h>
47eaffbb92Schristos #include <stdarg.h>
48eaffbb92Schristos
49eaffbb92Schristos #ifdef __weak_alias
__weak_alias(warnc,_warnc)50eaffbb92Schristos __weak_alias(warnc, _warnc)
51eaffbb92Schristos #endif
52eaffbb92Schristos
53*86ed47b3Sjoerg #if !HAVE_ERR_H || !HAVE_DECL_WARNC
54eaffbb92Schristos void
55eaffbb92Schristos warnc(int code, const char *fmt, ...)
56eaffbb92Schristos {
57eaffbb92Schristos va_list ap;
58eaffbb92Schristos
59eaffbb92Schristos va_start(ap, fmt);
60eaffbb92Schristos vwarnc(code, fmt, ap);
61eaffbb92Schristos va_end(ap);
62eaffbb92Schristos }
63eaffbb92Schristos #endif
64