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 -- "Darwin". Used for X86 Mac OS X. 19 */ 20 #ifndef _ANDROID_CONFIG_H 21 #define _ANDROID_CONFIG_H 22 23 /* 24 * =========================================================================== 25 * !!! IMPORTANT !!! 26 * =========================================================================== 27 * 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. 30 * 31 * Any C++ stuff must be wrapped with "#ifdef __cplusplus". Do not use "//" 32 * comments. 33 */ 34 35 /* 36 * Threading model. Choose one: 37 * 38 * HAVE_PTHREADS - use the pthreads library. 39 * HAVE_WIN32_THREADS - use Win32 thread primitives. 40 * -- combine HAVE_CREATETHREAD, HAVE_CREATEMUTEX, and HAVE__BEGINTHREADEX 41 */ 42 #define HAVE_PTHREADS 43 44 /* 45 * Do we have the futex syscall? 46 */ 47 48 /* #define HAVE_FUTEX */ 49 50 /* 51 * Process creation model. Choose one: 52 * 53 * HAVE_FORKEXEC - use fork() and exec() 54 * HAVE_WIN32_PROC - use CreateProcess() 55 */ 56 #define HAVE_FORKEXEC 57 58 /* 59 * IPC model. Choose one: 60 * 61 * HAVE_SYSV_IPC - use the classic SysV IPC mechanisms (semget, shmget). 62 * HAVE_MACOSX_IPC - use Macintosh IPC mechanisms (sem_open, mmap). 63 * HAVE_WIN32_IPC - use Win32 IPC (CreateSemaphore, CreateFileMapping). 64 * HAVE_ANDROID_IPC - use Android versions (?, mmap). 65 */ 66 #define HAVE_MACOSX_IPC 67 68 /* 69 * Memory-mapping model. Choose one: 70 * 71 * HAVE_POSIX_FILEMAP - use the Posix sys/mmap.h 72 * HAVE_WIN32_FILEMAP - use Win32 filemaps 73 */ 74 #define HAVE_POSIX_FILEMAP 75 76 /* 77 * Define this if you have <termio.h> 78 */ 79 #define HAVE_TERMIO_H 80 81 /* 82 * Define this if you have <sys/sendfile.h> 83 */ 84 /* #define HAVE_SYS_SENDFILE_H 1 */ 85 86 /* 87 * Define this if you build against MSVCRT.DLL 88 */ 89 /* #define HAVE_MS_C_RUNTIME */ 90 91 /* 92 * Define this if you have sys/uio.h 93 */ 94 #define HAVE_SYS_UIO_H 95 96 /* 97 * Define this if your platforms implements symbolic links 98 * in its filesystems 99 */ 100 #define HAVE_SYMLINKS 101 102 /* 103 * Define this if we have localtime_r(). 104 */ 105 #define HAVE_LOCALTIME_R 1 106 107 /* 108 * Define this if we have gethostbyname_r(). 109 */ 110 /* #define HAVE_GETHOSTBYNAME_R */ 111 112 /* 113 * Define this if we have ioctl(). 114 */ 115 /* #define HAVE_IOCTL */ 116 117 /* 118 * Define this if we want to use WinSock. 119 */ 120 /* #define HAVE_WINSOCK */ 121 122 /* 123 * Define this if have clock_gettime() and friends 124 */ 125 /* #define HAVE_POSIX_CLOCKS */ 126 127 /* 128 * Endianness of the target machine. Choose one: 129 * 130 * HAVE_ENDIAN_H -- have endian.h header we can include. 131 * HAVE_LITTLE_ENDIAN -- we are little endian. 132 * HAVE_BIG_ENDIAN -- we are big endian. 133 */ 134 #if (defined(__ppc__) || defined(__ppc64__)) 135 # define HAVE_BIG_ENDIAN 136 #elif (defined(__i386__) || defined(__x86_64__)) 137 # define HAVE_LITTLE_ENDIAN 138 #endif 139 140 /* 141 * We need to choose between 32-bit and 64-bit off_t. All of our code should 142 * agree on the same size. For desktop systems, use 64-bit values, 143 * because some of our libraries (e.g. wxWidgets) expect to be built that way. 144 */ 145 #define _FILE_OFFSET_BITS 64 146 #define _LARGEFILE_SOURCE 1 147 148 /* 149 * Define if platform has off64_t (and lseek64 and other xxx64 functions) 150 */ 151 /* #define HAVE_OFF64_T */ 152 153 /* 154 * Defined if we have the backtrace() call for retrieving a stack trace. 155 * Needed for CallStack to operate; if not defined, CallStack is 156 * non-functional. 157 */ 158 #define HAVE_BACKTRACE 0 159 160 /* 161 * Defined if we have the cxxabi.h header for demangling C++ symbols. If 162 * not defined, stack crawls will be displayed with raw mangled symbols 163 */ 164 #define HAVE_CXXABI 0 165 166 /* 167 * Defined if we have the gettid() system call. 168 */ 169 /* #define HAVE_GETTID */ 170 171 172 /* 173 * Add any extra platform-specific defines here. 174 */ 175 #define _THREAD_SAFE 176 177 /* 178 * Define if we have <malloc.h> header 179 */ 180 /* #define HAVE_MALLOC_H */ 181 182 /* 183 * Define if tm struct has tm_gmtoff field 184 */ 185 #define HAVE_TM_GMTOFF 1 186 187 /* 188 * Define if dirent struct has d_type field 189 */ 190 #define HAVE_DIRENT_D_TYPE 1 191 192 /* 193 * Define if we have madvise() in <sys/mman.h> 194 */ 195 #define HAVE_MADVISE 1 196 197 /* 198 * Define if we include <sys/mount.h> for statfs() 199 */ 200 #define INCLUDE_SYS_MOUNT_FOR_STATFS 1 201 202 /* 203 * What CPU architecture does this platform use? 204 */ 205 #if (defined(__ppc__) || defined(__ppc64__)) 206 # define ARCH_PPC 207 #elif (defined(__i386__) || defined(__x86_64__)) 208 # define ARCH_X86 209 #endif 210 211 /* 212 * sprintf() format string for shared library naming. 213 */ 214 #define OS_SHARED_LIB_FORMAT_STR "lib%s.dylib" 215 216 /* 217 * type for the third argument to mincore(). 218 */ 219 #define MINCORE_POINTER_TYPE char * 220 221 /* 222 * The default path separator for the platform 223 */ 224 #define OS_PATH_SEPARATOR '/' 225 226 /* 227 * Is the filesystem case sensitive? 228 * 229 * For tools apps, we'll treat is as not case sensitive. 230 */ 231 /* #define OS_CASE_SENSITIVE */ 232 233 /* 234 * Define if <sys/socket.h> exists. 235 */ 236 #define HAVE_SYS_SOCKET_H 1 237 238 /* 239 * Define if the strlcpy() function exists on the system. 240 */ 241 #define HAVE_STRLCPY 1 242 243 /* 244 * Define if the open_memstream() function exists on the system. 245 */ 246 /* #define HAVE_OPEN_MEMSTREAM 1 */ 247 248 /* 249 * Define if the BSD funopen() function exists on the system. 250 */ 251 #define HAVE_FUNOPEN 1 252 253 /* 254 * Define if writev() exists 255 */ 256 #define HAVE_WRITEV 1 257 258 /* 259 * Define if <stdint.h> exists. 260 */ 261 #define HAVE_STDINT_H 1 262 263 /* 264 * Define if <stdbool.h> exists. 265 */ 266 #define HAVE_STDBOOL_H 1 267 268 /* 269 * Define if <sched.h> exists. 270 */ 271 #define HAVE_SCHED_H 1 272 273 /* 274 * Define if pread() exists 275 */ 276 #define HAVE_PREAD 1 277 278 /* 279 * Define if we have st_mtim in struct stat 280 */ 281 #define HAVE_STAT_ST_MTIM 1 282 283 /* 284 * Define if printf() supports %zd for size_t arguments 285 */ 286 #define HAVE_PRINTF_ZD 1 287 288 /* 289 * Define to 1 if <stdlib.h> provides qsort_r() with a BSD style function prototype. 290 */ 291 #define HAVE_BSD_QSORT_R 1 292 293 /* 294 * Define to 1 if <stdlib.h> provides qsort_r() with a GNU style function prototype. 295 */ 296 #define HAVE_GNU_QSORT_R 0 297 298 #endif /*_ANDROID_CONFIG_H*/ 299