sparc: Fix sparv9 multiarch build
[glibc.git] / sunrpc / rpc / types.h
blobbeded5255595513cf0bd8b5e69a3a4e3ba630343
1 /*
2 * Copyright (c) 2010, Oracle America, Inc.
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions are
5 * met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above
10 * copyright notice, this list of conditions and the following
11 * disclaimer in the documentation and/or other materials
12 * provided with the distribution.
13 * * Neither the name of the "Oracle America, 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.
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
20 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
24 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 /* fixincludes should not add extern "C" to this file */
32 * Rpc additions to <sys/types.h>
34 #ifndef _RPC_TYPES_H
35 #define _RPC_TYPES_H 1
37 typedef int bool_t;
38 typedef int enum_t;
39 /* This needs to be changed to uint32_t in the future */
40 typedef unsigned long rpcprog_t;
41 typedef unsigned long rpcvers_t;
42 typedef unsigned long rpcproc_t;
43 typedef unsigned long rpcprot_t;
44 typedef unsigned long rpcport_t;
46 #define __dontcare__ -1
48 #ifndef FALSE
49 # define FALSE (0)
50 #endif
52 #ifndef TRUE
53 # define TRUE (1)
54 #endif
56 #ifndef NULL
57 # define NULL 0
58 #endif
60 #include <stdlib.h> /* For malloc decl. */
61 #define mem_alloc(bsize) malloc(bsize)
63 * XXX: This must not use the second argument, or code in xdr_array.c needs
64 * to be modified.
66 #define mem_free(ptr, bsize) free(ptr)
68 #ifndef makedev /* ie, we haven't already included it */
69 #include <sys/types.h>
70 #endif
72 #if defined __APPLE_CC__ || defined __FreeBSD__
73 # define __u_char_defined
74 # define __daddr_t_defined
75 #endif
77 #ifndef __u_char_defined
78 typedef __u_char u_char;
79 typedef __u_short u_short;
80 typedef __u_int u_int;
81 typedef __u_long u_long;
82 typedef __quad_t quad_t;
83 typedef __u_quad_t u_quad_t;
84 typedef __fsid_t fsid_t;
85 # define __u_char_defined
86 #endif
87 #ifndef __daddr_t_defined
88 typedef __daddr_t daddr_t;
89 typedef __caddr_t caddr_t;
90 # define __daddr_t_defined
91 #endif
93 #include <sys/time.h>
94 #include <sys/param.h>
96 #include <netinet/in.h>
98 #ifndef INADDR_LOOPBACK
99 #define INADDR_LOOPBACK (u_long)0x7F000001
100 #endif
101 #ifndef MAXHOSTNAMELEN
102 #define MAXHOSTNAMELEN 64
103 #endif
105 #endif /* rpc/types.h */