|
|
1.1 root 1: /*
2: * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3: *
4: * @APPLE_LICENSE_HEADER_START@
5: *
6: * The contents of this file constitute Original Code as defined in and
7: * are subject to the Apple Public Source License Version 1.1 (the
8: * "License"). You may not use this file except in compliance with the
9: * License. Please obtain a copy of the License at
10: * http://www.apple.com/publicsource and read it before using this file.
11: *
12: * This Original Code and all software distributed under the License are
13: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17: * License for the specific language governing rights and limitations
18: * under the License.
19: *
20: * @APPLE_LICENSE_HEADER_END@
21: */
22: /*
23: * @OSF_COPYRIGHT@
24: */
25: /*
26: * HISTORY
27: *
28: * Revision 1.1.1.1 1998/09/22 21:05:51 wsanchez
29: * Import of Mac OS X kernel (~semeria)
30: *
31: * Revision 1.1.1.1 1998/03/07 02:25:35 wsanchez
32: * Import of OSF Mach kernel (~mburg)
33: *
34: * Revision 1.1.5.1 1997/01/31 15:46:31 emcmanus
35: * Merged with nmk22b1_shared.
36: * [1997/01/30 08:42:08 emcmanus]
37: *
38: * Revision 1.1.2.5 1996/11/29 13:04:57 emcmanus
39: * Added EIO for libsa_mach's getclock().
40: * [1996/11/29 09:59:19 emcmanus]
41: *
42: * Revision 1.1.2.4 1996/11/08 12:02:15 emcmanus
43: * Replaced errno variable by a macro that calls a function defined
44: * either in libsa_mach or in a threads library.
45: * [1996/11/08 11:48:47 emcmanus]
46: *
47: * Revision 1.1.2.3 1996/10/14 13:31:46 emcmanus
48: * Added ETIMEDOUT.
49: * [1996/10/14 13:29:55 emcmanus]
50: *
51: * Revision 1.1.2.2 1996/10/03 17:53:40 emcmanus
52: * Added new error codes needed by libpthread.a.
53: * [1996/10/03 16:17:42 emcmanus]
54: *
55: * Revision 1.1.2.1 1996/09/30 10:14:32 bruel
56: * First revision.
57: * [96/09/30 bruel]
58: *
59: * $EndLog$
60: */
61:
62: /*
63: * ANSI C defines EDOM and ERANGE. POSIX defines the remaining values.
64: * We may at some stage want to surround the extra values with
65: * #ifdef _POSIX_SOURCE.
66: * By an extraordinary coincidence, nearly all the values defined here
67: * correspond exactly to those in OSF/1 and in Linux. Imagine that.
68: * The exception is ETIMEDOUT, which has different values in the two
69: * systems. We use the OSF/1 value here.
70: */
71:
72: extern int *__mach_errno_addr(void);
73: #define errno (*__mach_errno_addr())
74:
75: #define ESUCCESS 0 /* Success */
76: #define EPERM 1 /* Not owner */
77: #define ESRCH 3 /* No such process */
78: #define EIO 5 /* I/O error */
79: #define ENOMEM 12 /* Not enough core */
80: #define EBUSY 16 /* Mount device busy */
81: #define EINVAL 22 /* Invalid argument */
82: #define EDOM 33 /* Argument too large */
83: #define ERANGE 34 /* Result too large */
84: #define ETIMEDOUT 60 /* Connection timed out */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.