]> git.saurik.com Git - apple/libc.git/blame - mach.subproj/headers.subproj/errorlib.h
Libc-166.tar.gz
[apple/libc.git] / mach.subproj / headers.subproj / errorlib.h
CommitLineData
e9ce8d39
A
1/*
2 * @OSF_COPYRIGHT@
3 */
4
5/*
6 * Mach Operating System
7 * Copyright (c) 1991,1990,1989 Carnegie Mellon University
8 * All Rights Reserved.
9 *
10 * Permission to use, copy, modify and distribute this software and its
11 * documentation is hereby granted, provided that both the copyright
12 * notice and this permission notice appear in all copies of the
13 * software, derivative works or modified versions, and any portions
14 * thereof, and that both notices appear in supporting documentation.
15 *
16 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
17 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
18 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
19 *
20 * Carnegie Mellon requests users of this software to return to
21 *
22 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
23 * School of Computer Science
24 * Carnegie Mellon University
25 * Pittsburgh PA 15213-3890
26 *
27 * any improvements or extensions that they make and grant Carnegie the
28 * rights to redistribute these changes.
29 */
30
31/*
32 * File: errorlib.h
33 * Author: Douglas Orr, Carnegie Mellon University
34 * Date: Mar. 1988
35 *
36 * Error bases for subsytems errors.
37 */
38
39#include <mach/error.h>
40
41#define MACH_IPC_SEND_MOD (err_mach_ipc|err_sub(0))
42#define MACH_IPC_RCV_MOD (err_mach_ipc|err_sub(1))
43#define MACH_IPC_MIG_MOD (err_mach_ipc|err_sub(2))
44
45#define IPC_SEND_MOD (err_ipc|err_sub(0))
46#define IPC_RCV_MOD (err_ipc|err_sub(1))
47#define IPC_MIG_MOD (err_ipc|err_sub(2))
48
49#define SERV_NETNAME_MOD (err_server|err_sub(0))
50#define SERV_ENV_MOD (err_server|err_sub(1))
51#define SERV_EXECD_MOD (err_server|err_sub(2))
52
53
54#define NO_SUCH_ERROR "unknown error code"
55
56struct error_subsystem {
57 char * subsys_name;
58 int max_code;
59 char * * codes;
60};
61
62struct error_system {
63 int max_sub;
64 char * bad_sub;
65 struct error_subsystem * subsystem;
66};
67
68extern struct error_system errors[err_max_system+1];
69
70#define errlib_count(s) (sizeof(s)/sizeof(s[0]))