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