1/*
2 * Copyright (C) 2013 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 * Android config -- "android-aarch64".  Used for ARM aarch64 device builds.
19 */
20#ifndef _ANDROID_CONFIG_H
21#define _ANDROID_CONFIG_H
22
23/*
24 * ===========================================================================
25 *                              !!! IMPORTANT !!!
26 * ===========================================================================
27 *
28 * This file is included by ALL C/C++ source files.  Don't put anything in
29 * here unless you are absolutely certain it can't go anywhere else.
30 *
31 * Any C++ stuff must be wrapped with "#ifdef __cplusplus".  Do not use "//"
32 * comments.
33 */
34
35/*
36 * Threading model.  Choose one:
37 *
38 * HAVE_PTHREADS - use the pthreads library.
39 * HAVE_WIN32_THREADS - use Win32 thread primitives.
40 *  -- combine HAVE_CREATETHREAD, HAVE_CREATEMUTEX, and HAVE__BEGINTHREADEX
41 */
42#define HAVE_PTHREADS
43
44/*
45 * Do we have pthread_setname_np()?
46 *
47 * (HAVE_PTHREAD_SETNAME_NP is used by WebKit to enable a function with
48 * the same name but different parameters, so we can't use that here.)
49 */
50#define HAVE_ANDROID_PTHREAD_SETNAME_NP
51
52/*
53 * Do we have the futex syscall?
54 */
55#define HAVE_FUTEX
56
57/*
58 * Process creation model.  Choose one:
59 *
60 * HAVE_FORKEXEC - use fork() and exec()
61 * HAVE_WIN32_PROC - use CreateProcess()
62 */
63#define HAVE_FORKEXEC
64
65/*
66 * Process out-of-memory adjustment.  Set if running on Linux,
67 * where we can write to /proc/<pid>/oom_adj to modify the out-of-memory
68 * badness adjustment.
69 */
70#define HAVE_OOM_ADJ
71
72/*
73 * IPC model.  Choose one:
74 *
75 * HAVE_SYSV_IPC - use the classic SysV IPC mechanisms (semget, shmget).
76 * HAVE_MACOSX_IPC - use Macintosh IPC mechanisms (sem_open, mmap).
77 * HAVE_WIN32_IPC - use Win32 IPC (CreateSemaphore, CreateFileMapping).
78 * HAVE_ANDROID_IPC - use Android versions (?, mmap).
79 */
80#define HAVE_ANDROID_IPC
81
82/*
83 * Memory-mapping model. Choose one:
84 *
85 * HAVE_POSIX_FILEMAP - use the Posix sys/mmap.h
86 * HAVE_WIN32_FILEMAP - use Win32 filemaps
87 */
88#define  HAVE_POSIX_FILEMAP
89
90/*
91 * Define this if you have <termio.h>
92 */
93#define  HAVE_TERMIO_H 1
94
95/*
96 * Define this if you have <sys/sendfile.h>
97 */
98#define  HAVE_SYS_SENDFILE_H 1
99
100/*
101 * Define this if you build against MSVCRT.DLL
102 */
103/* #define HAVE_MS_C_RUNTIME */
104
105/*
106 * Define this if you have sys/uio.h
107 */
108#define  HAVE_SYS_UIO_H 1
109
110/*
111 * Define this if your platforms implements symbolic links
112 * in its filesystems
113 */
114#define HAVE_SYMLINKS
115
116/*
117 * Define this if we have localtime_r().
118 */
119/* #define HAVE_LOCALTIME_R 1 */
120
121/*
122 * Define this if we have gethostbyname_r().
123 */
124/* #define HAVE_GETHOSTBYNAME_R */
125
126/*
127 * Define this if we have ioctl().
128 */
129#define HAVE_IOCTL
130
131/*
132 * Define this if we want to use WinSock.
133 */
134/* #define HAVE_WINSOCK */
135
136/*
137 * Define this if have clock_gettime() and friends
138 */
139#define HAVE_POSIX_CLOCKS
140
141/*
142 * Define this if we have linux style epoll()
143 */
144#define HAVE_EPOLL
145
146/*
147 * Endianness of the target machine.  Choose one:
148 *
149 * HAVE_ENDIAN_H -- have endian.h header we can include.
150 * HAVE_LITTLE_ENDIAN -- we are little endian.
151 * HAVE_BIG_ENDIAN -- we are big endian.
152 */
153#define HAVE_ENDIAN_H
154#define HAVE_LITTLE_ENDIAN
155
156#define _FILE_OFFSET_BITS 64
157/* #define _LARGEFILE_SOURCE 1 */
158
159/*
160 * Define if platform has off64_t (and lseek64 and other xxx64 functions)
161 */
162#define HAVE_OFF64_T
163
164/*
165 * Defined if we have the backtrace() call for retrieving a stack trace.
166 * Needed for CallStack to operate; if not defined, CallStack is
167 * non-functional.
168 */
169#define HAVE_BACKTRACE 0
170
171/*
172 * Defined if we have the cxxabi.h header for demangling C++ symbols.  If
173 * not defined, stack crawls will be displayed with raw mangled symbols
174 */
175#define HAVE_CXXABI 0
176
177/*
178 * Defined if we have the gettid() system call.
179 */
180#define HAVE_GETTID
181
182/*
183 * Defined if we have the sched_setscheduler() call
184 */
185#define HAVE_SCHED_SETSCHEDULER
186
187/*
188 * Add any extra platform-specific defines here.
189 */
190#ifndef __linux__
191#define __linux__
192#endif
193
194/*
195 * Define if we have <malloc.h> header
196 */
197#define HAVE_MALLOC_H
198
199/*
200 * Define if we're running on *our* linux on device or emulator.
201 */
202#define HAVE_ANDROID_OS 1
203
204/*
205 * Define if we have Linux-style non-filesystem Unix Domain Sockets
206 */
207#define HAVE_LINUX_LOCAL_SOCKET_NAMESPACE 1
208
209/*
210 * Define if we have Linux's inotify in <sys/inotify.h>.
211 */
212#define HAVE_INOTIFY 1
213
214/*
215 * Define if we have madvise() in <sys/mman.h>
216 */
217#define HAVE_MADVISE 1
218
219/*
220 * Define if tm struct has tm_gmtoff field
221 */
222#define HAVE_TM_GMTOFF 1
223
224/*
225 * Define if dirent struct has d_type field
226 */
227#define HAVE_DIRENT_D_TYPE 1
228
229/*
230 * Define if libc includes Android system properties implementation.
231 */
232#define HAVE_LIBC_SYSTEM_PROPERTIES 1
233
234/*
235 * Define if system provides a system property server (should be
236 * mutually exclusive with HAVE_LIBC_SYSTEM_PROPERTIES).
237 */
238/* #define HAVE_SYSTEM_PROPERTY_SERVER */
239
240/*
241 * What CPU architecture does this platform use?
242 */
243#define ARCH_AARCH64
244
245/*
246 * Define if the size of enums is as short as possible,
247 */
248/* #define HAVE_SHORT_ENUMS */
249
250/*
251 * sprintf() format string for shared library naming.
252 */
253#define OS_SHARED_LIB_FORMAT_STR    "lib%s.so"
254
255/*
256 * type for the third argument to mincore().
257 */
258#define MINCORE_POINTER_TYPE unsigned char *
259
260/*
261 * The default path separator for the platform
262 */
263#define OS_PATH_SEPARATOR '/'
264
265/*
266 * Is the filesystem case sensitive?
267 */
268#define OS_CASE_SENSITIVE
269
270/*
271 * Define if <sys/socket.h> exists.
272 */
273#define HAVE_SYS_SOCKET_H 1
274
275/*
276 * Define if the strlcpy() function exists on the system.
277 */
278#define HAVE_STRLCPY 1
279
280/*
281 * Define if the open_memstream() function exists on the system.
282 */
283/* #define HAVE_OPEN_MEMSTREAM 1 */
284
285/*
286 * Define if the BSD funopen() function exists on the system.
287 */
288#define HAVE_FUNOPEN 1
289
290/*
291 * Define if prctl() exists
292 */
293#define HAVE_PRCTL 1
294
295/*
296 * Define if writev() exists
297 */
298#define HAVE_WRITEV 1
299
300/*
301 * Define if <stdint.h> exists.
302 */
303#define HAVE_STDINT_H 1
304
305/*
306 * Define if <stdbool.h> exists.
307 */
308#define HAVE_STDBOOL_H 1
309
310/*
311 * Define if <sched.h> exists.
312 */
313#define HAVE_SCHED_H 1
314
315/*
316 * Define if pread() exists
317 */
318#define HAVE_PREAD 1
319
320/*
321 * Define if we have st_mtim in struct stat
322 */
323#define HAVE_STAT_ST_MTIM 1
324
325/*
326 * Define if printf() supports %zd for size_t arguments
327 */
328#define HAVE_PRINTF_ZD 1
329
330/*
331 * Define to 1 if <stdlib.h> provides qsort_r() with a BSD style function prototype.
332 */
333#define HAVE_BSD_QSORT_R 0
334
335/*
336 * Define to 1 if <stdlib.h> provides qsort_r() with a GNU style function prototype.
337 */
338#define HAVE_GNU_QSORT_R 0
339
340#endif /* _ANDROID_CONFIG_H */
341