Home | History | Annotate | Download | only in target_linux-x86
      1 /*
      2  * Copyright 2005 The Android Open Source Project
      3  *
      4  * Android config -- "target_linux-x86".  Used for x86 linux target devices.
      5  */
      6 #ifndef _ANDROID_CONFIG_H
      7 #define _ANDROID_CONFIG_H
      8 
      9 /*
     10  * ===========================================================================
     11  *                              !!! IMPORTANT !!!
     12  * ===========================================================================
     13  *
     14  * This file is included by ALL C/C++ source files.  Don't put anything in
     15  * here unless you are absolutely certain it can't go anywhere else.
     16  *
     17  * Any C++ stuff must be wrapped with "#ifdef __cplusplus".  Do not use "//"
     18  * comments.
     19  */
     20 
     21 /*
     22  * Threading model.  Choose one:
     23  *
     24  * HAVE_PTHREADS - use the pthreads library.
     25  * HAVE_WIN32_THREADS - use Win32 thread primitives.
     26  *  -- combine HAVE_CREATETHREAD, HAVE_CREATEMUTEX, and HAVE__BEGINTHREADEX
     27  */
     28 #define HAVE_PTHREADS
     29 
     30 /*
     31  * Do we have pthread_setname_np()?
     32  *
     33  * (HAVE_PTHREAD_SETNAME_NP is used by WebKit to enable a function with
     34  * the same name but different parameters, so we can't use that here.)
     35  */
     36 #define HAVE_ANDROID_PTHREAD_SETNAME_NP
     37 
     38 /*
     39  * Do we have the futex syscall?
     40  */
     41 #define HAVE_FUTEX
     42 
     43 /*
     44  * Define if we already have the futex wrapper functions defined. Yes if
     45  * compiling against bionic.
     46  */
     47 #define HAVE_FUTEX_WRAPPERS 1
     48 
     49 /*
     50  * Process creation model.  Choose one:
     51  *
     52  * HAVE_FORKEXEC - use fork() and exec()
     53  * HAVE_WIN32_PROC - use CreateProcess()
     54  */
     55 #define HAVE_FORKEXEC
     56 
     57 /*
     58  * Process out-of-memory adjustment.  Set if running on Linux,
     59  * where we can write to /proc/<pid>/oom_adj to modify the out-of-memory
     60  * badness adjustment.
     61  */
     62 #define HAVE_OOM_ADJ
     63 
     64 /*
     65  * IPC model.  Choose one:
     66  *
     67  * HAVE_SYSV_IPC - use the classic SysV IPC mechanisms (semget, shmget).
     68  * HAVE_MACOSX_IPC - use Macintosh IPC mechanisms (sem_open, mmap).
     69  * HAVE_WIN32_IPC - use Win32 IPC (CreateSemaphore, CreateFileMapping).
     70  * HAVE_ANDROID_IPC - use Android versions (?, mmap).
     71  */
     72 #define HAVE_ANDROID_IPC 1
     73 
     74 /*
     75  * Memory-mapping model. Choose one:
     76  *
     77  * HAVE_POSIX_FILEMAP - use the Posix sys/mmap.h
     78  * HAVE_WIN32_FILEMAP - use Win32 filemaps
     79  */
     80 #define  HAVE_POSIX_FILEMAP 1
     81 
     82 /*
     83  * Define this if you have <termio.h>
     84  */
     85 #define  HAVE_TERMIO_H 1
     86 
     87 /*
     88  * Define this if you have <sys/sendfile.h>
     89  */
     90 #define  HAVE_SYS_SENDFILE_H 1
     91 
     92 /*
     93  * Define this if you build against have Microsoft C runtime (MSVCRT.DLL)
     94  */
     95 /* #define HAVE_MS_C_RUNTIME */
     96 
     97 /*
     98  * Define this if you have sys/uio.h
     99  */
    100 #define  HAVE_SYS_UIO_H 1
    101 
    102 /*
    103  * Define this if your platforms implements symbolic links
    104  * in its filesystems
    105  */
    106 #define HAVE_SYMLINKS 1
    107 
    108 /*
    109  * Define this if we have localtime_r().
    110  */
    111 /* #define HAVE_LOCALTIME_R */
    112 
    113 /*
    114  * Define this if we have gethostbyname_r().
    115  */
    116 /* #define HAVE_GETHOSTBYNAME_R */
    117 
    118 /*
    119  * Define this if we have ioctl().
    120  */
    121 #define HAVE_IOCTL
    122 
    123 /*
    124  * Define this if we want to use WinSock.
    125  */
    126 /* #define HAVE_WINSOCK */
    127 
    128 /*
    129  * Define this if have clock_gettime() and friends
    130  *
    131  */
    132 #define HAVE_POSIX_CLOCKS
    133 
    134 /*
    135  * Define this if we have pthread_cond_timedwait_monotonic() and
    136  * clock_gettime(CLOCK_MONOTONIC).
    137  */
    138 #define HAVE_TIMEDWAIT_MONOTONIC
    139 
    140 /*
    141  * Define this if we have linux style epoll()
    142  */
    143 #define HAVE_EPOLL
    144 
    145 /*
    146  * Endianness of the target machine.  Choose one:
    147  *
    148  * HAVE_ENDIAN_H -- have endian.h header we can include.
    149  * HAVE_LITTLE_ENDIAN -- we are little endian.
    150  * HAVE_BIG_ENDIAN -- we are big endian.
    151  */
    152 #define HAVE_ENDIAN_H
    153 #define HAVE_LITTLE_ENDIAN
    154 
    155 /*
    156  * We need to choose between 32-bit and 64-bit off_t.  All of our code should
    157  * agree on the same size.  For desktop systems, use 64-bit values,
    158  * because some of our libraries (e.g. wxWidgets) expect to be built that way.
    159  */
    160 /*
    161  * #define _FILE_OFFSET_BITS 64
    162  * #define _LARGEFILE_SOURCE 1
    163  */
    164 
    165 /*
    166  * Defined if we have the backtrace() call for retrieving a stack trace.
    167  * Needed for CallStack to operate; if not defined, CallStack is
    168  * non-functional.
    169  */
    170 #define HAVE_BACKTRACE 0
    171 
    172 /*
    173  * Defined if we have the dladdr() call for retrieving the symbol associated
    174  * with a memory address.  If not defined, stack crawls will not have symbolic
    175  * information.
    176  */
    177 #define HAVE_DLADDR 0
    178 
    179 /*
    180  * Defined if we have the cxxabi.h header for demangling C++ symbols.  If
    181  * not defined, stack crawls will be displayed with raw mangled symbols
    182  */
    183 #define HAVE_CXXABI 0
    184 
    185 /*
    186  * Defined if we have the gettid() system call.
    187  */
    188 #define HAVE_GETTID
    189 
    190 /*
    191  * Defined if we have the sched_setscheduler() call
    192  */
    193 #define HAVE_SCHED_SETSCHEDULER
    194 
    195 /*
    196  * Add any extra platform-specific defines here.
    197  */
    198 #ifndef __linux__
    199 #define __linux__
    200 #endif
    201 
    202 /*
    203  * Define if we have <malloc.h> header
    204  */
    205 #define HAVE_MALLOC_H
    206 
    207 /*
    208  * Define if we're running on *our* linux on device or emulator.
    209  */
    210 #define HAVE_ANDROID_OS 1
    211 
    212 /*
    213  * Define if we have Linux-style non-filesystem Unix Domain Sockets
    214  */
    215 #define HAVE_LINUX_LOCAL_SOCKET_NAMESPACE 1
    216 
    217 /*
    218  * Define if we have Linux's inotify in <sys/inotify.h>.
    219  */
    220 #define HAVE_INOTIFY 1
    221 
    222 /*
    223  * Define if we have madvise() in <sys/mman.h>
    224  */
    225 #define HAVE_MADVISE 1
    226 
    227 /*
    228  * Define if we have Linux's dbus
    229  */
    230 #define HAVE_DBUS 1
    231 
    232 /*
    233  * Define if tm struct has tm_gmtoff field
    234  */
    235 #define HAVE_TM_GMTOFF 1
    236 
    237 /*
    238  * Define if dirent struct has d_type field
    239  */
    240 #define HAVE_DIRENT_D_TYPE 1
    241 
    242 /*
    243  * Define if libc includes Android system properties implementation.
    244  */
    245 #define HAVE_LIBC_SYSTEM_PROPERTIES 1
    246 
    247 /*
    248  * Define if system provides a system property server (should be
    249  * mutually exclusive with HAVE_LIBC_SYSTEM_PROPERTIES).
    250  */
    251 /* #define HAVE_SYSTEM_PROPERTY_SERVER */
    252 
    253 /*
    254  * What CPU architecture does this platform use?
    255  */
    256 #define ARCH_X86
    257 
    258 /*
    259  * sprintf() format string for shared library naming.
    260  */
    261 #define OS_SHARED_LIB_FORMAT_STR    "lib%s.so"
    262 
    263 /*
    264  * Do we have __memcmp16()?
    265  */
    266 /* #define HAVE__MEMCMP16  1 */
    267 
    268 /*
    269  * type for the third argument to mincore().
    270  */
    271 #define MINCORE_POINTER_TYPE unsigned char *
    272 
    273 /*
    274  * Do we have the sigaction flag SA_NOCLDWAIT?
    275  */
    276 #define HAVE_SA_NOCLDWAIT
    277 
    278 /*
    279  * The default path separator for the platform
    280  */
    281 #define OS_PATH_SEPARATOR '/'
    282 
    283 /*
    284  * Is the filesystem case sensitive?
    285  */
    286 #define OS_CASE_SENSITIVE
    287 
    288 /*
    289  * Define if <sys/socket.h> exists.
    290  */
    291 #define HAVE_SYS_SOCKET_H 1
    292 
    293 /*
    294  * Define if the strlcpy() function exists on the system.
    295  */
    296 #define HAVE_STRLCPY 1
    297 
    298 /*
    299  * Define if the open_memstream() function exists on the system.
    300  */
    301 /* #define HAVE_OPEN_MEMSTREAM 1 */
    302 
    303 /*
    304  * Define if the BSD funopen() function exists on the system.
    305  */
    306 #define HAVE_FUNOPEN 1
    307 
    308 /*
    309  * Define if prctl() exists
    310  */
    311 #define HAVE_PRCTL 1
    312 
    313 /*
    314  * Whether or not _Unwind_Context is defined as a struct.
    315  */
    316 #define HAVE_UNWIND_CONTEXT_STRUCT
    317 
    318 /*
    319  * Define if <stdint.h> exists.
    320  */
    321 #define HAVE_STDINT_H 1
    322 
    323 /*
    324  * Define if <stdbool.h> exists.
    325  */
    326 #define HAVE_STDBOOL_H 1
    327 
    328 /*
    329  * Define if <sched.h> exists.
    330  */
    331 #define HAVE_SCHED_H 1
    332 
    333 /*
    334  * Define if pread() exists
    335  */
    336 #define HAVE_PREAD 1
    337 
    338 /*
    339  * Define if we have st_mtim in struct stat
    340  */
    341 #define HAVE_STAT_ST_MTIM 1
    342 
    343 /*
    344  * Define if printf() supports %zd for size_t arguments
    345  */
    346 #define HAVE_PRINTF_ZD 1
    347 
    348 #endif /* _ANDROID_CONFIG_H */
    349