AndroidConfig.h revision 57401dc849db11f38133796c01d982de0391318d
1/* 2 * Copyright (C) 2005 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 -- "FreeBSD". Used for desktop x86 FreeBSD. 19 */ 20#ifndef _ANDROID_CONFIG_H 21#define _ANDROID_CONFIG_H 22 23/* 24 * make sure we are building for FreeBSD 25 */ 26#ifndef OS_FREEBSD 27#define OS_FREEBSD 28#endif 29/* 30 * =========================================================================== 31 * !!! IMPORTANT !!! 32 * =========================================================================== 33 * 34 * This file is included by ALL C/C++ source files. Don't put anything in 35 * here unless you are absolutely certain it can't go anywhere else. 36 * 37 * Any C++ stuff must be wrapped with "#ifdef __cplusplus". Do not use "//" 38 * comments. 39 */ 40 41/* 42 * Threading model. Choose one: 43 * 44 * HAVE_PTHREADS - use the pthreads library. 45 * HAVE_WIN32_THREADS - use Win32 thread primitives. 46 * -- combine HAVE_CREATETHREAD, HAVE_CREATEMUTEX, and HAVE__BEGINTHREADEX 47 */ 48#define HAVE_PTHREADS 49 50/* 51 * Do we have the futex syscall? 52 */ 53/* #define HAVE_FUTEX */ 54 55/* 56 * Process creation model. Choose one: 57 * 58 * HAVE_FORKEXEC - use fork() and exec() 59 * HAVE_WIN32_PROC - use CreateProcess() 60 */ 61#define HAVE_FORKEXEC 62 63/* 64 * Process out-of-memory adjustment. Set if running on Linux, 65 * where we can write to /proc/<pid>/oom_adj to modify the out-of-memory 66 * badness adjustment. 67 */ 68/* #define HAVE_OOM_ADJ */ 69 70/* 71 * IPC model. Choose one: 72 * 73 * HAVE_SYSV_IPC - use the classic SysV IPC mechanisms (semget, shmget). 74 * HAVE_MACOSX_IPC - use Macintosh IPC mechanisms (sem_open, mmap). 75 * HAVE_WIN32_IPC - use Win32 IPC (CreateSemaphore, CreateFileMapping). 76 * HAVE_ANDROID_IPC - use Android versions (?, mmap). 77 */ 78#define HAVE_SYSV_IPC 79 80/* 81 * Memory-mapping model. Choose one: 82 * 83 * HAVE_POSIX_FILEMAP - use the Posix sys/mmap.h 84 * HAVE_WIN32_FILEMAP - use Win32 filemaps 85 */ 86#define HAVE_POSIX_FILEMAP 87 88/* 89 * Define this if you have <termio.h> 90 */ 91/* #define HAVE_TERMIO_H */ 92 93/* 94 * Define this if you build against MSVCRT.DLL 95 */ 96/* #define HAVE_MS_C_RUNTIME */ 97 98/* 99 * Define this if you have sys/uio.h 100 */ 101#define HAVE_SYS_UIO_H 102 103/* 104 * Define this if your platforms implements symbolic links 105 * in its filesystems 106 */ 107#define HAVE_SYMLINKS 108 109/* 110 * Define this if we have localtime_r(). 111 */ 112#define HAVE_LOCALTIME_R 113 114/* 115 * Define this if we have gethostbyname_r(). 116 */ 117/* #define HAVE_GETHOSTBYNAME_R */ 118 119/* 120 * Define this if we have ioctl(). 121 */ 122#define HAVE_IOCTL 123 124/* 125 * Define this if we want to use WinSock. 126 */ 127/* #define HAVE_WINSOCK */ 128 129/* 130 * Define this if have clock_gettime() and friends 131 * 132 * Desktop Linux has this in librt, but it's broken in goobuntu, yielding 133 * mildly or wildly inaccurate results. 134 */ 135#define HAVE_POSIX_CLOCKS 136 137/* 138 * Define this if we have pthread_cond_timedwait_monotonic() and 139 * clock_gettime(CLOCK_MONOTONIC). 140 */ 141/* #define HAVE_TIMEDWAIT_MONOTONIC */ 142 143/* 144 * Define this if we have linux style epoll() 145 */ 146/* #define HAVE_EPOLL */ 147 148/* 149 * Endianness of the target machine. Choose one: 150 * 151 * HAVE_ENDIAN_H -- have endian.h header we can include. 152 * HAVE_LITTLE_ENDIAN -- we are little endian. 153 * HAVE_BIG_ENDIAN -- we are big endian. 154 */ 155#define HAVE_ENDIAN_H 156#define HAVE_LITTLE_ENDIAN 157 158/* 159 * We need to choose between 32-bit and 64-bit off_t. All of our code should 160 * agree on the same size. For desktop systems, use 64-bit values, 161 * because some of our libraries (e.g. wxWidgets) expect to be built that way. 162 */ 163#define _FILE_OFFSET_BITS 64 164#define _LARGEFILE_SOURCE 1 165 166/* 167 * Defined if we have the backtrace() call for retrieving a stack trace. 168 * Needed for CallStack to operate; if not defined, CallStack is 169 * non-functional. 170 */ 171#define HAVE_BACKTRACE 0 172 173/* 174 * Defined if we have the dladdr() call for retrieving the symbol associated 175 * with a memory address. If not defined, stack crawls will not have symbolic 176 * information. 177 */ 178#define HAVE_DLADDR 1 179 180/* 181 * Defined if we have the cxxabi.h header for demangling C++ symbols. If 182 * not defined, stack crawls will be displayed with raw mangled symbols 183 */ 184#define HAVE_CXXABI 0 185 186/* 187 * Defined if we have the gettid() system call. 188 */ 189/* #define HAVE_GETTID */ 190 191/* 192 * Defined if we have the sched_setscheduler() call 193 */ 194#define HAVE_SCHED_SETSCHEDULER 195 196/* 197 * Add any extra platform-specific defines here. 198 */ 199 200/* 201 * Define if we have <malloc.h> header 202 */ 203#define HAVE_MALLOC_H 204 205/* 206 * Define if we have Linux-style non-filesystem Unix Domain Sockets 207 */ 208 209/* 210 * What CPU architecture does this platform use? 211 */ 212#define ARCH_X86 213 214 215/* 216 * Define if we have Linux's inotify in <sys/inotify.h>. 217 */ 218/*#define HAVE_INOTIFY 1*/ 219 220/* 221 * Define if we have madvise() in <sys/mman.h> 222 */ 223#define HAVE_MADVISE 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 */ 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 * sprintf() format string for shared library naming. 248 */ 249#define OS_SHARED_LIB_FORMAT_STR "lib%s.so" 250 251/* 252 * type for the third argument to mincore(). 253 */ 254#define MINCORE_POINTER_TYPE char * 255 256/* 257 * Do we have the sigaction flag SA_NOCLDWAIT? 258 */ 259#define HAVE_SA_NOCLDWAIT 260 261/* 262 * Define if we include <sys/mount.h> for statfs() 263 */ 264#define INCLUDE_SYS_MOUNT_FOR_STATFS 1 265 266/* 267 * The default path separator for the platform 268 */ 269#define OS_PATH_SEPARATOR '/' 270 271/* 272 * Is the filesystem case sensitive? 273 */ 274#define OS_CASE_SENSITIVE 275 276/* 277 * Define if <sys/socket.h> exists. 278 */ 279#define HAVE_SYS_SOCKET_H 1 280 281/* 282 * Define if the strlcpy() function exists on the system. 283 */ 284#define HAVE_STRLCPY 1 285 286/* 287 * Define if prctl() exists 288 */ 289/* #define HAVE_PRCTL 1 */ 290 291/* 292 * Define if writev() exists 293 */ 294#define HAVE_WRITEV 1 295 296#endif /*_ANDROID_CONFIG_H*/ 297