| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8CONFIG_H_ | 5 #ifndef V8CONFIG_H_ |
| 6 #define V8CONFIG_H_ | 6 #define V8CONFIG_H_ |
| 7 | 7 |
| 8 // Platform headers for feature detection below. | 8 // Platform headers for feature detection below. |
| 9 #if defined(__ANDROID__) | 9 #if defined(__ANDROID__) |
| 10 # include <sys/cdefs.h> | 10 # include <sys/cdefs.h> |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // V8_OS_DRAGONFLYBSD - DragonFlyBSD | 60 // V8_OS_DRAGONFLYBSD - DragonFlyBSD |
| 61 // V8_OS_FREEBSD - FreeBSD | 61 // V8_OS_FREEBSD - FreeBSD |
| 62 // V8_OS_LINUX - Linux | 62 // V8_OS_LINUX - Linux |
| 63 // V8_OS_MACOSX - Mac OS X | 63 // V8_OS_MACOSX - Mac OS X |
| 64 // V8_OS_NACL - Native Client | 64 // V8_OS_NACL - Native Client |
| 65 // V8_OS_NETBSD - NetBSD | 65 // V8_OS_NETBSD - NetBSD |
| 66 // V8_OS_OPENBSD - OpenBSD | 66 // V8_OS_OPENBSD - OpenBSD |
| 67 // V8_OS_POSIX - POSIX compatible (mostly everything except Windows) | 67 // V8_OS_POSIX - POSIX compatible (mostly everything except Windows) |
| 68 // V8_OS_QNX - QNX Neutrino | 68 // V8_OS_QNX - QNX Neutrino |
| 69 // V8_OS_SOLARIS - Sun Solaris and OpenSolaris | 69 // V8_OS_SOLARIS - Sun Solaris and OpenSolaris |
| 70 // V8_OS_AIX - AIX |
| 70 // V8_OS_WIN - Microsoft Windows | 71 // V8_OS_WIN - Microsoft Windows |
| 71 | 72 |
| 72 #if defined(__ANDROID__) | 73 #if defined(__ANDROID__) |
| 73 # define V8_OS_ANDROID 1 | 74 # define V8_OS_ANDROID 1 |
| 74 # define V8_OS_LINUX 1 | 75 # define V8_OS_LINUX 1 |
| 75 # define V8_OS_POSIX 1 | 76 # define V8_OS_POSIX 1 |
| 76 #elif defined(__APPLE__) | 77 #elif defined(__APPLE__) |
| 77 # define V8_OS_BSD 1 | 78 # define V8_OS_BSD 1 |
| 78 # define V8_OS_MACOSX 1 | 79 # define V8_OS_MACOSX 1 |
| 79 # define V8_OS_POSIX 1 | 80 # define V8_OS_POSIX 1 |
| 80 #elif defined(__native_client__) | 81 #elif defined(__native_client__) |
| 81 # define V8_OS_NACL 1 | 82 # define V8_OS_NACL 1 |
| 82 # define V8_OS_POSIX 1 | 83 # define V8_OS_POSIX 1 |
| 83 #elif defined(__CYGWIN__) | 84 #elif defined(__CYGWIN__) |
| 84 # define V8_OS_CYGWIN 1 | 85 # define V8_OS_CYGWIN 1 |
| 85 # define V8_OS_POSIX 1 | 86 # define V8_OS_POSIX 1 |
| 86 #elif defined(__linux__) | 87 #elif defined(__linux__) |
| 87 # define V8_OS_LINUX 1 | 88 # define V8_OS_LINUX 1 |
| 88 # define V8_OS_POSIX 1 | 89 # define V8_OS_POSIX 1 |
| 89 #elif defined(__sun) | 90 #elif defined(__sun) |
| 90 # define V8_OS_POSIX 1 | 91 # define V8_OS_POSIX 1 |
| 91 # define V8_OS_SOLARIS 1 | 92 # define V8_OS_SOLARIS 1 |
| 93 #elif defined(_AIX) |
| 94 #define V8_OS_POSIX 1 |
| 95 #define V8_OS_AIX 1 |
| 92 #elif defined(__FreeBSD__) | 96 #elif defined(__FreeBSD__) |
| 93 # define V8_OS_BSD 1 | 97 # define V8_OS_BSD 1 |
| 94 # define V8_OS_FREEBSD 1 | 98 # define V8_OS_FREEBSD 1 |
| 95 # define V8_OS_POSIX 1 | 99 # define V8_OS_POSIX 1 |
| 96 #elif defined(__DragonFly__) | 100 #elif defined(__DragonFly__) |
| 97 # define V8_OS_BSD 1 | 101 # define V8_OS_BSD 1 |
| 98 # define V8_OS_DRAGONFLYBSD 1 | 102 # define V8_OS_DRAGONFLYBSD 1 |
| 99 # define V8_OS_POSIX 1 | 103 # define V8_OS_POSIX 1 |
| 100 #elif defined(__NetBSD__) | 104 #elif defined(__NetBSD__) |
| 101 # define V8_OS_BSD 1 | 105 # define V8_OS_BSD 1 |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 # define V8_ALIGNOF(type) __alignof__(type) | 413 # define V8_ALIGNOF(type) __alignof__(type) |
| 410 #else | 414 #else |
| 411 // Note that alignment of a type within a struct can be less than the | 415 // Note that alignment of a type within a struct can be less than the |
| 412 // alignment of the type stand-alone (because of ancient ABIs), so this | 416 // alignment of the type stand-alone (because of ancient ABIs), so this |
| 413 // should only be used as a last resort. | 417 // should only be used as a last resort. |
| 414 namespace v8 { template <typename T> class AlignOfHelper { char c; T t; }; } | 418 namespace v8 { template <typename T> class AlignOfHelper { char c; T t; }; } |
| 415 # define V8_ALIGNOF(type) (sizeof(::v8::AlignOfHelper<type>) - sizeof(type)) | 419 # define V8_ALIGNOF(type) (sizeof(::v8::AlignOfHelper<type>) - sizeof(type)) |
| 416 #endif | 420 #endif |
| 417 | 421 |
| 418 #endif // V8CONFIG_H_ | 422 #endif // V8CONFIG_H_ |
| OLD | NEW |