]> cygwin.com Git - cygwin-apps/cygutils.git/blame - src/col/err.h
Fixes for cygstart; bump version number and documentation
[cygwin-apps/cygutils.git] / src / col / err.h
CommitLineData
ad412770
CW
1/*-
2 * Copyright (c) 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 4. Neither the name of the University nor the names of its contributors
14 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)err.h 8.1 (Berkeley) 6/2/93
30 */
31
32/* 2002-05-22 David A. Willis: modified license to the 'BSD no advert'
33 * license, as required by the Director of the Office of
34 * Technology Licensing of the University of California on
35 * July 22, 1999.
36 * See http://www.opensource.org/licenses/bsd-license.html
37 */
38
39#ifndef _ERR_H_
40#define _ERR_H_
41
42#ifdef HAVE_STDARG_H
43 #include <stdarg.h>
44 #define _BSD_VA_LIST_ va_list
45 #define __dead
46#else /* not HAVE_STDARG_H */
47/*
48 * Don't use va_list in the err/warn prototypes. Va_list is typedef'd in two
49 * places (<machine/varargs.h> and <machine/stdarg.h>), so if we include one
50 * of them here we may collide with the utility's includes. It's unreasonable
51 * for utilities to have to include one of them to include err.h, so we get
52 * _BSD_VA_LIST_ from <machine/ansi.h> and use it.
53 */
54 #include <machine/ansi.h>
55#endif /* not HAVE_STDARG_H */
56
57#include <sys/cdefs.h>
58
59__BEGIN_DECLS
60#ifdef HAVE_STDARG_H
61void err_setprogname __P((const char *));
62#endif /* HAVE_STDARG_H */
63__dead void err __P((int, const char *, ...));
64__dead void verr __P((int, const char *, _BSD_VA_LIST_));
65__dead void errx __P((int, const char *, ...));
66__dead void verrx __P((int, const char *, _BSD_VA_LIST_));
67void warn __P((const char *, ...));
68void vwarn __P((const char *, _BSD_VA_LIST_));
69void warnx __P((const char *, ...));
70void vwarnx __P((const char *, _BSD_VA_LIST_));
71__END_DECLS
72
73#ifdef HAVE_STDARG_H
74 #undef _BSD_VA_LIST
75#endif /* HAVE_STDARG_H */
76
77#endif /* !_ERR_H_ */
This page took 0.027638 seconds and 5 git commands to generate.