xref: /nrf52832-nimble/rt-thread/components/dfs/filesystems/nfs/rpc/types.h (revision 104654410c56c573564690304ae786df310c91fc)
1 /*
2  * Copyright (c) 2006-2018, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  */
9 /*
10  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
11  * unrestricted use provided that this legend is included on all tape
12  * media and as a part of the software program in whole or part.  Users
13  * may copy or modify Sun RPC without charge, but are not authorized
14  * to license or distribute it to anyone else except as part of a product or
15  * program developed by the user.
16  *
17  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
18  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
19  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
20  *
21  * Sun RPC is provided with no support and without any obligation on the
22  * part of Sun Microsystems, Inc. to assist in its use, correction,
23  * modification or enhancement.
24  *
25  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
26  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
27  * OR ANY PART THEREOF.
28  *
29  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
30  * or profits or other special, indirect and consequential damages, even if
31  * Sun has been advised of the possibility of such damages.
32  *
33  * Sun Microsystems, Inc.
34  * 2550 Garcia Avenue
35  * Mountain View, California  94043
36  */
37 /* fixincludes should not add extern "C" to this file */
38 /*
39  * Rpc additions to <sys/types.h>
40  */
41 #ifndef _RPC_TYPES_H
42 #define _RPC_TYPES_H 1
43 
44 #include <rtthread.h>
45 #include <lwip/netdb.h>
46 #include <lwip/sockets.h>
47 
48 #include <string.h>
49 #include <stdint.h>
50 
51 #ifndef RT_USING_MINILIBC
52 typedef unsigned int u_int;
53 typedef unsigned char u_char;
54 typedef unsigned long u_long;
55 #else
56 #include <sys/types.h>
57 #include <stdint.h>
58 #endif
59 
60 typedef long long   int64_t;
61 typedef unsigned long long uint64_t;
62 
63 typedef int bool_t;
64 typedef int enum_t;
65 
66 #ifndef RT_USING_NEWLIB
67 typedef unsigned long dev_t;
68 #endif
69 
70 #if !defined(RT_USING_NEWLIB) && !defined(RT_USING_MINILIBC)
71 typedef rt_int32_t  ssize_t;
72 #endif
73 
74 /* This needs to be changed to uint32_t in the future */
75 typedef unsigned long rpcprog_t;
76 typedef unsigned long rpcvers_t;
77 typedef unsigned long rpcproc_t;
78 typedef unsigned long rpcprot_t;
79 typedef unsigned long rpcport_t;
80 
81 #define        __dontcare__    -1
82 
83 #ifndef FALSE
84 # define  FALSE   (0)
85 #endif
86 
87 #ifndef TRUE
88 # define  TRUE    (1)
89 #endif
90 
91 #ifndef MAXHOSTNAMELEN
92 #define MAXHOSTNAMELEN  64
93 #endif
94 
95 #endif /* rpc/types.h */
96