Shin-ichiro KAWASAKI | c6af911 | 2009-08-04 19:14:22 +0900 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2009 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 -- "android-sh". Used for SuperH device builds. |
| 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 | * Define if we already have the futex wrapper functions defined. Yes if |
| 52 | * compiling against bionic. |
| 53 | */ |
| 54 | #define HAVE_FUTEX_WRAPPERS 1 |
| 55 | |
| 56 | /* |
| 57 | * Process creation model. Choose one: |
| 58 | * |
| 59 | * HAVE_FORKEXEC - use fork() and exec() |
| 60 | * HAVE_WIN32_PROC - use CreateProcess() |
| 61 | */ |
| 62 | #define HAVE_FORKEXEC |
| 63 | |
| 64 | /* |
| 65 | * Process out-of-memory adjustment. Set if running on Linux, |
| 66 | * where we can write to /proc/<pid>/oom_adj to modify the out-of-memory |
| 67 | * badness adjustment. |
| 68 | */ |
| 69 | #define HAVE_OOM_ADJ |
| 70 | |
| 71 | /* |
| 72 | * IPC model. Choose one: |
| 73 | * |
| 74 | * HAVE_SYSV_IPC - use the classic SysV IPC mechanisms (semget, shmget). |
| 75 | * HAVE_MACOSX_IPC - use Macintosh IPC mechanisms (sem_open, mmap). |
| 76 | * HAVE_WIN32_IPC - use Win32 IPC (CreateSemaphore, CreateFileMapping). |
| 77 | * HAVE_ANDROID_IPC - use Android versions (?, mmap). |
| 78 | */ |
| 79 | #define HAVE_ANDROID_IPC |
| 80 | |
| 81 | /* |
| 82 | * Memory-mapping model. Choose one: |
| 83 | * |
| 84 | * HAVE_POSIX_FILEMAP - use the Posix sys/mmap.h |
| 85 | * HAVE_WIN32_FILEMAP - use Win32 filemaps |
| 86 | */ |
| 87 | #define HAVE_POSIX_FILEMAP |
| 88 | |
| 89 | /* |
| 90 | * Define this if you have <termio.h> |
| 91 | */ |
| 92 | #define HAVE_TERMIO_H |
| 93 | |
| 94 | /* |
Dan Bornstein | 43ba23f | 2009-10-30 17:15:13 -0700 | [diff] [blame^] | 95 | * Define this if you have <sys/sendfile.h> |
| 96 | */ |
| 97 | #define HAVE_SYS_SENDFILE_H 1 |
| 98 | |
| 99 | /* |
Shin-ichiro KAWASAKI | c6af911 | 2009-08-04 19:14:22 +0900 | [diff] [blame] | 100 | * Define this if you build against MSVCRT.DLL |
| 101 | */ |
| 102 | /* #define HAVE_MS_C_RUNTIME */ |
| 103 | |
| 104 | /* |
| 105 | * Define this if you have sys/uio.h |
| 106 | */ |
| 107 | #define HAVE_SYS_UIO_H |
| 108 | |
| 109 | /* |
| 110 | * Define this if your platforms implements symbolic links |
| 111 | * in its filesystems |
| 112 | */ |
| 113 | #define HAVE_SYMLINKS |
| 114 | |
| 115 | /* |
| 116 | * Define this if we have localtime_r(). |
| 117 | */ |
| 118 | /* #define HAVE_LOCALTIME_R */ |
| 119 | |
| 120 | /* |
| 121 | * Define this if we have gethostbyname_r(). |
| 122 | */ |
| 123 | /* #define HAVE_GETHOSTBYNAME_R */ |
| 124 | |
| 125 | /* |
| 126 | * Define this if we have ioctl(). |
| 127 | */ |
| 128 | #define HAVE_IOCTL |
| 129 | |
| 130 | /* |
| 131 | * Define this if we want to use WinSock. |
| 132 | */ |
| 133 | /* #define HAVE_WINSOCK */ |
| 134 | |
| 135 | /* |
| 136 | * Define this if have clock_gettime() and friends |
| 137 | */ |
| 138 | #define HAVE_POSIX_CLOCKS |
| 139 | |
| 140 | /* |
| 141 | * Define this if we have pthread_cond_timedwait_monotonic() and |
| 142 | * clock_gettime(CLOCK_MONOTONIC). |
| 143 | */ |
| 144 | /* #define HAVE_TIMEDWAIT_MONOTONIC */ |
| 145 | |
| 146 | /* |
| 147 | * Define this if we have linux style epoll() |
| 148 | */ |
| 149 | #define HAVE_EPOLL |
| 150 | |
| 151 | /* |
| 152 | * Endianness of the target machine. Choose one: |
| 153 | * |
| 154 | * HAVE_ENDIAN_H -- have endian.h header we can include. |
| 155 | * HAVE_LITTLE_ENDIAN -- we are little endian. |
| 156 | * HAVE_BIG_ENDIAN -- we are big endian. |
| 157 | */ |
| 158 | #define HAVE_ENDIAN_H |
| 159 | #define HAVE_LITTLE_ENDIAN |
| 160 | |
| 161 | /* |
| 162 | * We need to choose between 32-bit and 64-bit off_t. All of our code should |
| 163 | * agree on the same size. For desktop systems, use 64-bit values, |
| 164 | * because some of our libraries (e.g. wxWidgets) expect to be built that way. |
| 165 | */ |
| 166 | /* #define _FILE_OFFSET_BITS 64 */ |
| 167 | /* #define _LARGEFILE_SOURCE 1 */ |
| 168 | |
| 169 | /* |
| 170 | * Defined if we have the backtrace() call for retrieving a stack trace. |
| 171 | * Needed for CallStack to operate; if not defined, CallStack is |
| 172 | * non-functional. |
| 173 | */ |
| 174 | #define HAVE_BACKTRACE 0 |
| 175 | |
| 176 | /* |
| 177 | * Defined if we have the dladdr() call for retrieving the symbol associated |
| 178 | * with a memory address. If not defined, stack crawls will not have symbolic |
| 179 | * information. |
| 180 | */ |
| 181 | #define HAVE_DLADDR 0 |
| 182 | |
| 183 | /* |
| 184 | * Defined if we have the cxxabi.h header for demangling C++ symbols. If |
| 185 | * not defined, stack crawls will be displayed with raw mangled symbols |
| 186 | */ |
| 187 | #define HAVE_CXXABI 0 |
| 188 | |
| 189 | /* |
| 190 | * Defined if we have the gettid() system call. |
| 191 | */ |
| 192 | #define HAVE_GETTID |
| 193 | |
| 194 | /* |
| 195 | * Defined if we have the sched_setscheduler() call |
| 196 | */ |
| 197 | #define HAVE_SCHED_SETSCHEDULER |
| 198 | |
| 199 | /* |
| 200 | * Add any extra platform-specific defines here. |
| 201 | */ |
| 202 | /* #define __linux__ */ /* for SuperH */ |
| 203 | |
| 204 | /* |
| 205 | * Define if we have <malloc.h> header |
| 206 | */ |
| 207 | #define HAVE_MALLOC_H |
| 208 | |
| 209 | /* |
| 210 | * Define if we're running on *our* linux on device or emulator. |
| 211 | */ |
| 212 | #define HAVE_ANDROID_OS 1 |
| 213 | |
| 214 | /* |
| 215 | * Define if we have Linux-style non-filesystem Unix Domain Sockets |
| 216 | */ |
| 217 | #define HAVE_LINUX_LOCAL_SOCKET_NAMESPACE 1 |
| 218 | |
| 219 | /* |
| 220 | * Define if we have Linux's inotify in <sys/inotify.h>. |
| 221 | */ |
| 222 | #define HAVE_INOTIFY 1 |
| 223 | |
| 224 | /* |
| 225 | * Define if we have madvise() in <sys/mman.h> |
| 226 | */ |
| 227 | #define HAVE_MADVISE 1 |
| 228 | |
| 229 | /* |
| 230 | * Define if tm struct has tm_gmtoff field |
| 231 | */ |
| 232 | #define HAVE_TM_GMTOFF 1 |
| 233 | |
| 234 | /* |
| 235 | * Define if dirent struct has d_type field |
| 236 | */ |
| 237 | #define HAVE_DIRENT_D_TYPE 1 |
| 238 | |
| 239 | /* |
| 240 | * Define if libc includes Android system properties implementation. |
| 241 | */ |
| 242 | #define HAVE_LIBC_SYSTEM_PROPERTIES 1 |
| 243 | |
| 244 | /* |
| 245 | * Define if system provides a system property server (should be |
| 246 | * mutually exclusive with HAVE_LIBC_SYSTEM_PROPERTIES). |
| 247 | */ |
| 248 | /* #define HAVE_SYSTEM_PROPERTY_SERVER */ |
| 249 | |
| 250 | /* |
| 251 | * What CPU architecture does this platform use? |
| 252 | */ |
| 253 | #define ARCH_SH |
| 254 | |
| 255 | /* |
| 256 | * Define if the size of enums is as short as possible, |
| 257 | */ |
| 258 | /* #define HAVE_SHORT_ENUMS */ |
| 259 | |
| 260 | /* |
| 261 | * sprintf() format string for shared library naming. |
| 262 | */ |
| 263 | #define OS_SHARED_LIB_FORMAT_STR "lib%s.so" |
| 264 | |
| 265 | /* |
| 266 | * Do we have __memcmp16()? |
| 267 | * |
| 268 | * TODO : Investigate the perfomance impact of __memcmp16() |
| 269 | * and implement it. |
| 270 | * This influences on dalvikVM's string performance. |
| 271 | * See dalvik/vm/InlineNative.c. |
| 272 | */ |
| 273 | /* #define HAVE__MEMCMP16 */ |
| 274 | |
| 275 | /* |
| 276 | * type for the third argument to mincore(). |
| 277 | */ |
| 278 | #define MINCORE_POINTER_TYPE unsigned char * |
| 279 | |
| 280 | /* |
| 281 | * Do we have the sigaction flag SA_NOCLDWAIT? |
| 282 | */ |
| 283 | #define HAVE_SA_NOCLDWAIT |
| 284 | |
| 285 | /* |
| 286 | * The default path separator for the platform |
| 287 | */ |
| 288 | #define OS_PATH_SEPARATOR '/' |
| 289 | |
| 290 | /* |
| 291 | * Is the filesystem case sensitive? |
| 292 | */ |
| 293 | #define OS_CASE_SENSITIVE |
| 294 | |
| 295 | /* |
| 296 | * Define if <sys/socket.h> exists. |
| 297 | */ |
| 298 | #define HAVE_SYS_SOCKET_H 1 |
| 299 | |
| 300 | /* |
| 301 | * Define if the strlcpy() function exists on the system. |
| 302 | */ |
| 303 | #define HAVE_STRLCPY 1 |
| 304 | |
| 305 | /* |
| 306 | * Define if prctl() exists |
| 307 | */ |
| 308 | #define HAVE_PRCTL 1 |
| 309 | |
| 310 | /* |
| 311 | * Define if writev() exists |
| 312 | */ |
| 313 | #define HAVE_WRITEV 1 |
| 314 | |
| 315 | /* |
| 316 | * For dalvik/libcore |
| 317 | */ |
| 318 | #define CANT_PASS_VALIST_AS_CHARPTR |
| 319 | |
| 320 | /* |
| 321 | * For external/bluez/utils/tools/hciattach.c |
| 322 | * TODO : This definition should be somewhere in bionic/libc/kernel/(*). |
| 323 | * Cosider the place and move it there. |
| 324 | */ |
| 325 | #define N_TTY 0 |
| 326 | |
| 327 | /* |
| 328 | * Whether or not _Unwind_Context is defined as a struct. |
| 329 | */ |
| 330 | #define HAVE_UNWIND_CONTEXT_STRUCT |
| 331 | |
| 332 | #endif /* _ANDROID_CONFIG_H */ |