Merge pull request #1069 from jrw972/ipv6-recvinfo-macos
[ACE_TAO.git] / ACE / ace / config-win32-common.h
blob996760bb4b9a6ce9846c4ba6a75a8109cd5e38f0
1 /* -*- C++ -*- */
3 #ifndef ACE_CONFIG_WIN32_COMMON_H
4 #define ACE_CONFIG_WIN32_COMMON_H
5 #include /**/ "ace/pre.h"
7 #ifndef ACE_CONFIG_WIN32_H
8 #error Use config-win32.h in config.h instead of this header
9 #endif /* ACE_CONFIG_WIN32_H */
11 // Windows Mobile (CE) stuff is primarily further restrictions to what's
12 // in the rest of this file. Also, it defined ACE_HAS_WINCE, which is used
13 // in this file.
14 #if defined (_WIN32_WCE)
15 # include "ace/config-WinCE.h"
16 #endif /* _WIN32_WCE */
18 #if defined(__MINGW32__)
19 // When using the --std=c++0x option with MinGW the compiler omits defining
20 // the following required macros (at least with the GCC 4.6.2 version)
21 // So we define them ourselves here.
22 # if !defined(WIN32)
23 # define _stdcall __attribute__((__stdcall__))
24 # define _cdecl __attribute__((__cdecl__))
25 # define _thiscall __attribute__((__thiscall__))
26 # define _fastcall __attribute__((__fastcall__))
27 # define WIN32 1
28 # define WINNT 1
29 # define i386 1
30 # endif
31 #endif
33 // Complain if WIN32 is not already defined.
34 #if !defined (WIN32) && !defined (ACE_HAS_WINCE)
35 # error Please define WIN32 in your project settings.
36 #endif
38 #define ACE_WIN32
39 #if defined (_WIN64) || defined (WIN64)
40 # define ACE_WIN64
42 // MPC template adds _AMD64_ but user projects not generated using MPC
43 // may want to use _AMD64_ as well. Ensure it's there in all cases.
44 # ifndef _AMD64_
45 # define _AMD64_
46 # endif
48 // Use 64-bit file offsets by default in the WIN64 case, similar to
49 // what 64-bit UNIX systems do.
51 // Note that _FILE_OFFSET_BITS is not recognized by Windows. It is,
52 // however, recognized by ACE.
53 # ifndef _FILE_OFFSET_BITS
54 # define _FILE_OFFSET_BITS 64
55 # endif /* !_FILE_OFFSET_BITS */
56 #endif /* _WIN64 || WIN64 */
58 // If the invoking procedure turned off debugging by setting NDEBUG, then
59 // also set ACE_NDEBUG, unless the user has already set it.
60 #if defined (NDEBUG)
61 # if !defined (ACE_NDEBUG)
62 # define ACE_NDEBUG
63 # endif /* ACE_NDEBUG */
64 #endif /* NDEBUG */
66 // Define ACE_HAS_MFC to 1, if you want ACE to use CWinThread. This should
67 // be defined, if your application uses MFC.
68 // Setting applies to : building ACE
69 // Runtime restrictions: MFC DLLs must be installed
70 // Additional notes : If both ACE_HAS_MFC and ACE_MT_SAFE are
71 // defined, the MFC DLL (not the static lib)
72 // will be used from ACE.
73 #if !defined (ACE_HAS_MFC)
74 # define ACE_HAS_MFC 0
75 #endif
77 // ACE_USES_STATIC_MFC always implies ACE_HAS_MFC
78 #if defined (ACE_USES_STATIC_MFC)
79 # if defined (ACE_HAS_MFC)
80 # undef ACE_HAS_MFC
81 # endif
82 # define ACE_HAS_MFC 1
83 #endif /* ACE_USES_STATIC_MFC */
85 // Define ACE_HAS_STRICT to 1 in your config.h file if you want to use
86 // STRICT type checking. It is disabled by default because it will
87 // break existing application code. However, if ACE_HAS_MFC is turned on,
88 // ACE_HAS_STRICT is required by MFC.
89 // Setting applies to : building ACE, linking with ACE
90 // Runtime restrictions: -
91 #if !defined (ACE_HAS_STRICT)
92 # define ACE_HAS_STRICT 0
93 #endif
95 // MFC itself defines STRICT.
96 #if defined (ACE_HAS_MFC) && (ACE_HAS_MFC != 0)
97 # undef ACE_HAS_STRICT
98 # define ACE_HAS_STRICT 1
99 #endif
101 // Turn off the following define if you want to disable threading.
102 // Compile using multi-thread libraries.
103 // Setting applies to : building ACE, linking with ACE
104 // Runtime restrictions: multithreaded runtime DLL must be installed
105 #if !defined (ACE_MT_SAFE)
106 # define ACE_MT_SAFE 1
107 #endif
109 // On winCE these classes do not exist. If they are
110 // introduced in the future, no changes need to be made
111 #if defined (ABOVE_NORMAL_PRIORITY_CLASS) && \
112 defined (BELOW_NORMAL_PRIORITY_CLASS) && \
113 defined (HIGH_PRIORITY_CLASS) && \
114 defined (IDLE_PRIORITY_CLASS) && \
115 defined (NORMAL_PRIORITY_CLASS) && \
116 defined (REALTIME_PRIORITY_CLASS)
117 #define ACE_HAS_WIN32_PRIORITY_CLASS
118 #endif
120 // Build ACE services as DLLs. If you write a library and want it to
121 // use ACE_Svc_Export, this will cause those macros to build dlls. If
122 // you want your ACE service to be a static library, comment out this
123 // line. As far as I know, the only reason to have a library be an
124 // ACE "service" is to leverage the ACE_Svc_Export macros. It's just
125 // as easy to define your own export macros.
126 // #if !defined (ACE_SVC_HAS_DLL)
127 // # define ACE_SVC_HAS_DLL 1
128 // #endif
130 // Define the special export macros needed to export symbols outside a dll
131 #if !defined (ACE_HAS_CUSTOM_EXPORT_MACROS) || (ACE_HAS_CUSTOM_EXPORT_MACROS == 0)
132 #if defined (ACE_HAS_CUSTOM_EXPORT_MACROS)
133 #undef ACE_HAS_CUSTOM_EXPORT_MACROS
134 #endif
135 #define ACE_HAS_CUSTOM_EXPORT_MACROS 1
136 #define ACE_Proper_Export_Flag __declspec (dllexport)
137 #define ACE_Proper_Import_Flag __declspec (dllimport)
138 #define ACE_EXPORT_SINGLETON_DECLARATION(T) template class __declspec (dllexport) T
139 #define ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) template class __declspec (dllexport) SINGLETON_TYPE<CLASS, LOCK>;
140 #define ACE_IMPORT_SINGLETON_DECLARATION(T) extern template class T
141 #define ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) extern template class SINGLETON_TYPE <CLASS, LOCK>;
142 #endif /* !ACE_HAS_CUSTOM_EXPORT_MACROS || ACE_HAS_CUSTOM_EXPORT_MACROS==0 */
144 // Define ACE_HAS_WINSOCK2 to 0 in your config.h file if you do *not*
145 // want to compile with WinSock 2.0.
146 // Setting applies to : building ACE
147 // Runtime restrictions: winsock2 must be installed.
148 // #define ACE_HAS_WINSOCK2 0
150 // By default, we use non-static object manager on Win32. That is,
151 // the object manager is allocated in main's stack memory. If this
152 // does not suit your need, i.e., if your programs depend on the use
153 // of static object manager, you need to disable the behavior by adding
155 // #undef ACE_HAS_NONSTATIC_OBJECT_MANAGER
157 // in the config.h after including config-win32.h
159 // MFC users: the main function is defined within a MFC library and
160 // therefore, ACE won't be able to meddle with main function and
161 // instantiate the non-static object manager for you. To solve the
162 // problem, you'll need to instantiate the ACE_Object_Manager by
163 // either:
165 // 1. Using static object manager (as described above), however, using
166 // the non-static object manager is preferred, therefore,
167 // 2. Instantiate the non-static object manager yourself by either 1)
168 // call ACE::init () at the beginning and ACE::fini () at the end,
169 // _or_ 2) instantiate the ACE_Object_Manager in your CWinApp
170 // derived class.
172 // Optionally, you can #define
173 // ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER in your
174 // ace/config.h and always take care of the business by yourself.
175 // ACE_DOESNT_INSTANTIATE_NONSTATIC_OBJECT_MANAGER has no effect when
176 // using static object managers.
177 #if !defined (ACE_HAS_NONSTATIC_OBJECT_MANAGER)
178 # define ACE_HAS_NONSTATIC_OBJECT_MANAGER
179 #endif /* ACE_HAS_NONSTATIC_OBJECT_MANAGER */
181 #define ACE_HAS_GPERF
183 // ---------------- platform features or lack of them -------------
185 // By default WIN32 has FD_SETSIZE of 64, which places the limit
186 // between 61 and 64 on the number of clients a server using the
187 // Select Reactor can support at the same time (i.e., 64 - standard in,
188 // out, error). Here we raise the limit to 1024. Adjust the definition
189 // below if you need to raise or lower it.
191 #if !defined (FD_SETSIZE)
192 #define FD_SETSIZE 1024
193 #endif /* FD_SETSIZE */
196 // Windows doesn't like 65536 ;-) If 65536 is specified, it is
197 // silently ignored by the OS, i.e., setsockopt does not fail, and you
198 // get stuck with the default size of 8k.
199 #define ACE_DEFAULT_MAX_SOCKET_BUFSIZ 65535
201 // It seems like Win32 does not have a limit on the number of buffers
202 // that can be transferred by the scatter/gather type of I/O
203 // functions, e.g., WSASend and WSARecv. We are setting this to be 64
204 // for now. The typically use case is to create an I/O vector array
205 // of size ACE_IOV_MAX on the stack and then filled in. Note that we
206 // probably don't want too big a value for ACE_IOV_MAX since it may
207 // mostly go to waste or the size of the activation record may become
208 // excessively large.
209 #if !defined (ACE_IOV_MAX)
210 # define ACE_IOV_MAX 64
211 #endif /* ACE_IOV_MAX */
213 #if !defined (ACE_HAS_WINCE)
214 // Platform supports pread() and pwrite()
215 # define ACE_HAS_WTOF
216 #endif /* ! ACE_HAS_WINCE */
218 #define ACE_HAS_P_READ_WRITE
220 #if !defined (ACE_HAS_WINCE)
221 # define ACE_HAS_DIRECT_H
222 # define ACE_HAS_PROCESS_H
223 # define ACE_HAS_IO_H
224 #endif /* ! ACE_HAS_WINCE */
226 #if !defined (__MINGW32__)
227 # define ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS
228 #endif /* __MINGW32__ */
230 #define ACE_DEFAULT_THREAD_PRIORITY 0
232 #define ACE_HAS_DIRENT
233 #define ACE_HAS_MSG
234 #define ACE_HAS_NONCONST_INET_NTOP
235 #define ACE_HAS_RECURSIVE_MUTEXES
236 #define ACE_HAS_SOCKADDR_MSG_NAME
237 #define ACE_HAS_THREAD_SAFE_ACCEPT
239 /* MS is phasing out the GetVersion API so let's prepare */
240 /* For now all releases still provide it. */
241 #define ACE_HAS_WIN32_GETVERSION
243 /* LACKS dir-related facilities */
244 #define ACE_LACKS_READDIR_R
245 #define ACE_LACKS_REWINDDIR
246 #define ACE_LACKS_SEEKDIR
247 #define ACE_LACKS_TELLDIR
249 #define ACE_LACKS_CLOCKID_T
250 #define ACE_LACKS_CLOCK_REALTIME
251 #define ACE_LACKS_CLOCK_MONOTONIC
252 #define ACE_HAS_MONOTONIC_TIME_POLICY
253 #define ACE_HAS_MONOTONIC_CONDITIONS
255 /* LACKS gid/pid/sid/uid facilities */
256 #define ACE_LACKS_GETPGID
257 #define ACE_LACKS_GETPPID
258 #define ACE_LACKS_SETPGID
259 #define ACE_LACKS_SETREGID
260 #define ACE_LACKS_SETREUID
261 #define ACE_LACKS_SETSID
262 #define ACE_LACKS_SETEGID
263 #define ACE_LACKS_SETUID
264 #define ACE_LACKS_SETEUID
265 #define ACE_LACKS_GETGID
266 #define ACE_LACKS_GETEGID
267 #define ACE_LACKS_GETUID
268 #define ACE_LACKS_GETEUID
269 #define ACE_LACKS_SETGID
271 /* LACKS miscellaneous */
272 #define ACE_LACKS_ALARM
273 #define ACE_LACKS_ARPA_INET_H
274 #define ACE_LACKS_DUP2
275 #define ACE_LACKS_FORK
276 #define ACE_LACKS_GETHOSTENT
277 #define ACE_LACKS_GETOPT
278 #define ACE_LACKS_GETIPNODEBYNAME_IPV6
279 #define ACE_LACKS_KILL
280 #define ACE_LACKS_INET_ATON
281 #if _WIN32_WINNT < 0x0600
282 # define ACE_LACKS_INET_NTOP
283 # define ACE_LACKS_INET_PTON
284 #endif
285 #define ACE_LACKS_MADVISE
286 #define ACE_LACKS_MKFIFO
287 #define ACE_LACKS_MODE_MASKS
288 #define ACE_LACKS_PTHREAD_H
289 #define ACE_LACKS_PWD_FUNCTIONS
290 #define ACE_LACKS_RAND_R
291 #define ACE_LACKS_READLINK
292 #define ACE_LACKS_RLIMIT
293 #define ACE_LACKS_SBRK
294 #define ACE_LACKS_SCHED_H
295 #define ACE_LACKS_SEMBUF_T
296 #define ACE_LACKS_SIGACTION
297 #define ACE_LACKS_SIGSET
298 #define ACE_LACKS_SIGSET_T
299 #define ACE_LACKS_SOCKETPAIR
300 #define ACE_LACKS_SUSECONDS_T
301 #define ACE_LACKS_USECONDS_T
302 #define ACE_LACKS_SYS_PARAM_H
303 #define ACE_LACKS_SYS_SYSCTL_H
304 #define ACE_LACKS_SYSCONF
305 #define ACE_LACKS_SYSV_SHMEM
306 #define ACE_LACKS_UNISTD_H
307 #define ACE_LACKS_UNIX_SIGNALS
308 #define ACE_LACKS_UNIX_SYSLOG
309 #define ACE_LACKS_UTSNAME_T
310 #define ACE_LACKS_UNAME
311 #define ACE_LACKS_WAIT
312 #define ACE_LACKS_IOVEC
313 #define ACE_LACKS_LOG2
314 #define ACE_LACKS_CADDR_T
315 #if !defined(__MINGW32__) && !defined (__BORLANDC__)
316 # define ACE_LACKS_MODE_T
317 #endif
318 #if !defined(__MINGW32__)
319 # define ACE_LACKS_PID_T
320 #endif
321 #if !defined (__BORLANDC__)
322 # define ACE_LACKS_NLINK_T
323 # define ACE_LACKS_UID_T
324 # define ACE_LACKS_GID_T
325 #endif
326 #define ACE_LACKS_SETENV
327 #define ACE_LACKS_UNSETENV
329 #define ACE_HAS_PDH_H
330 #define ACE_HAS_PDHMSG_H
332 #define ACE_HAS_VFWPRINTF
334 #define ACE_MKDIR_LACKS_MODE
336 #define ACE_SIZEOF_LONG_LONG 8
338 #if !defined (__MINGW32__)
339 #define ACE_INT64_TYPE signed __int64
340 #define ACE_UINT64_TYPE unsigned __int64
341 #endif
343 #if defined (__MINGW32__)
344 #define ACE_INT64_TYPE signed long long
345 #define ACE_UINT64_TYPE unsigned long long
346 #endif
348 // Optimize ACE_Handle_Set for select().
349 #define ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT
351 // Win32 has wide-char support. Use of the compiler-defined wchar_t type
352 // is controlled in compiler configs since it's a compiler switch.
353 #define ACE_HAS_WCHAR
354 #define ACE_HAS_WTOI
355 #define ACE_HAS_WTOL
357 // Platform supports the rusage struct.
358 #define ACE_HAS_GETRUSAGE
360 // Platform provides ACE_TLI function prototypes.
361 // For Win32, this is not really true, but saves a lot of hassle!
362 #define ACE_HAS_TLI_PROTOTYPES
364 // I'm pretty sure NT lacks these
365 #define ACE_LACKS_UNIX_DOMAIN_SOCKETS
367 // Windows NT needs readv() and writev()
368 #define ACE_LACKS_WRITEV
369 #define ACE_LACKS_READV
371 #if !defined (ACE_HAS_WTHREADS_CONDITION_VARIABLE)
372 # define ACE_LACKS_COND_T
373 #endif
375 #define ACE_LACKS_RWLOCK_T
377 #define ACE_LACKS_KEY_T
379 // No system support for replacing any previous mappings.
380 #define ACE_LACKS_AUTO_MMAP_REPLACEMENT
382 // ACE_HAS_PENTIUM is used to optimize some CDR operations; it's used for
383 // some other time-related things using g++, but not for VC. Current VC
384 // compilers set _M_IX86 > 400 by default so if you're not using a Pentium
385 // class CPU, set the project code generation options appropriately.
386 #if !defined(ACE_HAS_PENTIUM) && (_M_IX86 > 400)
387 # define ACE_HAS_PENTIUM
388 #endif
390 #if defined(ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
391 // Platform supports threads.
392 # define ACE_HAS_THREADS
394 // Platform supports Windows32 threads.
395 # define ACE_HAS_WTHREADS
397 // Compiler/platform has thread-specific storage
398 # define ACE_HAS_THREAD_SPECIFIC_STORAGE
400 // Win32 doesn't have fcntl
401 #define ACE_LACKS_FCNTL
403 #endif /* ACE_MT_SAFE && ACE_MT_SAFE != 0 */
405 #if !defined(_DEBUG)
406 // If we are making a release, and the user has not specified
407 // inline directives, we will default to inline
408 # if ! defined (__ACE_INLINE__)
409 # define __ACE_INLINE__ 1
410 # endif /* __ACE_INLINE__ */
411 #endif
413 // If __ACE_INLINE__ is defined to be 0, we will undefine it
414 #if defined (__ACE_INLINE__) && (__ACE_INLINE__ == 0)
415 # undef __ACE_INLINE__
416 #endif /* __ACE_INLINE__ */
418 // We are build ACE and want to use MFC (multithreaded)
419 #if defined(ACE_HAS_MFC) && (ACE_HAS_MFC != 0) && defined (_MT)
420 # if (ACE_HAS_DLL != 0) && defined(ACE_BUILD_DLL) && !defined (_WINDLL)
421 // force multithreaded MFC DLL
422 # define _WINDLL
423 # endif /* _AFXDLL */
424 # if !defined (_AFXDLL) && !defined (ACE_USES_STATIC_MFC)
425 # define _AFXDLL
426 # endif /* _AFXDLL */
427 #endif
429 // <windows.h> and MFC's <afxwin.h> are mutually
430 // incompatible. <windows.h> is brain-dead about MFC; it doesn't check
431 // to see whether MFC stuff is anticipated or already in progress
432 // before doing its thing. ACE needs (practically always) <winsock.h>,
433 // and winsock in turn needs support either from windows.h or from
434 // afxwin.h. One or the other, not both.
436 // The MSVC++ V4.0 environment defines preprocessor macros that
437 // indicate the programmer has chosen something from the
438 // Build-->Settings-->General-->MFC combo-box. <afxwin.h> defines a
439 // macro itself to protect against double inclusion. We'll take
440 // advantage of all this to select the proper support for winsock. -
441 // trl 26-July-1996
443 // This is necessary since MFC users apparently can't #include
444 // <windows.h> directly.
445 #if defined (ACE_HAS_MFC) && (ACE_HAS_MFC != 0)
446 # include /**/ <afxwin.h> /* He is doing MFC */
447 // Windows.h will be included via afxwin.h->afx.h->afx_ver_.h->afxv_w32.h
448 // #define _INC_WINDOWS // Prevent winsock.h from including windows.h
449 #elif defined (ACE_HAS_WINCE)
450 # include /**/ <windows.h>
451 #endif
453 #if !defined (_INC_WINDOWS) /* Already include windows.h ? */
454 // Must define strict before including windows.h !
455 # if defined (ACE_HAS_STRICT) && (ACE_HAS_STRICT != 0) && !defined (STRICT)
456 # define STRICT 1
457 # endif /* ACE_HAS_STRICT */
459 # if !defined (WIN32_LEAN_AND_MEAN) && !defined (ACE_NO_WIN32_LEAN_AND_MEAN)
460 # define WIN32_LEAN_AND_MEAN
461 # endif /* WIN32_LEAN_AND_MEAN */
463 #endif /* !defined (_INC_WINDOWS) */
465 // Always use WS2 when available
466 #if !defined(ACE_HAS_WINSOCK2)
467 # define ACE_HAS_WINSOCK2 1
468 #endif /* !defined(ACE_HAS_WINSOCK2) */
469 // Not use WS1 by default
470 #if !defined(ACE_HAS_WINSOCK1)
471 # define ACE_HAS_WINSOCK1 0
472 #endif /* !defined(ACE_HAS_WINSOCK1) */
475 #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
476 # define ACE_HAS_ICMP_SUPPORT 1
477 # if !defined (_WINSOCK2API_)
478 // will also include windows.h, if not present
479 # include /**/ <winsock2.h>
480 // WinCE 4 doesn't define the Exxx values without the WSA prefix, so do that
481 // here. This is all lifted from the #if 0'd out part of winsock2.h.
482 # if defined (_WIN32_WCE) && (_WIN32_WCE < 0x600)
483 # define EWOULDBLOCK WSAEWOULDBLOCK
484 # define EINPROGRESS WSAEINPROGRESS
485 # define EALREADY WSAEALREADY
486 # define ENOTSOCK WSAENOTSOCK
487 # define EDESTADDRREQ WSAEDESTADDRREQ
488 # define EMSGSIZE WSAEMSGSIZE
489 # define EPROTOTYPE WSAEPROTOTYPE
490 # define ENOPROTOOPT WSAENOPROTOOPT
491 # define EPROTONOSUPPORT WSAEPROTONOSUPPORT
492 # define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
493 # define EOPNOTSUPP WSAEOPNOTSUPP
494 # define EPFNOSUPPORT WSAEPFNOSUPPORT
495 # define EAFNOSUPPORT WSAEAFNOSUPPORT
496 # define EADDRINUSE WSAEADDRINUSE
497 # define EADDRNOTAVAIL WSAEADDRNOTAVAIL
498 # define ENETDOWN WSAENETDOWN
499 # define ENETUNREACH WSAENETUNREACH
500 # define ENETRESET WSAENETRESET
501 # define ECONNABORTED WSAECONNABORTED
502 # define ECONNRESET WSAECONNRESET
503 # define ENOBUFS WSAENOBUFS
504 # define EISCONN WSAEISCONN
505 # define ENOTCONN WSAENOTCONN
506 # define ESHUTDOWN WSAESHUTDOWN
507 # define ETOOMANYREFS WSAETOOMANYREFS
508 # define ETIMEDOUT WSAETIMEDOUT
509 # define ECONNREFUSED WSAECONNREFUSED
510 # define ELOOP WSAELOOP
511 # define ENAMETOOLONG WSAENAMETOOLONG
512 # define EHOSTDOWN WSAEHOSTDOWN
513 # define EHOSTUNREACH WSAEHOSTUNREACH
514 # define ENOTEMPTY WSAENOTEMPTY
515 # define EPROCLIM WSAEPROCLIM
516 # define EUSERS WSAEUSERS
517 # define EDQUOT WSAEDQUOT
518 # define ESTALE WSAESTALE
519 # define EREMOTE WSAEREMOTE
520 # endif /* (_WIN32_WCE) && (_WIN32_WCE < 0x600) */
521 # endif /* _WINSOCK2API */
523 # if defined (ACE_HAS_FORE_ATM_WS2)
524 # include /**/ <ws2atm.h>
525 # endif /*ACE_HAS_FORE_ATM_WS2 */
527 // CE doesn't have Microsoft Winsock 2 extensions
528 # if !defined _MSWSOCK_ && !defined (ACE_HAS_WINCE)
529 # include /**/ <mswsock.h>
530 # endif /* _MSWSOCK_ */
532 # if defined (_MSC_VER)
533 # if defined (ACE_HAS_WINCE)
534 # pragma comment(lib, "ws2.lib")
535 # else
536 # pragma comment(lib, "ws2_32.lib")
537 # pragma comment(lib, "mswsock.lib")
538 # if defined (ACE_HAS_IPV6)
539 # pragma comment(lib, "iphlpapi.lib")
540 # endif
541 # endif /* ACE_HAS_WINCE */
542 # endif /* _MSC_VER */
544 # define ACE_WSOCK_VERSION 2, 0
545 #else
546 # if !defined (_WINSOCKAPI_)
547 // will also include windows.h, if not present
548 # include /**/ <winsock.h>
549 # endif /* _WINSOCKAPI */
551 // PharLap ETS has its own winsock lib, so don't grab the one
552 // supplied with the OS.
553 # if defined (_MSC_VER) && !defined (_WIN32_WCE) && !defined (ACE_HAS_PHARLAP)
554 # pragma comment(lib, "wsock32.lib")
555 # endif /* _MSC_VER */
557 // We can't use recvmsg and sendmsg unless WinSock 2 is available
558 # define ACE_LACKS_RECVMSG
559 # define ACE_LACKS_SENDMSG
561 // Version 1.1 of WinSock
562 # define ACE_WSOCK_VERSION 1, 1
563 #endif /* ACE_HAS_WINSOCK2 */
565 #if _WIN32_WINNT < 0x600
566 # define ACE_LACKS_IF_NAMETOINDEX
567 #endif
568 #define ACE_LACKS_IF_NAMEINDEX
570 // Platform supports IP multicast on Winsock 2
571 #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
572 # define ACE_HAS_IP_MULTICAST
573 #endif /* ACE_HAS_WINSOCK2 */
575 #if !defined (ACE_HAS_WINCE)
576 # define ACE_HAS_INTERLOCKED_EXCHANGEADD
577 #endif
578 #define ACE_HAS_WIN32_TRYLOCK
580 #if !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP)
581 # define ACE_HAS_SIGNAL_OBJECT_AND_WAIT
583 // If CancelIO is undefined get the updated sp2-sdk from MS
584 # define ACE_HAS_CANCEL_IO
585 # define ACE_HAS_WIN32_OVERLAPPED_IO
586 # define ACE_HAS_WIN32_NAMED_PIPES
587 #endif /* !defined (ACE_HAS_WINCE) && !ACE_HAS_PHARLAP */
589 #if !defined (ACE_SEH_DEFAULT_EXCEPTION_HANDLING_ACTION)
590 # define ACE_SEH_DEFAULT_EXCEPTION_HANDLING_ACTION EXCEPTION_CONTINUE_SEARCH
591 #endif /* ACE_SEH_DEFAULT_EXCEPTION_HANDLING_ACTION */
593 // ACE_HAS_QOS is defined in the qos.mpb base project.
594 // If qos=1 in default.features, then this macro will be defined.
595 #if defined (ACE_HAS_QOS) && !defined (ACE_HAS_WINSOCK2_GQOS)
596 # if defined (WINSOCK_VERSION)
597 # define ACE_HAS_WINSOCK2_GQOS 1
598 # endif /* WINSOCK_VERSION */
599 #endif /* ACE_HAS_WINSOCK2_GQOS */
601 // These are the defaults and can be overridden by a user's config.h
602 #if !defined (ACE_DEFAULT_FILE_PERMS)
603 # define ACE_DEFAULT_FILE_PERMS (FILE_SHARE_READ | FILE_SHARE_WRITE | \
604 FILE_SHARE_DELETE)
605 // This alternate used to be used for pre-NT4 systems; may still be needed
606 // by knock-offs such as CE and Pharlap.
607 //# define ACE_DEFAULT_FILE_PERMS (FILE_SHARE_READ | FILE_SHARE_WRITE)
608 #endif /* !defined (ACE_DEFAULT_FILE_PERMS) */
610 #define ACE_SIZEOF_WCHAR 2
611 #define ACE_HAS_MUTEX_TIMEOUTS
612 #define ACE_LACKS_STRUCT_DIR
613 #define ACE_LACKS_OPENDIR
614 #define ACE_LACKS_CLOSEDIR
615 #define ACE_LACKS_READDIR
616 #define ACE_LACKS_ALPHASORT
617 #define ACE_LACKS_MKSTEMP
618 #define ACE_LACKS_LSTAT
619 // Looks like Win32 has a non-const swab function, and it takes the
620 // non-standard int len (rather than ssize_t).
621 #define ACE_HAS_NONCONST_SWAB
622 #define ACE_HAS_INT_SWAB
624 // gethostbyaddr does not handle IPv6-mapped-IPv4 addresses
625 #define ACE_HAS_BROKEN_GETHOSTBYADDR_V4MAPPED
627 #if defined (ACE_WIN64)
628 // Data must be aligned on 8-byte boundaries, at a minimum.
629 # define ACE_MALLOC_ALIGN 8
630 // Void pointers are 8 bytes
631 # define ACE_SIZEOF_VOID_P 8
632 #endif /* ACE_WIN64 */
634 #if !defined (ACE_DISABLES_THREAD_LIBRARY_CALLS)
635 # define ACE_DISABLES_THREAD_LIBRARY_CALLS 0
636 #endif /* ACE_DISABLES_THREAD_LIBRARY_CALLS */
638 #if !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP)
639 # define ACE_HAS_LOG_MSG_NT_EVENT_LOG
640 #endif /* !ACE_HAS_WINCE && !ACE_HAS_PHARLAP */
642 #if !defined (ACE_HAS_WINCE)
643 # define ACE_HAS_LLSEEK
644 #endif /* !ACE_HAS_WINCE */
646 // Needed for obtaining the MAC address
647 // I dont believe this will work under CE, notice the
648 // check for ACE_HAS_WINCE.
649 # if !defined (ACE_HAS_WINCE)
650 # include <nb30.h>
651 # if defined (_MSC_VER)
652 # pragma comment(lib, "netapi32.lib") // needed for obtaing MACaddress
653 # endif
654 # endif /* !ACE_HAS_WINCE */
656 #if !defined (WINVER)
657 # define WINVER 0x0400 // pretend it's at least WinNT 4.0
658 #endif
660 ///////////////////////////////////////
661 // windows version-specific definitions
662 // see: http://msdn2.microsoft.com/en-us/library/aa383745.aspx
664 // For TSS information
665 // see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/thread_local_storage.asp
667 #if (WINVER>=0x0600)
668 // Windows Server 2008 definitions go here
669 // Windows Vista definitions go here
670 # if ! defined(ACE_DEFAULT_THREAD_KEYS)
671 # define ACE_DEFAULT_THREAD_KEYS 1088
672 # endif // ! defined(ACE_DEFAULT_THREAD_KEYS)
673 #elif (WINVER>=0x0502)
674 // Windows Server 2003 SP1 definitions go here
675 # if ! defined(ACE_DEFAULT_THREAD_KEYS)
676 # define ACE_DEFAULT_THREAD_KEYS 1088
677 # endif // ! defined(ACE_DEFAULT_THREAD_KEYS)
678 #elif (WINVER>=0x0501)
679 // Windows XP definitions go here
680 # if ! defined(ACE_DEFAULT_THREAD_KEYS)
681 # define ACE_DEFAULT_THREAD_KEYS 1088
682 # endif // ! defined(ACE_DEFAULT_THREAD_KEYS)
683 #elif (WINVER>=0x0500)
684 // Windows 2000 definitions go here
685 # if ! defined(ACE_DEFAULT_THREAD_KEYS)
686 # define ACE_DEFAULT_THREAD_KEYS 1088
687 # endif // ! defined(ACE_DEFAULT_THREAD_KEYS)
688 #elif (WINVER>=0x0410)
689 // Windows 98 definitions go here
690 # if ! defined(ACE_DEFAULT_THREAD_KEYS)
691 # define ACE_DEFAULT_THREAD_KEYS 80
692 # endif // ! defined(ACE_DEFAULT_THREAD_KEYS)
693 #else
694 // antique windows
695 # if ! defined(ACE_DEFAULT_THREAD_KEYS)
696 # define ACE_DEFAULT_THREAD_KEYS 64
697 # endif // ! defined(ACE_DEFAULT_THREAD_KEYS)
698 #endif
700 #if !defined (ACE_DEFAULT_BACKLOG)
701 # define ACE_DEFAULT_BACKLOG SOMAXCONN
702 #endif /* ACE_DEFAULT_BACKLOG */
704 #include /**/ "ace/post.h"
705 #endif /* ACE_CONFIG_WIN32_COMMON_H */