Home | History | Annotate | Download | only in linux-arm
      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 -- "android-arm".  Used for ARM 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 pthread_setname_np()?
     46  *
     47  * (HAVE_PTHREAD_SETNAME_NP is used by WebKit to enable a function with
     48  * the same name but different parameters, so we can't use that here.)
     49  */
     50 #define HAVE_ANDROID_PTHREAD_SETNAME_NP
     51 
     52 /*
     53  * Do we have the futex syscall?
     54  */
     55 #define HAVE_FUTEX
     56 
     57 /*
     58  * Process creation model.  Choose one:
     59  *
     60  * HAVE_FORKEXEC - use fork() and exec()
     61  * HAVE_WIN32_PROC - use CreateProcess()
     62  */
     63 #define HAVE_FORKEXEC
     64 
     65 /*
     66  * IPC model.  Choose one:
     67  *
     68  * HAVE_SYSV_IPC - use the classic SysV IPC mechanisms (semget, shmget).
     69  * HAVE_MACOSX_IPC - use Macintosh IPC mechanisms (sem_open, mmap).
     70  * HAVE_WIN32_IPC - use Win32 IPC (CreateSemaphore, CreateFileMapping).
     71  * HAVE_ANDROID_IPC - use Android versions (?, mmap).
     72  */
     73 #define HAVE_ANDROID_IPC
     74 
     75 /*
     76  * Memory-mapping model. Choose one:
     77  *
     78  * HAVE_POSIX_FILEMAP - use the Posix sys/mmap.h
     79  * HAVE_WIN32_FILEMAP - use Win32 filemaps
     80  */
     81 #define  HAVE_POSIX_FILEMAP
     82 
     83 /*
     84  * Define this if you have <termio.h>
     85  */
     86 #define  HAVE_TERMIO_H 1
     87 
     88 /*
     89  * Define this if you have <sys/sendfile.h>
     90  */
     91 #define  HAVE_SYS_SENDFILE_H 1
     92 
     93 /*
     94  * Define this if you build against MSVCRT.DLL
     95  */
     96 /* #define HAVE_MS_C_RUNTIME */
     97 
     98 /*
     99  * Define this if you have sys/uio.h
    100  */
    101 #define  HAVE_SYS_UIO_H 1
    102 
    103 /*
    104  * Define this if your platforms implements symbolic links
    105  * in its filesystems
    106  */
    107 #define HAVE_SYMLINKS
    108 
    109 /*
    110  * Define this if we have localtime_r().
    111  */
    112 /* #define HAVE_LOCALTIME_R 1 */
    113 
    114 /*
    115  * Define this if we have gethostbyname_r().
    116  */
    117 /* #define HAVE_GETHOSTBYNAME_R */
    118 
    119 /*
    120  * Define this if we have ioctl().
    121  */
    122 #define HAVE_IOCTL
    123 
    124 /*
    125  * Define this if we want to use WinSock.
    126  */
    127 /* #define HAVE_WINSOCK */
    128 
    129 /*
    130  * Define this if have clock_gettime() and friends
    131  */
    132 #define HAVE_POSIX_CLOCKS
    133 
    134 /*
    135  * Define this if we have linux style epoll()
    136  */
    137 #define HAVE_EPOLL
    138 
    139 /*
    140  * Endianness of the target machine.  Choose one:
    141  *
    142  * HAVE_ENDIAN_H -- have endian.h header we can include.
    143  * HAVE_LITTLE_ENDIAN -- we are little endian.
    144  * HAVE_BIG_ENDIAN -- we are big endian.
    145  */
    146 #define HAVE_ENDIAN_H
    147 #define HAVE_LITTLE_ENDIAN
    148 
    149 /*
    150  * We need to choose between 32-bit and 64-bit off_t.  All of our code should
    151  * agree on the same size.  For desktop systems, use 64-bit values,
    152  * because some of our libraries (e.g. wxWidgets) expect to be built that way.
    153  */
    154 /* #define _FILE_OFFSET_BITS 64 */
    155 /* #define _LARGEFILE_SOURCE 1 */
    156 
    157 /*
    158  * Define if platform has off64_t (and lseek64 and other xxx64 functions)
    159  */
    160 #define HAVE_OFF64_T
    161 
    162 /*
    163  * Defined if we have the backtrace() call for retrieving a stack trace.
    164  * Needed for CallStack to operate; if not defined, CallStack is
    165  * non-functional.
    166  */
    167 #define HAVE_BACKTRACE 0
    168 
    169 /*
    170  * Defined if we have the cxxabi.h header for demangling C++ symbols.  If
    171  * not defined, stack crawls will be displayed with raw mangled symbols
    172  */
    173 #define HAVE_CXXABI 0
    174 
    175 /*
    176  * Defined if we have the gettid() system call.
    177  */
    178 #define HAVE_GETTID
    179 
    180 /*
    181  * Defined if we have the sched_setscheduler() call
    182  */
    183 #define HAVE_SCHED_SETSCHEDULER
    184 
    185 /*
    186  * Add any extra platform-specific defines here.
    187  */
    188 #ifndef __linux__
    189 #define __linux__
    190 #endif
    191 
    192 /*
    193  * Define if we have <malloc.h> header
    194  */
    195 #define HAVE_MALLOC_H
    196 
    197 /*
    198  * Define if we're running on *our* linux on device or emulator.
    199  */
    200 #define HAVE_ANDROID_OS 1
    201 
    202 /*
    203  * Define if we have Linux-style non-filesystem Unix Domain Sockets
    204  */
    205 #define HAVE_LINUX_LOCAL_SOCKET_NAMESPACE 1
    206 
    207 /*
    208  * Define if we have Linux's inotify in <sys/inotify.h>.
    209  */
    210 #define HAVE_INOTIFY 1
    211 
    212 /*
    213  * Define if we have madvise() in <sys/mman.h>
    214  */
    215 #define HAVE_MADVISE 1
    216 
    217 /*
    218  * Define if tm struct has tm_gmtoff field
    219  */
    220 #define HAVE_TM_GMTOFF 1
    221 
    222 /*
    223  * Define if dirent struct has d_type field
    224  */
    225 #define HAVE_DIRENT_D_TYPE 1
    226 
    227 /*
    228  * Define if libc includes Android system properties implementation.
    229  */
    230 #define HAVE_LIBC_SYSTEM_PROPERTIES 1
    231 
    232 /*
    233  * Define if system provides a system property server (should be
    234  * mutually exclusive with HAVE_LIBC_SYSTEM_PROPERTIES).
    235  */
    236 /* #define HAVE_SYSTEM_PROPERTY_SERVER */
    237 
    238 /*
    239  * What CPU architecture does this platform use?
    240  */
    241 #define ARCH_ARM
    242 
    243 /*
    244  * Define if the size of enums is as short as possible,
    245  */
    246 /* #define HAVE_SHORT_ENUMS */
    247 
    248 /*
    249  * sprintf() format string for shared library naming.
    250  */
    251 #define OS_SHARED_LIB_FORMAT_STR    "lib%s.so"
    252 
    253 /*
    254  * type for the third argument to mincore().
    255  */
    256 #define MINCORE_POINTER_TYPE unsigned char *
    257 
    258 /*
    259  * The default path separator for the platform
    260  */
    261 #define OS_PATH_SEPARATOR '/'
    262 
    263 /*
    264  * Is the filesystem case sensitive?
    265  */
    266 #define OS_CASE_SENSITIVE
    267 
    268 /*
    269  * Define if <sys/socket.h> exists.
    270  */
    271 #define HAVE_SYS_SOCKET_H 1
    272 
    273 /*
    274  * Define if the strlcpy() function exists on the system.
    275  */
    276 #define HAVE_STRLCPY 1
    277 
    278 /*
    279  * Define if the open_memstream() function exists on the system.
    280  */
    281 /* #define HAVE_OPEN_MEMSTREAM 1 */
    282 
    283 /*
    284  * Define if the BSD funopen() function exists on the system.
    285  */
    286 #define HAVE_FUNOPEN 1
    287 
    288 /*
    289  * Define if prctl() exists
    290  */
    291 #define HAVE_PRCTL 1
    292 
    293 /*
    294  * Define if writev() exists
    295  */
    296 #define HAVE_WRITEV 1
    297 
    298 /*
    299  * Define if <stdint.h> exists.
    300  */
    301 #define HAVE_STDINT_H 1
    302 
    303 /*
    304  * Define if <stdbool.h> exists.
    305  */
    306 #define HAVE_STDBOOL_H 1
    307 
    308 /*
    309  * Define if <sched.h> exists.
    310  */
    311 #define HAVE_SCHED_H 1
    312 
    313 /*
    314  * Define if pread() exists
    315  */
    316 #define HAVE_PREAD 1
    317 
    318 /*
    319  * Define if we have st_mtim in struct stat
    320  */
    321 #define HAVE_STAT_ST_MTIM 1
    322 
    323 /*
    324  * Define if printf() supports %zd for size_t arguments
    325  */
    326 #define HAVE_PRINTF_ZD 1
    327 
    328 /*
    329  * Define to 1 if <stdlib.h> provides qsort_r() with a BSD style function prototype.
    330  */
    331 #define HAVE_BSD_QSORT_R 0
    332 
    333 /*
    334  * Define to 1 if <stdlib.h> provides qsort_r() with a GNU style function prototype.
    335  */
    336 #define HAVE_GNU_QSORT_R 0
    337 
    338 #endif /* _ANDROID_CONFIG_H */
    339