-
Notifications
You must be signed in to change notification settings - Fork 1
/
tbs_rpc_kernel.h
226 lines (189 loc) · 6.52 KB
/
tbs_rpc_kernel.h
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
/* * (C) Copyright IBM Corporation 1990, 2008. */
/*
This program 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.
This program 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 this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Author: IBM Corporation
This module is part of the IBM (R) Rational (R) ClearCase (R)
Multi-version file system (MVFS).
For support, please visit http://www.ibm.com/software/support
*/
#if !defined(_TBS_RPC_KERNEL_H_)
#define _TBS_RPC_KERNEL_H_
#include <ks_rpc.h>
#include <tbs_base.h>
#include <vob_mtype.h>
/* The following macro is used to cast an xdr function for one kind of
object (say u_long) to that for another kind of object (say tbs_fmode_t) */
#if ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4)) || __GNUC__ >= 4
/* can't do XDR function name casting */
#else
#define TBS_XDR_FUNC(obj_type) (bool_t (*)(XDR *_xdrs, obj_type *_objp EZ_XDR_ARGDECL))
#endif /* GCC 3.4 or later */
/*
* Type choices for time struct, size_t, time_t, etc are made in
* platform-specific header files ks_mdep_<platform>.h, the proper one
* of which will get included for us by ks_base.h.
*/
/****************************************************************************
* xdr_size_t
* === SUMMARY LINE ===
* IN *xdrs
* IN *objp
*/
EZ_XDR_ROUTINE(size_t);
#if !defined(TBS_RPC_DECLS_ONLY) && defined(TBS_XDR_FUNC)
#if defined(ATRIA_SIZE_T_ULONG)
#define xdr_size_t (TBS_XDR_FUNC(size_t) xdr_u_long)
#elif defined(ATRIA_SIZE_T_UINT)
#define xdr_size_t (TBS_XDR_FUNC(size_t) xdr_u_int)
#elif defined(ATRIA_SIZE_T_INT)
#define xdr_size_t (TBS_XDR_FUNC(size_t) xdr_int)
#elif defined(ATRIA_SIZE_T_UINT64)
#define xdr_size_t (TBS_XDR_FUNC(size_t) atria_xdr_uint64)
#else
#error "tbs_rpc_kernel.h: xdr type for size_t unknown"
#endif
#if defined(ATRIA_SIZE_T_UINT64)
EXTERN bool_t atria_xdr_uint64(XDR *, unsigned __int64 * EZ_XDR_ARGDECL);
#endif
#endif /* !TBS_RPC_DECLS_ONLY && TBS_XDR_FUNC */
/****************************************************************************
* xdr_time_t
* === SUMMARY LINE ===
* IN *xdrs
* IN *objp
*/
EZ_XDR_ROUTINE(time_t);
#if !defined(TBS_RPC_DECLS_ONLY) && defined(TBS_XDR_FUNC)
#if (defined(ATRIA_TIME_T_INT) && !defined(ATRIA_64BIT_LONGS))
#define xdr_time_t (TBS_XDR_FUNC(time_t) xdr_int)
#else
#if defined(ATRIA_TIME_T_LONG)
#define xdr_time_t (TBS_XDR_FUNC(time_t) xdr_long)
#elif defined(ATRIA_TIME_T_INT64)
#define xdr_time_t (TBS_XDR_FUNC(time_t) atria_xdr_int64)
#else
#error "tbs_rpc.h: xdr type for time_t unknown"
#endif
#endif
#if defined(ATRIA_TIME_T_INT64)
EXTERN bool_t atria_xdr_int64(XDR *, __int64 * EZ_XDR_ARGDECL);
#endif
#endif /* !TBS_RPC_DECLS_ONLY && TBS_XDR_FUNC */
/****************************************************************************
* xdr_timeval (struct timeval)
* === SUMMARY LINE ===
* IN *xdrs
* IN *objp
*/
/*
* Provided by system libraries on some operating systems, and by us
* on others.
*/
EXTERN bool_t
xdr_timeval(
XDR *,
struct timeval *
);
/****************************************************************************
* xdr_tbs_boolean_t
* === SUMMARY LINE ===
* IN *xdrs
* IN *objp
*/
EZ_XDR_ROUTINE(tbs_boolean_t);
#if !defined(TBS_RPC_DECLS_ONLY) && defined(TBS_XDR_FUNC)
#define xdr_tbs_boolean_t (TBS_XDR_FUNC(tbs_boolean_t) xdr_int)
#endif /* !TBS_RPC_DECLS_ONLY && TBS_XDR_FUNC */
/****************************************************************************
* xdr_tbs_status_t
* === SUMMARY LINE ===
* IN *xdrs
* IN *objp
*/
EZ_XDR_ROUTINE(tbs_status_t);
#if !defined(TBS_RPC_DECLS_ONLY) && defined(TBS_XDR_FUNC)
#define xdr_tbs_status_t (TBS_XDR_FUNC(tbs_status_t) xdr_int)
#endif /* !TBS_RPC_DECLS_ONLY && TBS_XDR_FUNC */
/****************************************************************************
* xdr_tbs_uuid_t
* === SUMMARY LINE ===
* IN *xdrs
* IN *objp
*/
EZ_XDR_ROUTINE(tbs_uuid_t);
/****************************************************************************
* xdr_tbs_oid_t
* === SUMMARY LINE ===
* IN *xdrs
* IN *objp
*/
EZ_XDR_ROUTINE(tbs_oid_t);
#if !defined(TBS_RPC_DECLS_ONLY) && defined(TBS_XDR_FUNC)
#define xdr_tbs_oid_t (TBS_XDR_FUNC(tbs_oid_t) xdr_tbs_uuid_t)
#endif /* !TBS_RPC_DECLS_ONLY && TBS_XDR_FUNC */
/****************************************************************************
* xdr_tbs_dbid_t
* === SUMMARY LINE ===
* IN *xdrs
* IN *objp
*/
EZ_XDR_ROUTINE(tbs_dbid_t);
#if !defined(TBS_RPC_DECLS_ONLY) && defined(TBS_XDR_FUNC)
#define xdr_tbs_dbid_t (TBS_XDR_FUNC(tbs_dbid_t) xdr_u_long)
#endif /* !TBS_RPC_DECLS_ONLY && TBS_XDR_FUNC */
/****************************************************************************
* xdr_tbs_ftype_t
* === SUMMARY LINE ===
* IN *xdrs
* IN *objp
*/
EZ_XDR_ROUTINE(tbs_ftype_t);
#if !defined(TBS_RPC_DECLS_ONLY) && defined(TBS_XDR_FUNC)
#define xdr_tbs_ftype_t (TBS_XDR_FUNC(tbs_ftype_t) xdr_u_long)
#endif /* !TBS_RPC_DECLS_ONLY && TBS_XDR_FUNC */
/****************************************************************************
* xdr_tbs_fmode_t
* === SUMMARY LINE ===
* IN *xdrs
* IN *objp
*/
EZ_XDR_ROUTINE(tbs_fmode_t);
#if !defined(TBS_RPC_DECLS_ONLY) && defined(TBS_XDR_FUNC)
#define xdr_tbs_fmode_t (TBS_XDR_FUNC(tbs_fmode_t) xdr_u_long)
#endif /* !TBS_RPC_DECLS_ONLY && TBS_XDR_FUNC */
/****************************************************************************
* xdr_tbs_fstat_db_t
* === SUMMARY LINE ===
* IN *xdrs
* IN *objp
*/
EZ_XDR_ROUTINE(tbs_fstat_db_t);
/****************************************************************************
* xdr_vob_mtype_t
* === SUMMARY LINE ===
* IN *xdrs
* IN *objp
*/
EZ_XDR_ROUTINE(vob_mtype_t);
#if !defined(TBS_RPC_DECLS_ONLY) && defined(TBS_XDR_FUNC)
#define xdr_vob_mtype_t (TBS_XDR_FUNC(vob_mtype_t) xdr_enum)
#endif /* !TBS_RPC_DECLS_ONLY && TBS_XDR_FUNC */
#define xdr_xid_t xdr_u_long
#if defined(ATRIA_LP64)
#define xdr_u_long atria_xdr_u_long
#define xdr_long atria_xdr_long
extern bool_t atria_xdr_u_long(XDR *, u_long * EZ_XDR_ARGDECL);
extern bool_t atria_xdr_long(XDR *, long * EZ_XDR_ARGDECL);
#endif /* defined(ATRIA_LP64) */
#endif /* !defined(_TBS_RPC_KERNEL_H_) */
/* $Id: 8c6140c6.9c1f11dd.9a62.00:01:83:29:c0:fc $ */