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