Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / native_client / src / trusted / service_runtime / include / machine / _types.h
1 /*
2  * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be
4  * found in the LICENSE file.
5  */
6
7 /*
8  * NaCl kernel / service run-time system call ABI.
9  * This file defines nacl target machine dependent types.
10  */
11
12 #ifndef NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_INCLUDE_MACHINE__TYPES_H_
13 #define NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_INCLUDE_MACHINE__TYPES_H_
14
15 #ifdef __native_client__
16 # include <stdint.h>
17 # include <machine/_default_types.h>
18 #else
19 # include "native_client/src/include/portability.h"
20 #endif
21
22 #define __need_size_t
23 #include <stddef.h>
24
25 #ifndef NULL
26 #define NULL 0
27 #endif
28
29 #ifndef nacl_abi___dev_t_defined
30 #define nacl_abi___dev_t_defined
31 typedef int64_t nacl_abi___dev_t;
32 #ifndef __native_client__
33 typedef nacl_abi___dev_t nacl_abi_dev_t;
34 #endif
35 #endif
36
37 #ifndef nacl_abi___ino_t_defined
38 #define nacl_abi___ino_t_defined
39 typedef uint64_t nacl_abi___ino_t;
40 #ifndef __native_client__
41 typedef nacl_abi___ino_t nacl_abi_ino_t;
42 #endif
43 #endif
44
45 #ifndef nacl_abi___mode_t_defined
46 #define nacl_abi___mode_t_defined
47 typedef uint32_t nacl_abi___mode_t;
48 #ifndef __native_client__
49 typedef nacl_abi___mode_t nacl_abi_mode_t;
50 #endif
51 #endif
52
53 #ifndef nacl_abi___nlink_t_defined
54 #define nacl_abi___nlink_t_defined
55 typedef uint32_t nacl_abi___nlink_t;
56 #ifndef __native_client__
57 typedef nacl_abi___nlink_t nacl_abi_nlink_t;
58 #endif
59 #endif
60
61 #ifndef nacl_abi___uid_t_defined
62 #define nacl_abi___uid_t_defined
63 typedef uint32_t nacl_abi___uid_t;
64 #ifndef __native_client__
65 typedef nacl_abi___uid_t nacl_abi_uid_t;
66 #endif
67 #endif
68
69 #ifndef nacl_abi___gid_t_defined
70 #define nacl_abi___gid_t_defined
71 typedef uint32_t nacl_abi___gid_t;
72 #ifndef __native_client__
73 typedef nacl_abi___gid_t nacl_abi_gid_t;
74 #endif
75 #endif
76
77 #ifndef nacl_abi___off_t_defined
78 #define nacl_abi___off_t_defined
79 typedef int64_t nacl_abi__off_t;
80 #ifndef __native_client__
81 typedef nacl_abi__off_t nacl_abi_off_t;
82 #endif
83 #endif
84
85 #ifndef nacl_abi___off64_t_defined
86 #define nacl_abi___off64_t_defined
87 typedef int64_t nacl_abi__off64_t;
88 #ifndef __native_client__
89 typedef nacl_abi__off64_t nacl_abi_off64_t;
90 #endif
91 #endif
92
93
94 #if !(defined(__GLIBC__) && defined(__native_client__))
95
96 #ifndef nacl_abi___blksize_t_defined
97 #define nacl_abi___blksize_t_defined
98 typedef int32_t nacl_abi___blksize_t;
99 typedef nacl_abi___blksize_t nacl_abi_blksize_t;
100 #endif
101
102 #endif
103
104
105 #ifndef nacl_abi___blkcnt_t_defined
106 #define nacl_abi___blkcnt_t_defined
107 typedef int32_t nacl_abi___blkcnt_t;
108 typedef nacl_abi___blkcnt_t nacl_abi_blkcnt_t;
109 #endif
110
111 #ifndef nacl_abi___time_t_defined
112 #define nacl_abi___time_t_defined
113 typedef int64_t       nacl_abi___time_t;
114 typedef nacl_abi___time_t nacl_abi_time_t;
115 #endif
116
117 #ifndef nacl_abi___timespec_defined
118 #define nacl_abi___timespec_defined
119 struct nacl_abi_timespec {
120   nacl_abi_time_t tv_sec;
121 #ifdef __native_client__
122   long int        tv_nsec;
123 #else
124   int32_t         tv_nsec;
125 #endif
126 };
127 #endif
128
129 #endif