blob: 2d51dc79ff5e9c2a757d01653f650a1ef5829184 [file] [log] [blame]
Duane Sand09604112012-05-24 17:40:21 -07001/*
2 * Copyright (C) 2010 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-mips". Used for MIPS 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 * Define if we already have the futex wrapper functions defined. Yes if
59 * compiling against bionic.
60 */
61#define HAVE_FUTEX_WRAPPERS 1
62
63/*
64 * Process creation model. Choose one:
65 *
66 * HAVE_FORKEXEC - use fork() and exec()
67 * HAVE_WIN32_PROC - use CreateProcess()
68 */
69#define HAVE_FORKEXEC
70
71/*
72 * Process out-of-memory adjustment. Set if running on Linux,
73 * where we can write to /proc/<pid>/oom_adj to modify the out-of-memory
74 * badness adjustment.
75 */
76#define HAVE_OOM_ADJ
77
78/*
79 * IPC model. Choose one:
80 *
81 * HAVE_SYSV_IPC - use the classic SysV IPC mechanisms (semget, shmget).
82 * HAVE_MACOSX_IPC - use Macintosh IPC mechanisms (sem_open, mmap).
83 * HAVE_WIN32_IPC - use Win32 IPC (CreateSemaphore, CreateFileMapping).
84 * HAVE_ANDROID_IPC - use Android versions (?, mmap).
85 */
86#define HAVE_ANDROID_IPC
87
88/*
89 * Memory-mapping model. Choose one:
90 *
91 * HAVE_POSIX_FILEMAP - use the Posix sys/mmap.h
92 * HAVE_WIN32_FILEMAP - use Win32 filemaps
93 */
94#define HAVE_POSIX_FILEMAP
95
96/*
97 * Define this if you have <termio.h>
98 */
99#define HAVE_TERMIO_H 1
100
101/*
102 * Define this if you have <sys/sendfile.h>
103 */
104#define HAVE_SYS_SENDFILE_H 1
105
106/*
107 * Define this if you build against MSVCRT.DLL
108 */
109/* #define HAVE_MS_C_RUNTIME */
110
111/*
112 * Define this if you have sys/uio.h
113 */
114#define HAVE_SYS_UIO_H 1
115
116/*
117 * Define this if your platforms implements symbolic links
118 * in its filesystems
119 */
120#define HAVE_SYMLINKS
121
122/*
123 * Define this if we have localtime_r().
124 */
125/* #define HAVE_LOCALTIME_R */
126
127/*
128 * Define this if we have gethostbyname_r().
129 */
130/* #define HAVE_GETHOSTBYNAME_R */
131
132/*
133 * Define this if we have ioctl().
134 */
135#define HAVE_IOCTL
136
137/*
138 * Define this if we want to use WinSock.
139 */
140/* #define HAVE_WINSOCK */
141
142/*
143 * Define this if have clock_gettime() and friends
144 */
145#define HAVE_POSIX_CLOCKS
146
147/*
148 * Define this if we have pthread_cond_timedwait_monotonic() and
149 * clock_gettime(CLOCK_MONOTONIC).
150 */
151#define HAVE_TIMEDWAIT_MONOTONIC
152
153/*
154 * Define this if we have linux style epoll()
155 */
156#define HAVE_EPOLL
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#define HAVE_ENDIAN_H
166#if defined(__MIPSEB__)
167#define HAVE_BIG_ENDIAN
168#endif
169#if defined(__MIPSEL__)
170#define HAVE_LITTLE_ENDIAN
171#endif
172
173/*
174 * We need to choose between 32-bit and 64-bit off_t. All of our code should
175 * agree on the same size. For desktop systems, use 64-bit values,
176 * because some of our libraries (e.g. wxWidgets) expect to be built that way.
177 */
178/* #define _FILE_OFFSET_BITS 64 */
179/* #define _LARGEFILE_SOURCE 1 */
180
181/*
182 * Define if platform has off64_t (and lseek64 and other xxx64 functions)
183 */
184#define HAVE_OFF64_T
185
186/*
187 * Defined if we have the backtrace() call for retrieving a stack trace.
188 * Needed for CallStack to operate; if not defined, CallStack is
189 * non-functional.
190 */
191#define HAVE_BACKTRACE 0
192
193/*
194 * Defined if we have the dladdr() call for retrieving the symbol associated
195 * with a memory address. If not defined, stack crawls will not have symbolic
196 * information.
197 */
198#define HAVE_DLADDR 1
199
200/*
201 * Defined if we have the cxxabi.h header for demangling C++ symbols. If
202 * not defined, stack crawls will be displayed with raw mangled symbols
203 */
204#define HAVE_CXXABI 0
205
206/*
207 * Defined if we have the gettid() system call.
208 */
209#define HAVE_GETTID
210
211/*
212 * Defined if we have the sched_setscheduler() call
213 */
214#define HAVE_SCHED_SETSCHEDULER
215
216/*
217 * Add any extra platform-specific defines here.
218 */
219#ifndef __linux__
220#define __linux__ 1
221#endif
222
223#ifndef __linux
224#define __linux 1
225#endif
226
227#ifdef __unix__
228#undef __unix__
229#endif
230
231#ifdef __unix
232#undef __unix
233#endif
234
235/*
236 * Define if we have <malloc.h> header
237 */
238#define HAVE_MALLOC_H
239
240/*
241 * Define if we're running on *our* linux on device or emulator.
242 */
243#define HAVE_ANDROID_OS 1
244
245/*
246 * Define if we have Linux-style non-filesystem Unix Domain Sockets
247 */
248#define HAVE_LINUX_LOCAL_SOCKET_NAMESPACE 1
249
250/*
251 * Define if we have Linux's inotify in <sys/inotify.h>.
252 */
253#define HAVE_INOTIFY 1
254
255/*
256 * Define if we have madvise() in <sys/mman.h>
257 */
258#define HAVE_MADVISE 1
259
260/*
261 * Define if tm struct has tm_gmtoff field
262 */
263#define HAVE_TM_GMTOFF 1
264
265/*
266 * Define if dirent struct has d_type field
267 */
268#define HAVE_DIRENT_D_TYPE 1
269
270/*
271 * Define if libc includes Android system properties implementation.
272 */
273#define HAVE_LIBC_SYSTEM_PROPERTIES 1
274
275/*
276 * Define if system provides a system property server (should be
277 * mutually exclusive with HAVE_LIBC_SYSTEM_PROPERTIES).
278 */
279/* #define HAVE_SYSTEM_PROPERTY_SERVER */
280
281/*
282 * What CPU architecture does this platform use?
283 */
284#define ARCH_MIPS 1
285
286/*
287 * Define if the size of enums is as short as possible,
288 */
289/* #define HAVE_SHORT_ENUMS */
290
291/*
292 * sprintf() format string for shared library naming.
293 */
294#define OS_SHARED_LIB_FORMAT_STR "lib%s.so"
295
296/*
297 * Do we have __memcmp16()?
298 */
299#define HAVE__MEMCMP16 1
300
301/*
302 * type for the third argument to mincore().
303 */
304#define MINCORE_POINTER_TYPE unsigned char *
305
306/*
307 * Do we have the sigaction flag SA_NOCLDWAIT?
308 */
309#define HAVE_SA_NOCLDWAIT
310
311/*
312 * The default path separator for the platform
313 */
314#define OS_PATH_SEPARATOR '/'
315
316/*
317 * Is the filesystem case sensitive?
318 */
319#define OS_CASE_SENSITIVE
320
321/*
322 * Define if <sys/socket.h> exists.
323 */
324#define HAVE_SYS_SOCKET_H 1
325
326/*
327 * Define if the strlcpy() function exists on the system.
328 */
329#define HAVE_STRLCPY 1
330
331/*
332 * Define if the open_memstream() function exists on the system.
333 */
334/* #define HAVE_OPEN_MEMSTREAM 1 */
335
336/*
337 * Define if the BSD funopen() function exists on the system.
338 */
339#define HAVE_FUNOPEN 1
340
341/*
342 * Define if prctl() exists
343 */
344#define HAVE_PRCTL 1
345
346/*
347 * Define if writev() exists
348 */
349#define HAVE_WRITEV 1
350
351/*
352 * Define if <stdint.h> exists.
353 */
354#define HAVE_STDINT_H 1
355
356/*
357 * Define if <stdbool.h> exists.
358 */
359#define HAVE_STDBOOL_H 1
360
361/*
362 * Define if <sched.h> exists.
363 */
364#define HAVE_SCHED_H 1
365
366/*
367 * Define if pread() exists
368 */
369#define HAVE_PREAD 1
370
371/*
372 * Define if we have st_mtim in struct stat
373 */
374#define HAVE_STAT_ST_MTIM 1
375
376/*
377 * Define if printf() supports %zd for size_t arguments
378 */
379#define HAVE_PRINTF_ZD 1
380
381/*
382 * Whether or not _Unwind_Context is defined as a struct.
383 */
384#define HAVE_UNWIND_CONTEXT_STRUCT 1
385
386#endif /* _ANDROID_CONFIG_H */