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 1 */
    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  * Define if platform has off64_t (and lseek64 and other xxx64 functions)
    167  */
    168 #define HAVE_OFF64_T
    169 
    170 /*
    171  * Defined if we have the backtrace() call for retrieving a stack trace.
    172  * Needed for CallStack to operate; if not defined, CallStack is
    173  * non-functional.
    174  */
    175 #define HAVE_BACKTRACE 0
    176 
    177 /*
    178  * Defined if we have the cxxabi.h header for demangling C++ symbols.  If
    179  * not defined, stack crawls will be displayed with raw mangled symbols
    180  */
    181 #define HAVE_CXXABI 0
    182 
    183 /*
    184  * Defined if we have the gettid() system call.
    185  */
    186 #define HAVE_GETTID
    187 
    188 /*
    189  * Defined if we have the sched_setscheduler() call
    190  */
    191 #define HAVE_SCHED_SETSCHEDULER
    192 
    193 /*
    194  * Add any extra platform-specific defines here.
    195  */
    196 #ifndef __linux__
    197 #define __linux__
    198 #endif
    199 
    200 /*
    201  * Define if we have <malloc.h> header
    202  */
    203 #define HAVE_MALLOC_H
    204 
    205 /*
    206  * Define if we're running on *our* linux on device or emulator.
    207  */
    208 #define HAVE_ANDROID_OS 1
    209 
    210 /*
    211  * Define if we have Linux-style non-filesystem Unix Domain Sockets
    212  */
    213 #define HAVE_LINUX_LOCAL_SOCKET_NAMESPACE 1
    214 
    215 /*
    216  * Define if we have Linux's inotify in <sys/inotify.h>.
    217  */
    218 #define HAVE_INOTIFY 1
    219 
    220 /*
    221  * Define if we have madvise() in <sys/mman.h>
    222  */
    223 #define HAVE_MADVISE 1
    224 
    225 /*
    226  * Define if we have Linux's dbus
    227  */
    228 /* #define HAVE_DBUS 1 */
    229 
    230 /*
    231  * Define if tm struct has tm_gmtoff field
    232  */
    233 #define HAVE_TM_GMTOFF 1
    234 
    235 /*
    236  * Define if dirent struct has d_type field
    237  */
    238 #define HAVE_DIRENT_D_TYPE 1
    239 
    240 /*
    241  * Define if libc includes Android system properties implementation.
    242  */
    243 #define HAVE_LIBC_SYSTEM_PROPERTIES 1
    244 
    245 /*
    246  * Define if system provides a system property server (should be
    247  * mutually exclusive with HAVE_LIBC_SYSTEM_PROPERTIES).
    248  */
    249 /* #define HAVE_SYSTEM_PROPERTY_SERVER */
    250 
    251 /*
    252  * What CPU architecture does this platform use?
    253  */
    254 #define ARCH_X86
    255 
    256 /*
    257  * sprintf() format string for shared library naming.
    258  */
    259 #define OS_SHARED_LIB_FORMAT_STR    "lib%s.so"
    260 
    261 /*
    262  * Do we have __memcmp16()?
    263  */
    264 /* #define HAVE__MEMCMP16  1 */
    265 
    266 /*
    267  * type for the third argument to mincore().
    268  */
    269 #define MINCORE_POINTER_TYPE unsigned char *
    270 
    271 /*
    272  * Do we have the sigaction flag SA_NOCLDWAIT?
    273  */
    274 #define HAVE_SA_NOCLDWAIT
    275 
    276 /*
    277  * The default path separator for the platform
    278  */
    279 #define OS_PATH_SEPARATOR '/'
    280 
    281 /*
    282  * Is the filesystem case sensitive?
    283  */
    284 #define OS_CASE_SENSITIVE
    285 
    286 /*
    287  * Define if <sys/socket.h> exists.
    288  */
    289 #define HAVE_SYS_SOCKET_H 1
    290 
    291 /*
    292  * Define if the strlcpy() function exists on the system.
    293  */
    294 #define HAVE_STRLCPY 1
    295 
    296 /*
    297  * Define if the open_memstream() function exists on the system.
    298  */
    299 /* #define HAVE_OPEN_MEMSTREAM 1 */
    300 
    301 /*
    302  * Define if the BSD funopen() function exists on the system.
    303  */
    304 #define HAVE_FUNOPEN 1
    305 
    306 /*
    307  * Define if prctl() exists
    308  */
    309 #define HAVE_PRCTL 1
    310 
    311 /*
    312  * Whether or not _Unwind_Context is defined as a struct.
    313  */
    314 #define HAVE_UNWIND_CONTEXT_STRUCT
    315 
    316 /*
    317  * Define if <stdint.h> exists.
    318  */
    319 #define HAVE_STDINT_H 1
    320 
    321 /*
    322  * Define if <stdbool.h> exists.
    323  */
    324 #define HAVE_STDBOOL_H 1
    325 
    326 /*
    327  * Define if <sched.h> exists.
    328  */
    329 #define HAVE_SCHED_H 1
    330 
    331 /*
    332  * Define if pread() exists
    333  */
    334 #define HAVE_PREAD 1
    335 
    336 /*
    337  * Define if we have st_mtim in struct stat
    338  */
    339 #define HAVE_STAT_ST_MTIM 1
    340 
    341 /*
    342  * Define if printf() supports %zd for size_t arguments
    343  */
    344 #define HAVE_PRINTF_ZD 1
    345 
    346 /*
    347  * Define to 1 if <stdlib.h> provides qsort_r() with a BSD style function prototype.
    348  */
    349 #define HAVE_BSD_QSORT_R 0
    350 
    351 /*
    352  * Define to 1 if <stdlib.h> provides qsort_r() with a GNU style function prototype.
    353  */
    354 #define HAVE_GNU_QSORT_R 0
    355 
    356 #endif /* _ANDROID_CONFIG_H */
    357