summaryrefslogtreecommitdiff
path: root/hurd/hurd_types.defs
blob: 99f043c18a92d0a2e9c5fdc38a35538b09d927ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
/* MiG type declarations for Hurd interfaces		-*- C -*-
   Copyright (C) 1993,94,95,96,98,2001,02 Free Software Foundation, Inc.

This file is part of the GNU Hurd.

The GNU Hurd is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

The GNU Hurd is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with the GNU Hurd; see the file COPYING.  If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */


#include <mach/std_types.defs>
#include <mach/mach_types.defs>
#include <device/device_types.defs>

type file_t = mach_port_copy_send_t
#ifdef FILE_INTRAN
intran: FILE_INTRAN
#endif
#ifdef FILE_OUTTRAN
outtran: FILE_OUTTRAN
#endif
#ifdef FILE_DESTRUCTOR
destructor: FILE_DESTRUCTOR
#endif
;

type fsys_t = mach_port_copy_send_t
#ifdef FSYS_INTRAN
intran: FSYS_INTRAN
#endif
#ifdef FSYS_OUTTRAN
outtran: FSYS_OUTTRAN
#endif
#ifdef FSYS_DESTRUCTOR
destructor: FSYS_DESTRUCTOR
#endif
;


type io_t = mach_port_copy_send_t
#ifdef IO_INTRAN
intran: IO_INTRAN
#endif
#ifdef IO_OUTTRAN
outtran: IO_OUTTRAN
#endif
#ifdef IO_DESTRUCTOR
destructor: IO_DESTRUCTOR
#endif
;

type process_t = mach_port_copy_send_t
#ifdef PROCESS_INTRAN
intran: PROCESS_INTRAN
#endif
#ifdef PROCESS_OUTTRAN
outtran: PROCESS_OUTTRAN
#endif
#ifdef PROCESS_DESTRUCTOR
destructor: PROCESS_DESTRUCTOR
#endif
;

type auth_t = mach_port_copy_send_t
#ifdef AUTH_INTRAN
intran: AUTH_INTRAN
#endif
#ifdef AUTH_OUTTRAN
outtran: AUTH_OUTTRAN
#endif
#ifdef AUTH_DESTRUCTOR
destructor: AUTH_DESTRUCTOR
#endif
;

type socket_t = mach_port_copy_send_t
#ifdef SOCKET_INTRAN
intran: SOCKET_INTRAN
#endif
#ifdef SOCKET_OUTTRAN
outtran: SOCKET_OUTTRAN
#endif
#ifdef SOCKET_DESTRUCTOR
destructor: SOCKET_DESTRUCTOR
#endif
;

/* Protocol family */
type pf_t = mach_port_copy_send_t
#ifdef PF_INTRAN
intran: PF_INTRAN
#endif
#ifdef PF_OUTTRAN
outtran: PF_OUTTRAN
#endif
#ifdef PF_DESTRUCTOR
destructor: PF_DESTRUCTOR
#endif
;

type addr_port_t = mach_port_copy_send_t
#ifdef ADDRPORT_INTRAN
intran: ADDRPORT_INTRAN
#endif
#ifdef ADDRPORT_OUTTRAN
outtran: ADDRPORT_OUTTRAN
#endif
#ifdef ADDRPORT_DESTRUCTOR
destructor: ADDRPORT_DESTRUCTOR
#endif
;

type term_t = mach_port_copy_send_t
#ifdef TERM_INTRAN
intran: TERM_INTRAN
#endif
#ifdef TERM_OUTTRAN
outtran: TERM_OUTTRAN
#endif
#ifdef TERM_DESTRUCTOR
destructor: TERM_DESTRUCTOR
#endif
;

type startup_t = mach_port_copy_send_t
#ifdef STARTUP_INTRAN
intran: STARTUP_INTRAN
#endif
#ifdef STARTUP_OUTTRAN
outtran: STARTUP_OUTTRAN
#endif
#ifdef STARTUP_DESTRUCTOR
destructor: STARTUP_DESTRUCTOR
#endif
;

type proccoll_t = mach_port_copy_send_t;

type sreply_port_t = MACH_MSG_TYPE_MAKE_SEND_ONCE | polymorphic
	ctype: mach_port_t;

/* These macros are used in some .defs files so that every routine has a
   server reply port argument #ifdef REPLY_PORTS.  */
#ifdef REPLY_PORTS
#define RPTDECL	sreplyport reply: sreply_port_t
#define RPT	RPTDECL;
#define RPTLAST	; RPTDECL
#else
#define RPTLAST
#define RPT
#endif

/* This macros are used in some .defs files so that every out data_t
   (or equivalent) has a servercopy keyword #ifdef SERVERCOPY. */
#ifdef SERVERCOPY
#define SCP , servercopy
#else
#define SCP
#endif

#ifdef HAVE_MIG_RETCODE
#define RETURN_CODE_ARG in return_code: kern_return_t, retcode
#else
#define RETURN_CODE_ARG in return_code: kern_return_t
#endif


#ifdef USERPREFIX
userprefix USERPREFIX;
#endif

#ifdef SERVERPREFIX
serverprefix SERVERPREFIX;
#endif

/* RPC interfaces which are interrupt compliant (see interrupt.defs)
   should put ``INTR_INTERFACE'' at the beginning of their .defs file.  */
#ifndef INTR_INTERFACE
#define INTR_INTERFACE		/* Nothing special.  */
#endif

type data_t = array[] of char;
type string_t = c_string[1024]; /* XXX */
type io_statbuf_t = struct[32] of int;
type uid_t = unsigned32;
type gid_t = unsigned32;
type mode_t = unsigned32;
type retry_type = unsigned32;
type pid_t = int32;
type wait_status_t = int32;
type off_t = int32;
type size_t = unsigned32;
type file_changed_type_t = unsigned32;
type dir_changed_type_t = unsigned32;

type portarray_t = array[] of mach_port_send_t;
type intarray_t = array[] of int;
type off_array_t = array[] of off_t;

type pidarray_t = array[] of pid_t;
type procinfo_t = array[] of int;
type fsys_statfsbuf_t=struct[16] of int;

type idarray_t = array[] of uid_t;

type rusage_t = struct[18] of int; /* XXX */

type flock_t = struct[5] of int;

#define _SYS_UTSNAME_H		/* Inhibit warning from <bits/utsname.h>.  */
#include <bits/utsname.h>
type utsname_t = struct[5 * _UTSNAME_LENGTH] of char;

import <sys/types.h>;
import <sys/stat.h>;
import <sys/statfs.h>;
import <sys/resource.h>;
import <sys/utsname.h>;
import <hurd/hurd_types.h>;