2
* Copyright (C) 2005 The Android Open Source Project
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
8
* http://www.apache.org/licenses/LICENSE-2.0
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.
18
* Android config -- "android-arm". Used for ARM device builds.
20
#ifndef _ANDROID_CONFIG_H
21
#define _ANDROID_CONFIG_H
24
* ===========================================================================
26
* ===========================================================================
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.
31
* Any C++ stuff must be wrapped with "#ifdef __cplusplus". Do not use "//"
36
* Threading model. Choose one:
38
* HAVE_PTHREADS - use the pthreads library.
39
* HAVE_WIN32_THREADS - use Win32 thread primitives.
40
* -- combine HAVE_CREATETHREAD, HAVE_CREATEMUTEX, and HAVE__BEGINTHREADEX
45
* Do we have pthread_setname_np()?
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.)
50
#define HAVE_ANDROID_PTHREAD_SETNAME_NP
53
* Do we have the futex syscall?
58
* Define if we already have the futex wrapper functions defined. Yes if
59
* compiling against bionic.
61
#define HAVE_FUTEX_WRAPPERS 1
64
* Process creation model. Choose one:
66
* HAVE_FORKEXEC - use fork() and exec()
67
* HAVE_WIN32_PROC - use CreateProcess()
72
* Process out-of-memory adjustment. Set if running on Linux,
73
* where we can write to /proc/<pid>/oom_adj to modify the out-of-memory
79
* IPC model. Choose one:
81
* HAVE_SYSV_IPC - use the classic SysV IPC mechanisms (semget, shmget).
82
* HAVE_MACOSX_IPC - use Macintosh IPC mechanisms (sem_open, mmap).
83
* HAVE_WIN32_IPC - use Win32 IPC (CreateSemaphore, CreateFileMapping).
84
* HAVE_ANDROID_IPC - use Android versions (?, mmap).
86
#define HAVE_ANDROID_IPC
89
* Memory-mapping model. Choose one:
91
* HAVE_POSIX_FILEMAP - use the Posix sys/mmap.h
92
* HAVE_WIN32_FILEMAP - use Win32 filemaps
94
#define HAVE_POSIX_FILEMAP
97
* Define this if you have <termio.h>
99
#define HAVE_TERMIO_H 1
102
* Define this if you have <sys/sendfile.h>
104
#define HAVE_SYS_SENDFILE_H 1
107
* Define this if you build against MSVCRT.DLL
109
/* #define HAVE_MS_C_RUNTIME */
112
* Define this if you have sys/uio.h
114
#define HAVE_SYS_UIO_H 1
117
* Define this if your platforms implements symbolic links
120
#define HAVE_SYMLINKS
123
* Define this if we have localtime_r().
125
/* #define HAVE_LOCALTIME_R 1 */
128
* Define this if we have gethostbyname_r().
130
/* #define HAVE_GETHOSTBYNAME_R */
133
* Define this if we have ioctl().
138
* Define this if we want to use WinSock.
140
/* #define HAVE_WINSOCK */
143
* Define this if have clock_gettime() and friends
145
#define HAVE_POSIX_CLOCKS
148
* Define this if we have pthread_cond_timedwait_monotonic() and
149
* clock_gettime(CLOCK_MONOTONIC).
151
#define HAVE_TIMEDWAIT_MONOTONIC
154
* Define this if we have linux style epoll()
159
* Endianness of the target machine. Choose one:
161
* HAVE_ENDIAN_H -- have endian.h header we can include.
162
* HAVE_LITTLE_ENDIAN -- we are little endian.
163
* HAVE_BIG_ENDIAN -- we are big endian.
165
#define HAVE_ENDIAN_H
166
#define HAVE_LITTLE_ENDIAN
169
* We need to choose between 32-bit and 64-bit off_t. All of our code should
170
* agree on the same size. For desktop systems, use 64-bit values,
171
* because some of our libraries (e.g. wxWidgets) expect to be built that way.
173
/* #define _FILE_OFFSET_BITS 64 */
174
/* #define _LARGEFILE_SOURCE 1 */
177
* Define if platform has off64_t (and lseek64 and other xxx64 functions)
182
* Defined if we have the backtrace() call for retrieving a stack trace.
183
* Needed for CallStack to operate; if not defined, CallStack is
186
#define HAVE_BACKTRACE 0
189
* Defined if we have the dladdr() call for retrieving the symbol associated
190
* with a memory address. If not defined, stack crawls will not have symbolic
193
#define HAVE_DLADDR 1
196
* Defined if we have the cxxabi.h header for demangling C++ symbols. If
197
* not defined, stack crawls will be displayed with raw mangled symbols
199
#define HAVE_CXXABI 0
202
* Defined if we have the gettid() system call.
207
* Defined if we have the sched_setscheduler() call
209
#define HAVE_SCHED_SETSCHEDULER
212
* Add any extra platform-specific defines here.
219
* Define if we have <malloc.h> header
221
#define HAVE_MALLOC_H
224
* Define if we're running on *our* linux on device or emulator.
226
#define HAVE_ANDROID_OS 1
229
* Define if we have Linux-style non-filesystem Unix Domain Sockets
231
#define HAVE_LINUX_LOCAL_SOCKET_NAMESPACE 1
234
* Define if we have Linux's inotify in <sys/inotify.h>.
236
#define HAVE_INOTIFY 1
239
* Define if we have madvise() in <sys/mman.h>
241
#define HAVE_MADVISE 1
244
* Define if tm struct has tm_gmtoff field
246
#define HAVE_TM_GMTOFF 1
249
* Define if dirent struct has d_type field
251
#define HAVE_DIRENT_D_TYPE 1
254
* Define if libc includes Android system properties implementation.
256
#define HAVE_LIBC_SYSTEM_PROPERTIES 1
259
* Define if system provides a system property server (should be
260
* mutually exclusive with HAVE_LIBC_SYSTEM_PROPERTIES).
262
/* #define HAVE_SYSTEM_PROPERTY_SERVER */
265
* What CPU architecture does this platform use?
270
* Define if the size of enums is as short as possible,
272
/* #define HAVE_SHORT_ENUMS */
275
* sprintf() format string for shared library naming.
277
#define OS_SHARED_LIB_FORMAT_STR "lib%s.so"
280
* Do we have __memcmp16()?
282
#define HAVE__MEMCMP16 1
285
* type for the third argument to mincore().
287
#define MINCORE_POINTER_TYPE unsigned char *
290
* Do we have the sigaction flag SA_NOCLDWAIT?
292
#define HAVE_SA_NOCLDWAIT
295
* The default path separator for the platform
297
#define OS_PATH_SEPARATOR '/'
300
* Is the filesystem case sensitive?
302
#define OS_CASE_SENSITIVE
305
* Define if <sys/socket.h> exists.
307
#define HAVE_SYS_SOCKET_H 1
310
* Define if the strlcpy() function exists on the system.
312
#define HAVE_STRLCPY 1
315
* Define if the open_memstream() function exists on the system.
317
/* #define HAVE_OPEN_MEMSTREAM 1 */
320
* Define if the BSD funopen() function exists on the system.
322
#define HAVE_FUNOPEN 1
325
* Define if prctl() exists
330
* Define if writev() exists
332
#define HAVE_WRITEV 1
335
* Define if <stdint.h> exists.
337
#define HAVE_STDINT_H 1
340
* Define if <stdbool.h> exists.
342
#define HAVE_STDBOOL_H 1
345
* Define if <sched.h> exists.
347
#define HAVE_SCHED_H 1
350
* Define if pread() exists
355
* Define if we have st_mtim in struct stat
357
#define HAVE_STAT_ST_MTIM 1
360
* Define if printf() supports %zd for size_t arguments
362
#define HAVE_PRINTF_ZD 1
365
* Define to 1 if <stdlib.h> provides qsort_r() with a BSD style function prototype.
367
#define HAVE_BSD_QSORT_R 0
370
* Define to 1 if <stdlib.h> provides qsort_r() with a GNU style function prototype.
372
#define HAVE_GNU_QSORT_R 0
374
#endif /* _ANDROID_CONFIG_H */