AndroidConfig.h revision ec219a2ee73dba139e31105f8f57ee5ffbaaa432
1/* 2 * Copyright 2005 The Android Open Source Project 3 * 4 * Android config -- "target_linux-x86". Used for x86 linux target devices. 5 */ 6#ifndef _ANDROID_CONFIG_H 7#define _ANDROID_CONFIG_H 8 9/* 10 * =========================================================================== 11 * !!! IMPORTANT !!! 12 * =========================================================================== 13 * 14 * This file is included by ALL C/C++ source files. Don't put anything in 15 * here unless you are absolutely certain it can't go anywhere else. 16 * 17 * Any C++ stuff must be wrapped with "#ifdef __cplusplus". Do not use "//" 18 * comments. 19 */ 20 21/* 22 * Threading model. Choose one: 23 * 24 * HAVE_PTHREADS - use the pthreads library. 25 * HAVE_WIN32_THREADS - use Win32 thread primitives. 26 * -- combine HAVE_CREATETHREAD, HAVE_CREATEMUTEX, and HAVE__BEGINTHREADEX 27 */ 28#define HAVE_PTHREADS 29 30/* 31 * Do we have the futex syscall? 32 */ 33 34#define HAVE_FUTEX 35 36/* 37 * Define if we already have the futex wrapper functions defined. Yes if 38 * compiling against bionic. 39 */ 40#define HAVE_FUTEX_WRAPPERS 1 41 42/* 43 * Process creation model. Choose one: 44 * 45 * HAVE_FORKEXEC - use fork() and exec() 46 * HAVE_WIN32_PROC - use CreateProcess() 47 */ 48#define HAVE_FORKEXEC 49 50/* 51 * Process out-of-memory adjustment. Set if running on Linux, 52 * where we can write to /proc/<pid>/oom_adj to modify the out-of-memory 53 * badness adjustment. 54 */ 55#define HAVE_OOM_ADJ 56 57/* 58 * IPC model. Choose one: 59 * 60 * HAVE_SYSV_IPC - use the classic SysV IPC mechanisms (semget, shmget). 61 * HAVE_MACOSX_IPC - use Macintosh IPC mechanisms (sem_open, mmap). 62 * HAVE_WIN32_IPC - use Win32 IPC (CreateSemaphore, CreateFileMapping). 63 * HAVE_ANDROID_IPC - use Android versions (?, mmap). 64 */ 65#define HAVE_ANDROID_IPC 1 66 67/* 68 * Memory-mapping model. Choose one: 69 * 70 * HAVE_POSIX_FILEMAP - use the Posix sys/mmap.h 71 * HAVE_WIN32_FILEMAP - use Win32 filemaps 72 */ 73#define HAVE_POSIX_FILEMAP 1 74 75/* 76 * Define this if you have <termio.h> 77 */ 78#define HAVE_TERMIO_H 1 79 80/* 81 * Define this if you have <sys/sendfile.h> 82 */ 83#define HAVE_SYS_SENDFILE_H 1 84 85/* 86 * Define this if you build against have Microsoft C runtime (MSVCRT.DLL) 87 */ 88/* #define HAVE_MS_C_RUNTIME */ 89 90/* 91 * Define this if you have sys/uio.h 92 */ 93#define HAVE_SYS_UIO_H 1 94 95/* 96 * Define this if your platforms implements symbolic links 97 * in its filesystems 98 */ 99#define HAVE_SYMLINKS 1 100 101/* 102 * Define this if we have localtime_r(). 103 */ 104/* #define HAVE_LOCALTIME_R */ 105 106/* 107 * Define this if we have gethostbyname_r(). 108 */ 109/* #define HAVE_GETHOSTBYNAME_R */ 110 111/* 112 * Define this if we have ioctl(). 113 */ 114#define HAVE_IOCTL 115 116/* 117 * Define this if we want to use WinSock. 118 */ 119/* #define HAVE_WINSOCK */ 120 121/* 122 * Define this if have clock_gettime() and friends 123 * 124 */ 125#define HAVE_POSIX_CLOCKS 126 127/* 128 * Define this if we have pthread_cond_timedwait_monotonic() and 129 * clock_gettime(CLOCK_MONOTONIC). 130 */ 131#define HAVE_TIMEDWAIT_MONOTONIC 132 133/* 134 * Define this if we have linux style epoll() 135 */ 136#define HAVE_EPOLL 137 138/* 139 * Endianness of the target machine. Choose one: 140 * 141 * HAVE_ENDIAN_H -- have endian.h header we can include. 142 * HAVE_LITTLE_ENDIAN -- we are little endian. 143 * HAVE_BIG_ENDIAN -- we are big endian. 144 */ 145#define HAVE_ENDIAN_H 146#define HAVE_LITTLE_ENDIAN 147 148/* 149 * We need to choose between 32-bit and 64-bit off_t. All of our code should 150 * agree on the same size. For desktop systems, use 64-bit values, 151 * because some of our libraries (e.g. wxWidgets) expect to be built that way. 152 */ 153/* 154 * #define _FILE_OFFSET_BITS 64 155 * #define _LARGEFILE_SOURCE 1 156 */ 157 158/* 159 * Defined if we have the backtrace() call for retrieving a stack trace. 160 * Needed for CallStack to operate; if not defined, CallStack is 161 * non-functional. 162 */ 163#define HAVE_BACKTRACE 0 164 165/* 166 * Defined if we have the dladdr() call for retrieving the symbol associated 167 * with a memory address. If not defined, stack crawls will not have symbolic 168 * information. 169 */ 170#define HAVE_DLADDR 0 171 172/* 173 * Defined if we have the cxxabi.h header for demangling C++ symbols. If 174 * not defined, stack crawls will be displayed with raw mangled symbols 175 */ 176#define HAVE_CXXABI 0 177 178/* 179 * Defined if we have the gettid() system call. 180 */ 181#define HAVE_GETTID 182 183/* 184 * Defined if we have the sched_setscheduler() call 185 */ 186#define HAVE_SCHED_SETSCHEDULER 187 188/* 189 * Add any extra platform-specific defines here. 190 */ 191#ifndef __linux__ 192#define __linux__ 193#endif 194 195/* 196 * Define if we have <malloc.h> header 197 */ 198#define HAVE_MALLOC_H 199 200/* 201 * Define if we're running on *our* linux on device or emulator. 202 */ 203#define HAVE_ANDROID_OS 1 204 205/* 206 * Define if we have Linux-style non-filesystem Unix Domain Sockets 207 */ 208#define HAVE_LINUX_LOCAL_SOCKET_NAMESPACE 1 209 210/* 211 * Define if we have Linux's inotify in <sys/inotify.h>. 212 */ 213#define HAVE_INOTIFY 1 214 215/* 216 * Define if we have madvise() in <sys/mman.h> 217 */ 218#define HAVE_MADVISE 1 219 220/* 221 * Define if we have Linux's dbus 222 */ 223#define HAVE_DBUS 1 224 225/* 226 * Define if tm struct has tm_gmtoff field 227 */ 228#define HAVE_TM_GMTOFF 1 229 230/* 231 * Define if dirent struct has d_type field 232 */ 233#define HAVE_DIRENT_D_TYPE 1 234 235/* 236 * Define if libc includes Android system properties implementation. 237 */ 238#define HAVE_LIBC_SYSTEM_PROPERTIES 1 239 240/* 241 * Define if system provides a system property server (should be 242 * mutually exclusive with HAVE_LIBC_SYSTEM_PROPERTIES). 243 */ 244/* #define HAVE_SYSTEM_PROPERTY_SERVER */ 245 246/* 247 * What CPU architecture does this platform use? 248 */ 249#define ARCH_X86 250 251/* 252 * sprintf() format string for shared library naming. 253 */ 254#define OS_SHARED_LIB_FORMAT_STR "lib%s.so" 255 256/* 257 * Do we have __memcmp16()? 258 */ 259/* #define HAVE__MEMCMP16 1 */ 260 261/* 262 * type for the third argument to mincore(). 263 */ 264#define MINCORE_POINTER_TYPE unsigned char * 265 266/* 267 * Do we have the sigaction flag SA_NOCLDWAIT? 268 */ 269#define HAVE_SA_NOCLDWAIT 270 271/* 272 * The default path separator for the platform 273 */ 274#define OS_PATH_SEPARATOR '/' 275 276/* 277 * Is the filesystem case sensitive? 278 */ 279#define OS_CASE_SENSITIVE 280 281/* 282 * Define if <sys/socket.h> exists. 283 */ 284#define HAVE_SYS_SOCKET_H 1 285 286/* 287 * Define if the strlcpy() function exists on the system. 288 */ 289#define HAVE_STRLCPY 1 290 291/* 292 * Define if the open_memstream() function exists on the system. 293 */ 294/* #define HAVE_OPEN_MEMSTREAM 1 */ 295 296/* 297 * Define if the BSD funopen() function exists on the system. 298 */ 299#define HAVE_FUNOPEN 1 300 301/* 302 * Define if prctl() exists 303 */ 304#define HAVE_PRCTL 1 305 306/* 307 * Whether or not _Unwind_Context is defined as a struct. 308 */ 309#define HAVE_UNWIND_CONTEXT_STRUCT 310 311/* 312 * Define if <stdint.h> exists. 313 */ 314#define HAVE_STDINT_H 1 315 316/* 317 * Define if <stdbool.h> exists. 318 */ 319#define HAVE_STDBOOL_H 1 320 321/* 322 * Define if <sched.h> exists. 323 */ 324#define HAVE_SCHED_H 1 325 326#endif /* _ANDROID_CONFIG_H */ 327