v8  3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
win32-headers.h
Go to the documentation of this file.
1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are
4 // met:
5 //
6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided
11 // with the distribution.
12 // * Neither the name of Google Inc. nor the names of its
13 // contributors may be used to endorse or promote products derived
14 // from this software without specific prior written permission.
15 //
16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 
28 #ifndef V8_WIN32_HEADERS_H_
29 #define V8_WIN32_HEADERS_H_
30 
31 #ifndef WIN32_LEAN_AND_MEAN
32 // WIN32_LEAN_AND_MEAN implies NOCRYPT and NOGDI.
33 #define WIN32_LEAN_AND_MEAN
34 #endif
35 #ifndef NOMINMAX
36 #define NOMINMAX
37 #endif
38 #ifndef NOKERNEL
39 #define NOKERNEL
40 #endif
41 #ifndef NOUSER
42 #define NOUSER
43 #endif
44 #ifndef NOSERVICE
45 #define NOSERVICE
46 #endif
47 #ifndef NOSOUND
48 #define NOSOUND
49 #endif
50 #ifndef NOMCX
51 #define NOMCX
52 #endif
53 // Require Windows XP or higher (this is required for the RtlCaptureContext
54 // function to be present).
55 #ifndef _WIN32_WINNT
56 #define _WIN32_WINNT 0x501
57 #endif
58 
59 #include <windows.h>
60 
61 #include <signal.h> // For raise().
62 #include <time.h> // For LocalOffset() implementation.
63 #include <mmsystem.h> // For timeGetTime().
64 #ifdef __MINGW32__
65 // Require Windows XP or higher when compiling with MinGW. This is for MinGW
66 // header files to expose getaddrinfo.
67 #undef _WIN32_WINNT
68 #define _WIN32_WINNT 0x501
69 #endif // __MINGW32__
70 #if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
71 #include <dbghelp.h> // For SymLoadModule64 and al.
72 #include <errno.h> // For STRUNCATE
73 #endif // !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
74 #include <limits.h> // For INT_MAX and al.
75 #include <tlhelp32.h> // For Module32First and al.
76 
77 // These additional WIN32 includes have to be right here as the #undef's below
78 // makes it impossible to have them elsewhere.
79 #include <winsock2.h>
80 #include <ws2tcpip.h>
81 #ifndef __MINGW32__
82 #include <wspiapi.h>
83 #endif // __MINGW32__
84 #include <process.h> // For _beginthreadex().
85 #include <stdlib.h>
86 
87 #undef VOID
88 #undef DELETE
89 #undef IN
90 #undef THIS
91 #undef CONST
92 #undef NAN
93 #undef UNKNOWN
94 #undef NONE
95 #undef ANY
96 #undef IGNORE
97 #undef STRICT
98 #undef GetObject
99 #undef CreateSemaphore
100 #undef Yield
101 
102 #endif // V8_WIN32_HEADERS_H_