1 | |
---|
2 | /* |
---|
3 | * Copyright (c) 2009, Sun Microsystems, Inc. |
---|
4 | * All rights reserved. |
---|
5 | * |
---|
6 | * Redistribution and use in source and binary forms, with or without |
---|
7 | * modification, are permitted provided that the following conditions are met: |
---|
8 | * - Redistributions of source code must retain the above copyright notice, |
---|
9 | * this list of conditions and the following disclaimer. |
---|
10 | * - Redistributions in binary form must reproduce the above copyright notice, |
---|
11 | * this list of conditions and the following disclaimer in the documentation |
---|
12 | * and/or other materials provided with the distribution. |
---|
13 | * - Neither the name of Sun Microsystems, Inc. nor the names of its |
---|
14 | * contributors may be used to endorse or promote products derived |
---|
15 | * from this software without specific prior written permission. |
---|
16 | * |
---|
17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
---|
18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
---|
20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
---|
21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
---|
22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
---|
23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
---|
24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
---|
25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
---|
26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
---|
27 | * POSSIBILITY OF SUCH DAMAGE. |
---|
28 | * |
---|
29 | * from: @(#)types.h 1.18 87/07/24 SMI |
---|
30 | * from: @(#)types.h 2.3 88/08/15 4.0 RPCSRC |
---|
31 | * $FreeBSD: src/include/rpc/types.h,v 1.10.6.1 2003/12/18 00:59:50 peter Exp $ |
---|
32 | * $NetBSD: types.h,v 1.13 2000/06/13 01:02:44 thorpej Exp $ |
---|
33 | */ |
---|
34 | |
---|
35 | /* |
---|
36 | * Rpc additions to <sys/types.h> |
---|
37 | */ |
---|
38 | #ifndef _RPC_TYPES_H |
---|
39 | #define _RPC_TYPES_H |
---|
40 | |
---|
41 | #include <stdint.h> |
---|
42 | #include <sys/types.h> |
---|
43 | |
---|
44 | #define __need_NULL |
---|
45 | #include <stddef.h> |
---|
46 | |
---|
47 | #ifdef __cplusplus |
---|
48 | extern "C" { |
---|
49 | #endif |
---|
50 | |
---|
51 | #if defined(___int64_t_defined) |
---|
52 | typedef u_int64_t u_quad_t; |
---|
53 | typedef int64_t quad_t; |
---|
54 | #endif /* ___int64_t_defined */ |
---|
55 | typedef int32_t bool_t; |
---|
56 | typedef int32_t enum_t; |
---|
57 | |
---|
58 | typedef u_int32_t rpcprog_t; |
---|
59 | typedef u_int32_t rpcvers_t; |
---|
60 | typedef u_int32_t rpcproc_t; |
---|
61 | typedef u_int32_t rpcprot_t; |
---|
62 | typedef u_int32_t rpcport_t; |
---|
63 | typedef int32_t rpc_inline_t; |
---|
64 | |
---|
65 | #define __dontcare__ -1 |
---|
66 | |
---|
67 | #ifndef FALSE |
---|
68 | # define FALSE 0 |
---|
69 | #endif |
---|
70 | #ifndef TRUE |
---|
71 | # define TRUE 1 |
---|
72 | #endif |
---|
73 | |
---|
74 | #ifndef mem_alloc |
---|
75 | #define mem_alloc(bsize) calloc(1, bsize) |
---|
76 | #endif |
---|
77 | #ifndef mem_free |
---|
78 | #define mem_free(ptr, bsize) free(ptr) |
---|
79 | #endif |
---|
80 | |
---|
81 | #ifdef __cplusplus |
---|
82 | } |
---|
83 | #endif |
---|
84 | |
---|
85 | #endif /* !_RPC_TYPES_H */ |
---|