xref: /openbsd/include/errno.h (revision 6e13c3b6)
1*6e13c3b6Sguenther /*	$OpenBSD: errno.h,v 1.3 2017/08/10 13:34:46 guenther Exp $	*/
2da6dd71fSmillert 
3da6dd71fSmillert /*
4da6dd71fSmillert  * Copyright (c) 1982, 1986, 1989, 1993
5da6dd71fSmillert  *	The Regents of the University of California.  All rights reserved.
6da6dd71fSmillert  * (c) UNIX System Laboratories, Inc.
7da6dd71fSmillert  * All or some portions of this file are derived from material licensed
8da6dd71fSmillert  * to the University of California by American Telephone and Telegraph
9da6dd71fSmillert  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
10da6dd71fSmillert  * the permission of UNIX System Laboratories, Inc.
11da6dd71fSmillert  *
12da6dd71fSmillert  * Redistribution and use in source and binary forms, with or without
13da6dd71fSmillert  * modification, are permitted provided that the following conditions
14da6dd71fSmillert  * are met:
15da6dd71fSmillert  * 1. Redistributions of source code must retain the above copyright
16da6dd71fSmillert  *    notice, this list of conditions and the following disclaimer.
17da6dd71fSmillert  * 2. Redistributions in binary form must reproduce the above copyright
18da6dd71fSmillert  *    notice, this list of conditions and the following disclaimer in the
19da6dd71fSmillert  *    documentation and/or other materials provided with the distribution.
20da6dd71fSmillert  * 3. Neither the name of the University nor the names of its contributors
21da6dd71fSmillert  *    may be used to endorse or promote products derived from this software
22da6dd71fSmillert  *    without specific prior written permission.
23da6dd71fSmillert  *
24da6dd71fSmillert  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25da6dd71fSmillert  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26da6dd71fSmillert  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27da6dd71fSmillert  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28da6dd71fSmillert  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29da6dd71fSmillert  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30da6dd71fSmillert  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31da6dd71fSmillert  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32da6dd71fSmillert  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33da6dd71fSmillert  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34da6dd71fSmillert  * SUCH DAMAGE.
35da6dd71fSmillert  *
36da6dd71fSmillert  *	@(#)errno.h	8.5 (Berkeley) 1/21/94
37da6dd71fSmillert  */
38da6dd71fSmillert 
39da6dd71fSmillert #ifndef	_ERRNO_H_
40da6dd71fSmillert #define	_ERRNO_H_
41da6dd71fSmillert 
42da6dd71fSmillert #include <sys/errno.h>
43da6dd71fSmillert 
44da6dd71fSmillert __BEGIN_DECLS
45da6dd71fSmillert #if __BSD_VISIBLE
46da6dd71fSmillert #ifndef	__SYS_ERRLIST
47da6dd71fSmillert #define	__SYS_ERRLIST
48da6dd71fSmillert extern int sys_nerr;
49da6dd71fSmillert extern char *sys_errlist[];
50da6dd71fSmillert #endif /* __SYS_ERRLIST */
51da6dd71fSmillert #endif /* __BSD_VISIBLE */
52da6dd71fSmillert 
53da6dd71fSmillert #ifndef errno
54da6dd71fSmillert int *__errno(void);
55da6dd71fSmillert #define	errno (*__errno())
56da6dd71fSmillert #endif /* errno */
57da6dd71fSmillert __END_DECLS
58da6dd71fSmillert 
59da6dd71fSmillert #endif /* _ERRNO_H_ */
60