• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef V8_BASE_WIN32_HEADERS_H_
6 #define V8_BASE_WIN32_HEADERS_H_
7 
8 #ifndef WIN32_LEAN_AND_MEAN
9 // WIN32_LEAN_AND_MEAN implies NOCRYPT and NOGDI.
10 #define WIN32_LEAN_AND_MEAN
11 #endif
12 #ifndef NOMINMAX
13 #define NOMINMAX
14 #endif
15 #ifndef NOKERNEL
16 #define NOKERNEL
17 #endif
18 #ifndef NOUSER
19 #define NOUSER
20 #endif
21 #ifndef NOSERVICE
22 #define NOSERVICE
23 #endif
24 #ifndef NOSOUND
25 #define NOSOUND
26 #endif
27 #ifndef NOMCX
28 #define NOMCX
29 #endif
30 // Require Windows Vista or higher (this is required for the
31 // QueryThreadCycleTime function to be present).
32 #ifndef _WIN32_WINNT
33 #define _WIN32_WINNT 0x0600
34 #endif
35 
36 #include <windows.h>
37 
38 #include <mmsystem.h>  // For timeGetTime().
39 #include <signal.h>  // For raise().
40 #include <time.h>  // For LocalOffset() implementation.
41 #ifdef __MINGW32__
42 // Require Windows XP or higher when compiling with MinGW. This is for MinGW
43 // header files to expose getaddrinfo.
44 #undef _WIN32_WINNT
45 #define _WIN32_WINNT 0x501
46 #endif  // __MINGW32__
47 #if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
48 #include <dbghelp.h>         // For SymLoadModule64 and al.
49 #include <errno.h>           // For STRUNCATE
50 #include <versionhelpers.h>  // For IsWindows8OrGreater().
51 #endif  // !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
52 #include <limits.h>  // For INT_MAX and al.
53 #include <tlhelp32.h>  // For Module32First and al.
54 
55 // These additional WIN32 includes have to be right here as the #undef's below
56 // makes it impossible to have them elsewhere.
57 #include <winsock2.h>
58 #include <ws2tcpip.h>
59 #ifndef __MINGW32__
60 #include <wspiapi.h>
61 #endif  // __MINGW32__
62 #include <process.h>  // For _beginthreadex().
63 #include <stdlib.h>
64 
65 #undef VOID
66 #undef DELETE
67 #undef IN
68 #undef THIS
69 #undef CONST
70 #undef NAN
71 #undef UNKNOWN
72 #undef NONE
73 #undef ANY
74 #undef IGNORE
75 #undef STRICT
76 #undef GetObject
77 #undef CreateSemaphore
78 #undef Yield
79 #undef RotateRight32
80 #undef RotateLeft32
81 #undef RotateRight64
82 #undef RotateLeft64
83 
84 #endif  // V8_BASE_WIN32_HEADERS_H_
85