1 // Note: For WinCE build, simply use: #include "ace/config-win32.h"
2 // It is same as config.h for Windows NT/2k so that you can
3 // share same files and directories for both WinCE and NT/2k
4 // builds, unless you add additional definition(s) for each
5 // specific build or change the output directory.
7 #ifndef ACE_CONFIG_WINCE_H
8 #define ACE_CONFIG_WINCE_H
10 #include /**/ "ace/pre.h"
12 #ifndef ACE_CONFIG_WIN32_H
13 # error Use config-win32.h in config.h instead of this header
14 #endif // ACE_CONFIG_WIN32_H
16 #if !defined (_WIN32_WCE)
17 # error Define _WIN32_WCE to version (i.e. 500 = 5.0)
20 #if (_WIN32_WCE < 500)
21 # error ACE requires Windows CE 5.0 and later.
24 #if !defined (ACE_HAS_WINCE)
25 # define ACE_HAS_WINCE 1
28 #if defined (_MSC_VER) && (_MSC_VER < 1400)
29 // WinCE prior to Visual Studio 2005 integration doesn't have most of
30 // the standard C library time functions. It also doesn't define struct tm.
31 // SYSTEMTIME has pretty much the same info though, so we can map it when
32 // needed. Define struct tm here and use it when needed. This is taken
33 // from the standard C library.
34 # define ACE_LACKS_STRUCT_TM
37 // We need these libraries to build:
38 #if defined (_MSC_VER)
39 # pragma comment(lib,"corelibc.lib")
40 # pragma comment(linker, "/nodefaultlib:oldnames.lib")
43 // Only DLL version is supported on CE.
44 //#if defined (ACE_HAS_DLL)
46 //#endif // ACE_HAS_DLL
47 //#define ACE_HAS_DLL 1
49 // Need to define LD search path explicitly on CE because
50 // CE doesn't have environment variables and we can't get
51 // the information using getenv.
52 #define ACE_DEFAULT_LD_SEARCH_PATH ACE_TEXT (".\\;\\windows")
54 #define ACE_LACKS_ABORT
55 #define ACE_LACKS_FCNTL_H
56 #define ACE_LACKS_SYS_TYPES_H
57 #define ACE_LACKS_GETCWD
58 #define ACE_LACKS_ASCTIME
59 #define ACE_LACKS_ASCTIME_R
60 #define ACE_LACKS_GMTIME
61 #define ACE_LACKS_GMTIME_R
62 #define ACE_LACKS_LOCALTIME
63 #define ACE_LACKS_STRTOK_R
64 #define ACE_LACKS_PERROR
65 #define ACE_LACKS_STRFTIME
66 #define ACE_LACKS_WIN32_SETFILEPOINTEREX
67 #define ACE_LACKS_WIN32_SERVICES
68 #define ACE_LACKS_WIN32_SECURITY_DESCRIPTORS
69 #define ACE_LACKS_GETPROCESSTIMES
70 #define ACE_LACKS_PDH_H
71 #define ACE_LACKS_PDHMSG_H
72 #define ACE_LACKS_TIME
73 #define ACE_LACKS_TZSET
74 #define ACE_LACKS_RAISE
75 #define ACE_LACKS_BSEARCH
77 #define ACE_LACKS_MSG_WFMO
78 #define ACE_LACKS_UMASK
79 #define ACE_HAS_TYPES_H
80 #define ACE_LACKS_DEV_T
82 #define ACE_ISCTYPE_EQUIVALENT ::_isctype
84 // WinCE only supports the UNICODE API
85 #if !defined (ACE_USES_WCHAR)
86 # define ACE_USES_WCHAR
87 #endif /* ACE_USES_WCHAR */
89 #if (_WIN32_WCE < 0x600)
90 # define ACE_USES_WINCE_SEMA_SIMULATION
91 # define ACE_LACKS_ERRNO_H
92 # define ACE_LACKS_DUP
93 # define ACE_LACKS_GETSYSTEMTIMEASFILETIME
94 #endif /* (_WIN32_WCE < 0x600) */
96 #define ACE_LACKS_REGNOTIFYCHANGEKEYVALUE
98 #define ACE_HAS_NONSTATIC_OBJECT_MANAGER 1
100 #if ! defined(ACE_DEFAULT_THREAD_KEYS)
101 # define ACE_DEFAULT_THREAD_KEYS TLS_MINIMUM_AVAILABLE
102 #endif // ! defined(ACE_DEFAULT_THREAD_KEYS)
104 // FILE stuff isn't always defined in CE
105 #if (_MSC_VER < 1400) && !defined (_FILE_DEFINED)
107 # define _FILE_DEFINED
108 #endif /* _MSC_VER < 1400 && !_FILE_DEFINED */
110 // This was defined in previous versions of CE, but not 2.11
111 #define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION
113 #define ACE_MAIN WINAPI WinMain
115 // SH3 cross-compiler can't handle inline functions correctly
116 // (along with other bugs.)
118 # define ACE_LACKS_INLINE_FUNCTIONS
119 #endif // SH3 && _DEBUG
121 #ifndef ACE_DEFAULT_SERVER_HOST
122 # define ACE_DEFAULT_SERVER_HOST ACE_TEXT("localhost")
123 #endif // ACE_DEFAULT_SERVER_HOST
125 // @@ Need to remap every function that uses any of these flags to
126 // Win32 API. These are for ANSI styled function and are not
127 // available on WinCE.
129 #define _O_RDONLY 0x0000 // open for reading only
130 #define _O_WRONLY 0x0001 // open for writing only
131 #define _O_RDWR 0x0002 // open for reading and writing
132 #define _O_APPEND 0x0008 // writes done at eof
134 #define _O_CREAT 0x0100 // create and open file
135 #define _O_TRUNC 0x0200 // open and truncate
136 #define _O_EXCL 0x0400 // open only if file doesn't already exist
138 // O_TEXT files have <cr><lf> sequences translated to <lf> on read()'s,
139 // and <lf> sequences translated to <cr><lf> on write()'s
140 #define _O_TEXT 0x4000 // file mode is text (translated)
141 #define _O_BINARY 0x8000 // file mode is binary (untranslated)
143 // Temporary file bit - file is deleted when last handle is closed
144 #define _O_TEMPORARY 0x0040 // temporary file bit
147 #define O_RDONLY _O_RDONLY
148 #define O_WRONLY _O_WRONLY
149 #define O_RDWR _O_RDWR
150 #define O_APPEND _O_APPEND
151 #define O_CREAT _O_CREAT
152 #define O_TRUNC _O_TRUNC
153 #define O_EXCL _O_EXCL
154 #define O_TEXT _O_TEXT
155 #define O_BINARY _O_BINARY
156 #define O_TEMPORARY _O_TEMPORARY
158 // @@ NSIG value. This is definitely not correct.
161 #if !defined (FILE_MAP_COPY)
162 #define FILE_MAP_COPY 0
165 #define ACE_HAS_INTERLOCKED_EXCHANGEADD
166 #define ACE_LACKS_ACCESS
167 #define ACE_LACKS__WACCESS
168 #define ACE_HAS_ACCESS_EMULATION
169 #define ACE_LACKS_EXEC
170 #define ACE_LACKS_MKTEMP
171 #define ACE_LACKS_ISATTY
172 #define ACE_LACKS_STRERROR
173 #define ACE_LACKS_SYSTEM
174 #define ACE_LACKS_PIPE
176 #define ACE_LACKS_CHDIR
177 #define ACE_LACKS_GETENV
178 #define ACE_LACKS_SETENV
179 #define ACE_LACKS_UNSETENV
180 #define ACE_LACKS_PUTENV
181 #define ACE_LACKS_GETENVSTRINGS
182 #define ACE_LACKS_STRENVDUP
183 #define ACE_LACKS_REALPATH
184 #define ACE_LACKS_SWAB
185 #define ACE_LACKS_TEMPNAM
187 #if defined (_WIN32_WCE_EMULATION)
188 // @@ For some reason, qsort isn't defined correctly (_stdcall vs _cdecl)
189 // under emulation. So for right now, exclude it.
190 # define ACE_LACKS_QSORT
191 #endif // _WIN32_WCE_EMULATION
193 #if !defined (BUFSIZ)
197 #define ACE_LACKS_MALLOC_H // We do have malloc.h, but don't use it.
199 #define ACE_HAS_WINCE_BROKEN_ERRNO
201 #define ACE_HAS_STRDUP_EMULATION
203 #if !defined (MAXSYMLINKS)
204 # define MAXSYMLINKS 0
207 // WinCE can't do fixed addresses for memory-mapped files.
208 #if defined (ACE_DEFAULT_BASE_ADDR)
209 # undef ACE_DEFAULT_BASE_ADDR
211 #define ACE_DEFAULT_BASE_ADDR 0
213 #if (_WIN32_WCE < 0x600)
214 # define ACE_HAS_TSS_EMULATION
215 #endif // WinCE version < 6.0
217 // CE doesn't support FILE_SHARE_DELETE like regular windows
218 #if !defined (ACE_DEFAULT_FILE_PERMS)
219 # define ACE_DEFAULT_FILE_PERMS (FILE_SHARE_READ | FILE_SHARE_WRITE)
222 #define ACE_LACKS_SIGNAL_H
223 #define ACE_LACKS_SYS_STAT_H
225 #include /**/ "ace/post.h"
227 #endif // ACE_CONFIG_WINCE_H