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 */ 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 * Defined if we have the backtrace() call for retrieving a stack trace. 181 * Needed for CallStack to operate; if not defined, CallStack is 182 * non-functional. 183 */ 184#define HAVE_BACKTRACE 0 185 186/* 187 * Defined if we have the dladdr() call for retrieving the symbol associated 188 * with a memory address. If not defined, stack crawls will not have symbolic 189 * information. 190 */ 191#define HAVE_DLADDR 0 192 193/* 194 * Defined if we have the cxxabi.h header for demangling C++ symbols. If 195 * not defined, stack crawls will be displayed with raw mangled symbols 196 */ 197#define HAVE_CXXABI 0 198 199/* 200 * Define if tm struct has tm_gmtoff field 201 */ 202/* #define HAVE_TM_GMTOFF 1 */ 203 204/* 205 * Define if dirent struct has d_type field 206 */ 207/* #define HAVE_DIRENT_D_TYPE 1 */ 208 209/* 210 * Define if libc includes Android system properties implementation. 211 */ 212/* #define HAVE_LIBC_SYSTEM_PROPERTIES */ 213 214/* 215 * Define if system provides a system property server (should be 216 * mutually exclusive with HAVE_LIBC_SYSTEM_PROPERTIES). 217 */ 218/* #define HAVE_SYSTEM_PROPERTY_SERVER */ 219 220/* 221 * Define if we have madvise() in <sys/mman.h> 222 */ 223/*#define HAVE_MADVISE 1*/ 224 225/* 226 * Add any extra platform-specific defines here. 227 */ 228#define WIN32 1 /* stock Cygwin doesn't define these */ 229#define _WIN32 1 230#define _WIN32_WINNT 0x0500 /* admit to using >= Win2K */ 231 232#define HAVE_WINDOWS_PATHS /* needed by simulator */ 233 234/* 235 * What CPU architecture does this platform use? 236 */ 237#define ARCH_X86 238 239/* 240 * sprintf() format string for shared library naming. 241 */ 242#define OS_SHARED_LIB_FORMAT_STR "lib%s.dll" 243 244/* 245 * type for the third argument to mincore(). 246 */ 247#define MINCORE_POINTER_TYPE unsigned char * 248 249/* 250 * The default path separator for the platform 251 */ 252#define OS_PATH_SEPARATOR '\\' 253 254/* 255 * Is the filesystem case sensitive? 256 */ 257/* #define OS_CASE_SENSITIVE */ 258 259/* 260 * Define if <sys/socket.h> exists. 261 * Cygwin has it, but not MinGW. 262 */ 263#ifdef USE_MINGW 264/* #define HAVE_SYS_SOCKET_H */ 265#else 266#define HAVE_SYS_SOCKET_H 1 267#endif 268 269/* 270 * Define if the strlcpy() function exists on the system. 271 */ 272/* #define HAVE_STRLCPY 1 */ 273 274/* 275 * Define if the open_memstream() function exists on the system. 276 */ 277/* #define HAVE_OPEN_MEMSTREAM 1 */ 278 279/* 280 * Define if the BSD funopen() function exists on the system. 281 */ 282/* #define HAVE_FUNOPEN 1 */ 283 284/* 285 * Define if <winsock2.h> exists. 286 * Only MinGW has it. 287 */ 288#ifdef USE_MINGW 289#define HAVE_WINSOCK2_H 1 290#else 291/* #define HAVE_WINSOCK2_H */ 292#endif 293 294/* 295 * Various definitions missing in MinGW 296 */ 297#ifdef USE_MINGW 298#define S_IRGRP 0 299#endif 300 301/* 302 * Define if writev() exists. 303 */ 304/* #define HAVE_WRITEV */ 305 306/* 307 * Define if <stdint.h> exists. 308 */ 309/* #define HAVE_STDINT_H */ 310 311/* 312 * Define if <stdbool.h> exists. 313 */ 314#define HAVE_STDBOOL_H 315 316/* 317 * Define if <sched.h> exists. 318 */ 319/* #define HAVE_SCHED_H */ 320 321/* 322 * Define if pread() exists 323 */ 324/* #define HAVE_PREAD 1 */ 325 326/* 327 * Define if we have st_mtim in struct stat 328 */ 329/* #define HAVE_STAT_ST_MTIM 1 */ 330 331/* 332 * Define if printf() supports %zd for size_t arguments 333 */ 334/* #define HAVE_PRINTF_ZD 1 */ 335 336#endif /*_ANDROID_CONFIG_H*/ 337