Fixes to typos in comments etc.
[AROS.git] / compiler / stdc / include / aros / stdc / errno.h
blob6e64a2ca0943c5ba8a2f47a534a79c64e8b08dac
1 #ifndef _STDC_ERRNO_H_
2 #define _STDC_ERRNO_H_
4 /*
5 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
6 $Id$
8 C99 header file errno.h
10 On AROS we take the NetBSD errno numbering as reference for backwards
11 compatibility with the errno numbering used in the bsdsocket.library.
15 * Copyright (c) 1982, 1986, 1989, 1993
16 * The Regents of the University of California. All rights reserved.
17 * (c) UNIX System Laboratories, Inc.
18 * All or some portions of this file are derived from material licensed
19 * to the University of California by American Telephone and Telegraph
20 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
21 * the permission of UNIX System Laboratories, Inc.
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the above copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. Neither the name of the University nor the names of its contributors
32 * may be used to endorse or promote products derived from this software
33 * without specific prior written permission.
35 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
36 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
37 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
38 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
39 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
40 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
41 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
42 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
43 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
44 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
45 * SUCH DAMAGE.
47 * @(#)errno.h 8.5 (Berkeley) 1/21/94
49 #include <aros/system.h>
51 /* C99 required error codes */
52 #define EDOM 33 /* Numerical argument out of domain */
53 #define EILSEQ 85 /* Illegal byte sequence */
54 #define EINVAL 22 /* Invalid argument */
55 #define ERANGE 34 /* Result too large */
58 /* Codes used for error conversion of DOS error codes */
59 #define EACCES 13 /* Permission denied */
60 #define EBUSY 16 /* Device busy */
61 #define EEXIST 17 /* File exists */
62 #define EINTR 4 /* Interrupted system call */
63 #define ENOBUFS 55 /* No buffer space available */
64 #define ENOENT 2 /* No such file or directory */
65 #define ENOEXEC 8 /* Exec format error */
66 #define ENOMEM 12 /* Cannot allocate memory */
67 #define ENOTDIR 20 /* Not a directory */
68 #define EXDEV 18 /* Cross-device link */
70 /* MAX_ERRNO is currently used by ioerr2errno conversion
71 To keep backwards compatibility it's value should not change
73 #define MAX_ERRNO 1000 /* Numbers should never be bigger than this value */
75 /* __STDC_ELAST gives the highest value of errno used by stdc.library */
76 #define __STDC_ELAST EILSEQ
78 __BEGIN_DECLS
80 /* This function is a link library function.
81 This way errno.h include file can be kept clean without
82 exposing AROS specific defines as defined in exec/types.h etc.
84 int *__stdc_geterrnoptr(void);
85 #ifndef errno
86 #define errno (*__stdc_geterrnoptr())
87 #endif
89 /* AROS specific functions to translate DOS error numbers to errno.
90 ioerrno2errno() will always call the function for the selected C
91 linklib, __stdc_ioerr2errno() is always the stdc.library version.
93 int ioerr2errno(int ioerr);
94 int __stdc_ioerr2errno(int ioerr);
96 __END_DECLS
98 #endif /* _STDC_ERRNO_H_ */