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 -- "CYGWIN_NT-5.1". 19 * 20 * Cygwin has pthreads, but GDB seems to get confused if you use it to 21 * create threads. By "confused", I mean it freezes up the first time the 22 * debugged process creates a thread, even if you use CreateThread. The 23 * mere presence of pthreads linkage seems to cause problems. 24 */ 25 #ifndef _ANDROID_CONFIG_H 26 #define _ANDROID_CONFIG_H 27 28 /* 29 * =========================================================================== 30 * !!! IMPORTANT !!! 31 * =========================================================================== 32 * 33 * This file is included by ALL C/C++ source files. Don't put anything in 34 * here unless you are absolutely certain it can't go anywhere else. 35 * 36 * Any C++ stuff must be wrapped with "#ifdef __cplusplus". Do not use "//" 37 * comments. 38 */ 39 40 /* 41 * Threading model. Choose one: 42 * 43 * HAVE_PTHREADS - use the pthreads library. 44 * HAVE_WIN32_THREADS - use Win32 thread primitives. 45 */ 46 #define HAVE_WIN32_THREADS 47 48 /* 49 * Do we have the futex syscall? 50 */ 51 52 /* #define HAVE_FUTEX */ 53 54 55 /* 56 * Process creation model. Choose one: 57 * 58 * HAVE_FORKEXEC - use fork() and exec() 59 * HAVE_WIN32_PROC - use CreateProcess() 60 */ 61 #ifdef __CYGWIN__ 62 # define HAVE_FORKEXEC 63 #else 64 # define HAVE_WIN32_PROC 65 #endif 66 67 /* 68 * Process out-of-memory adjustment. Set if running on Linux, 69 * where we can write to /proc/<pid>/oom_adj to modify the out-of-memory 70 * badness adjustment. 71 */ 72 /* #define HAVE_OOM_ADJ */ 73 74 /* 75 * IPC model. Choose one: 76 * 77 * HAVE_SYSV_IPC - use the classic SysV IPC mechanisms (semget, shmget). 78 * HAVE_MACOSX_IPC - use Macintosh IPC mechanisms (sem_open, mmap). 79 * HAVE_WIN32_IPC - use Win32 IPC (CreateSemaphore, CreateFileMapping). 80 * HAVE_ANDROID_IPC - use Android versions (?, mmap). 81 */ 82 #define HAVE_WIN32_IPC 83 84 /* 85 * Memory-mapping model. Choose one: 86 * 87 * HAVE_POSIX_FILEMAP - use the Posix sys/mmap.h 88 * HAVE_WIN32_FILEMAP - use Win32 filemaps 89 */ 90 #ifdef __CYGWIN__ 91 #define HAVE_POSIX_FILEMAP 92 #else 93 #define HAVE_WIN32_FILEMAP 94 #endif 95 96 /* 97 * Define this if you have <termio.h> 98 */ 99 #ifdef __CYGWIN__ 100 # define HAVE_TERMIO_H 101 #endif 102 103 /* 104 * Define this if you have <sys/sendfile.h> 105 */ 106 #ifdef __CYGWIN__ 107 # define HAVE_SYS_SENDFILE_H 1 108 #endif 109 110 /* 111 * Define this if you build against MSVCRT.DLL 112 */ 113 #ifndef __CYGWIN__ 114 # define HAVE_MS_C_RUNTIME 115 #endif 116 117 /* 118 * Define this if you have sys/uio.h 119 */ 120 #ifdef __CYGWIN__ 121 #define HAVE_SYS_UIO_H 122 #endif 123 124 125 /* 126 * Define this if we have localtime_r(). 127 */ 128 /* #define HAVE_LOCALTIME_R 1 */ 129 130 /* 131 * Define this if we have gethostbyname_r(). 132 */ 133 /* #define HAVE_GETHOSTBYNAME_R */ 134 135 /* 136 * Define this if we have ioctl(). 137 */ 138 /* #define HAVE_IOCTL */ 139 140 /* 141 * Define this if we want to use WinSock. 142 */ 143 #ifndef __CYGWIN__ 144 #define HAVE_WINSOCK 145 #endif 146 147 /* 148 * Define this if your platforms implements symbolic links 149 * in its filesystems 150 */ 151 /* #define HAVE_SYMLINKS */ 152 153 /* 154 * Define this if have clock_gettime() and friends 155 */ 156 /* #define HAVE_POSIX_CLOCKS */ 157 158 /* 159 * Endianness of the target machine. Choose one: 160 * 161 * HAVE_ENDIAN_H -- have endian.h header we can include. 162 * HAVE_LITTLE_ENDIAN -- we are little endian. 163 * HAVE_BIG_ENDIAN -- we are big endian. 164 */ 165 #ifdef __CYGWIN__ 166 #define HAVE_ENDIAN_H 167 #endif 168 169 #define HAVE_LITTLE_ENDIAN 170 171 /* 172 * We need to choose between 32-bit and 64-bit off_t. All of our code should 173 * agree on the same size. For desktop systems, use 64-bit values, 174 * because some of our libraries (e.g. wxWidgets) expect to be built that way. 175 */ 176 #define _FILE_OFFSET_BITS 64 177 #define _LARGEFILE_SOURCE 1 178 179 /* 180 * Define if platform has off64_t (and lseek64 and other xxx64 functions) 181 */ 182 #define HAVE_OFF64_T 183 184 /* 185 * Defined if we have the backtrace() call for retrieving a stack trace. 186 * Needed for CallStack to operate; if not defined, CallStack is 187 * non-functional. 188 */ 189 #define HAVE_BACKTRACE 0 190 191 /* 192 * Defined if we have the cxxabi.h header for demangling C++ symbols. If 193 * not defined, stack crawls will be displayed with raw mangled symbols 194 */ 195 #define HAVE_CXXABI 0 196 197 /* 198 * Define if tm struct has tm_gmtoff field 199 */ 200 /* #define HAVE_TM_GMTOFF 1 */ 201 202 /* 203 * Define if dirent struct has d_type field 204 */ 205 /* #define HAVE_DIRENT_D_TYPE 1 */ 206 207 /* 208 * Define if libc includes Android system properties implementation. 209 */ 210 /* #define HAVE_LIBC_SYSTEM_PROPERTIES */ 211 212 /* 213 * Define if system provides a system property server (should be 214 * mutually exclusive with HAVE_LIBC_SYSTEM_PROPERTIES). 215 */ 216 /* #define HAVE_SYSTEM_PROPERTY_SERVER */ 217 218 /* 219 * Define if we have madvise() in <sys/mman.h> 220 */ 221 /*#define HAVE_MADVISE 1*/ 222 223 /* 224 * Add any extra platform-specific defines here. 225 */ 226 #define WIN32 1 /* stock Cygwin doesn't define these */ 227 #define _WIN32 1 228 #define _WIN32_WINNT 0x0500 /* admit to using >= Win2K */ 229 230 #define HAVE_WINDOWS_PATHS /* needed by simulator */ 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.dll" 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 * Cygwin has it, but not MinGW. 260 */ 261 #ifdef USE_MINGW 262 /* #define HAVE_SYS_SOCKET_H */ 263 #else 264 #define HAVE_SYS_SOCKET_H 1 265 #endif 266 267 /* 268 * Define if the strlcpy() function exists on the system. 269 */ 270 /* #define HAVE_STRLCPY 1 */ 271 272 /* 273 * Define if the open_memstream() function exists on the system. 274 */ 275 /* #define HAVE_OPEN_MEMSTREAM 1 */ 276 277 /* 278 * Define if the BSD funopen() function exists on the system. 279 */ 280 /* #define HAVE_FUNOPEN 1 */ 281 282 /* 283 * Define if <winsock2.h> exists. 284 * Only MinGW has it. 285 */ 286 #ifdef USE_MINGW 287 #define HAVE_WINSOCK2_H 1 288 #else 289 /* #define HAVE_WINSOCK2_H */ 290 #endif 291 292 /* 293 * Various definitions missing in MinGW 294 */ 295 #ifdef USE_MINGW 296 #define S_IRGRP 0 297 #endif 298 299 /* 300 * Define if writev() exists. 301 */ 302 /* #define HAVE_WRITEV */ 303 304 /* 305 * Define if <stdint.h> exists. 306 */ 307 /* #define HAVE_STDINT_H */ 308 309 /* 310 * Define if <stdbool.h> exists. 311 */ 312 #define HAVE_STDBOOL_H 313 314 /* 315 * Define if <sched.h> exists. 316 */ 317 /* #define HAVE_SCHED_H */ 318 319 /* 320 * Define if pread() exists 321 */ 322 /* #define HAVE_PREAD 1 */ 323 324 /* 325 * Define if we have st_mtim in struct stat 326 */ 327 /* #define HAVE_STAT_ST_MTIM 1 */ 328 329 /* 330 * Define if printf() supports %zd for size_t arguments 331 */ 332 /* #define HAVE_PRINTF_ZD 1 */ 333 334 /* 335 * Define to 1 if <stdlib.h> provides qsort_r() with a BSD style function prototype. 336 */ 337 #define HAVE_BSD_QSORT_R 0 338 339 /* 340 * Define to 1 if <stdlib.h> provides qsort_r() with a GNU style function prototype. 341 */ 342 #define HAVE_GNU_QSORT_R 0 343 344 #endif /*_ANDROID_CONFIG_H*/ 345