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