• 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 -- "CYGWIN_NT-5.1".
19  *
20  * Cygwin has pthreads, but GDB seems to get confused if you use it to
21  * create threads.  By "confused", I mean it freezes up the first time the
22  * debugged process creates a thread, even if you use CreateThread.  The
23  * mere presence of pthreads linkage seems to cause problems.
24  */
25 #ifndef _ANDROID_CONFIG_H
26 #define _ANDROID_CONFIG_H
27 
28 /*
29  * ===========================================================================
30  *                              !!! IMPORTANT !!!
31  * ===========================================================================
32  *
33  * This file is included by ALL C/C++ source files.  Don't put anything in
34  * here unless you are absolutely certain it can't go anywhere else.
35  *
36  * Any C++ stuff must be wrapped with "#ifdef __cplusplus".  Do not use "//"
37  * comments.
38  */
39 
40 /*
41  * Threading model.  Choose one:
42  *
43  * HAVE_PTHREADS - use the pthreads library.
44  * HAVE_WIN32_THREADS - use Win32 thread primitives.
45  */
46 #define HAVE_WIN32_THREADS
47 
48 /*
49  * Do we have the futex syscall?
50  */
51 
52 /* #define HAVE_FUTEX */
53 
54 
55 /*
56  * Process creation model.  Choose one:
57  *
58  * HAVE_FORKEXEC - use fork() and exec()
59  * HAVE_WIN32_PROC - use CreateProcess()
60  */
61 #ifdef __CYGWIN__
62 #  define HAVE_FORKEXEC
63 #else
64 #  define HAVE_WIN32_PROC
65 #endif
66 
67 /*
68  * Process out-of-memory adjustment.  Set if running on Linux,
69  * where we can write to /proc/<pid>/oom_adj to modify the out-of-memory
70  * badness adjustment.
71  */
72 /* #define HAVE_OOM_ADJ */
73 
74 /*
75  * IPC model.  Choose one:
76  *
77  * HAVE_SYSV_IPC - use the classic SysV IPC mechanisms (semget, shmget).
78  * HAVE_MACOSX_IPC - use Macintosh IPC mechanisms (sem_open, mmap).
79  * HAVE_WIN32_IPC - use Win32 IPC (CreateSemaphore, CreateFileMapping).
80  * HAVE_ANDROID_IPC - use Android versions (?, mmap).
81  */
82 #define HAVE_WIN32_IPC
83 
84 /*
85  * Memory-mapping model. Choose one:
86  *
87  * HAVE_POSIX_FILEMAP - use the Posix sys/mmap.h
88  * HAVE_WIN32_FILEMAP - use Win32 filemaps
89  */
90 #ifdef __CYGWIN__
91 #define  HAVE_POSIX_FILEMAP
92 #else
93 #define  HAVE_WIN32_FILEMAP
94 #endif
95 
96 /*
97  * Define this if you have <termio.h>
98  */
99 #ifdef __CYGWIN__
100 #  define  HAVE_TERMIO_H
101 #endif
102 
103 /*
104  * Define this if you build against MSVCRT.DLL
105  */
106 #ifndef __CYGWIN__
107 #  define HAVE_MS_C_RUNTIME
108 #endif
109 
110 /*
111  * Define this if you have sys/uio.h
112  */
113 #ifdef __CYGWIN__
114 #define  HAVE_SYS_UIO_H
115 #endif
116 
117 
118 /*
119  * Define this if we have localtime_r().
120  */
121 /* #define HAVE_LOCALTIME_R */
122 
123 /*
124  * Define this if we have gethostbyname_r().
125  */
126 /* #define HAVE_GETHOSTBYNAME_R */
127 
128 /*
129  * Define this if we have ioctl().
130  */
131 /* #define HAVE_IOCTL */
132 
133 /*
134  * Define this if we want to use WinSock.
135  */
136 #ifndef __CYGWIN__
137 #define HAVE_WINSOCK
138 #endif
139 
140 /*
141  * Define this if your platforms implements symbolic links
142  * in its filesystems
143  */
144 /* #define HAVE_SYMLINKS */
145 
146 /*
147  * Define this if have clock_gettime() and friends
148  */
149 /* #define HAVE_POSIX_CLOCKS */
150 
151 /*
152  * Endianness of the target machine.  Choose one:
153  *
154  * HAVE_ENDIAN_H -- have endian.h header we can include.
155  * HAVE_LITTLE_ENDIAN -- we are little endian.
156  * HAVE_BIG_ENDIAN -- we are big endian.
157  */
158 #ifdef __CYGWIN__
159 #define HAVE_ENDIAN_H
160 #endif
161 
162 #define HAVE_LITTLE_ENDIAN
163 
164 /*
165  * We need to choose between 32-bit and 64-bit off_t.  All of our code should
166  * agree on the same size.  For desktop systems, use 64-bit values,
167  * because some of our libraries (e.g. wxWidgets) expect to be built that way.
168  */
169 #define _FILE_OFFSET_BITS 64
170 #define _LARGEFILE_SOURCE 1
171 
172 /*
173  * Defined if we have the backtrace() call for retrieving a stack trace.
174  * Needed for CallStack to operate; if not defined, CallStack is
175  * non-functional.
176  */
177 #define HAVE_BACKTRACE 0
178 
179 /*
180  * Defined if we have the dladdr() call for retrieving the symbol associated
181  * with a memory address.  If not defined, stack crawls will not have symbolic
182  * information.
183  */
184 #define HAVE_DLADDR 0
185 
186 /*
187  * Defined if we have the cxxabi.h header for demangling C++ symbols.  If
188  * not defined, stack crawls will be displayed with raw mangled symbols
189  */
190 #define HAVE_CXXABI 0
191 
192 /*
193  * Define if tm struct has tm_gmtoff field
194  */
195 /* #define HAVE_TM_GMTOFF 1 */
196 
197 /*
198  * Define if dirent struct has d_type field
199  */
200 /* #define HAVE_DIRENT_D_TYPE 1 */
201 
202 /*
203  * Define if libc includes Android system properties implementation.
204  */
205 /* #define HAVE_LIBC_SYSTEM_PROPERTIES */
206 
207 /*
208  * Define if system provides a system property server (should be
209  * mutually exclusive with HAVE_LIBC_SYSTEM_PROPERTIES).
210  */
211 /* #define HAVE_SYSTEM_PROPERTY_SERVER */
212 
213 /*
214  * Define if we have madvise() in <sys/mman.h>
215  */
216 /*#define HAVE_MADVISE 1*/
217 
218 /*
219  * Add any extra platform-specific defines here.
220  */
221 #define WIN32 1                 /* stock Cygwin doesn't define these */
222 #define _WIN32 1
223 #define _WIN32_WINNT 0x0500     /* admit to using >= Win2K */
224 
225 #define HAVE_WINDOWS_PATHS      /* needed by simulator */
226 
227 /*
228  * What CPU architecture does this platform use?
229  */
230 #define ARCH_X86
231 
232 /*
233  * sprintf() format string for shared library naming.
234  */
235 #define OS_SHARED_LIB_FORMAT_STR    "lib%s.dll"
236 
237 /*
238  * type for the third argument to mincore().
239  */
240 #define MINCORE_POINTER_TYPE unsigned char *
241 
242 /*
243  * The default path separator for the platform
244  */
245 #define OS_PATH_SEPARATOR '\\'
246 
247 /*
248  * Is the filesystem case sensitive?
249  */
250 /* #define OS_CASE_SENSITIVE */
251 
252 /*
253  * Define if <sys/socket.h> exists.
254  * Cygwin has it, but not MinGW.
255  */
256 #ifdef USE_MINGW
257 /* #define HAVE_SYS_SOCKET_H */
258 #else
259 #define HAVE_SYS_SOCKET_H 1
260 #endif
261 
262 /*
263  * Define if the strlcpy() function exists on the system.
264  */
265 /* #define HAVE_STRLCPY 1 */
266 
267 /*
268  * Define if <winsock2.h> exists.
269  * Only MinGW has it.
270  */
271 #ifdef USE_MINGW
272 #define HAVE_WINSOCK2_H 1
273 #else
274 /* #define HAVE_WINSOCK2_H */
275 #endif
276 
277 /*
278  * Various definitions missing in MinGW
279  */
280 #ifdef USE_MINGW
281 #define S_IRGRP 0
282 #define sleep _sleep
283 #endif
284 
285 /*
286  * Define if writev() exists.
287  */
288 /* #define HAVE_WRITEV */
289 
290 #endif /*_ANDROID_CONFIG_H*/
291