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