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