OLD | NEW |
---|---|
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
81 // V8_OS_BSD - BSDish (Mac OS X, Net/Free/Open/DragonFlyBSD) | 81 // V8_OS_BSD - BSDish (Mac OS X, Net/Free/Open/DragonFlyBSD) |
82 // V8_OS_CYGWIN - Cygwin | 82 // V8_OS_CYGWIN - Cygwin |
83 // V8_OS_DRAGONFLYBSD - DragonFlyBSD | 83 // V8_OS_DRAGONFLYBSD - DragonFlyBSD |
84 // V8_OS_FREEBSD - FreeBSD | 84 // V8_OS_FREEBSD - FreeBSD |
85 // V8_OS_LINUX - Linux | 85 // V8_OS_LINUX - Linux |
86 // V8_OS_MACOSX - Mac OS X | 86 // V8_OS_MACOSX - Mac OS X |
87 // V8_OS_NACL - Native Client | 87 // V8_OS_NACL - Native Client |
88 // V8_OS_NETBSD - NetBSD | 88 // V8_OS_NETBSD - NetBSD |
89 // V8_OS_OPENBSD - OpenBSD | 89 // V8_OS_OPENBSD - OpenBSD |
90 // V8_OS_POSIX - POSIX compatible (mostly everything except Windows) | 90 // V8_OS_POSIX - POSIX compatible (mostly everything except Windows) |
91 // V8_OS_SOLARIS - Sun Solaris and OpenSolaris | 91 // V8_OS_SOLARIS - Sun Solaris and OpenSolaris |
Benedikt Meurer
2013/11/15 11:49:59
Add V8_OS_QNX here.
| |
92 // V8_OS_WIN - Microsoft Windows | 92 // V8_OS_WIN - Microsoft Windows |
93 | 93 |
94 #if defined(__ANDROID__) | 94 #if defined(__ANDROID__) |
95 # define V8_OS_ANDROID 1 | 95 # define V8_OS_ANDROID 1 |
96 # define V8_OS_LINUX 1 | 96 # define V8_OS_LINUX 1 |
97 # define V8_OS_POSIX 1 | 97 # define V8_OS_POSIX 1 |
98 #elif defined(__APPLE__) | 98 #elif defined(__APPLE__) |
99 # define V8_OS_BSD 1 | 99 # define V8_OS_BSD 1 |
100 # define V8_OS_MACOSX 1 | 100 # define V8_OS_MACOSX 1 |
101 # define V8_OS_POSIX 1 | 101 # define V8_OS_POSIX 1 |
(...skipping 18 matching lines...) Expand all Loading... | |
120 # define V8_OS_DRAGONFLYBSD 1 | 120 # define V8_OS_DRAGONFLYBSD 1 |
121 # define V8_OS_POSIX 1 | 121 # define V8_OS_POSIX 1 |
122 #elif defined(__NetBSD__) | 122 #elif defined(__NetBSD__) |
123 # define V8_OS_BSD 1 | 123 # define V8_OS_BSD 1 |
124 # define V8_OS_NETBSD 1 | 124 # define V8_OS_NETBSD 1 |
125 # define V8_OS_POSIX 1 | 125 # define V8_OS_POSIX 1 |
126 #elif defined(__OpenBSD__) | 126 #elif defined(__OpenBSD__) |
127 # define V8_OS_BSD 1 | 127 # define V8_OS_BSD 1 |
128 # define V8_OS_OPENBSD 1 | 128 # define V8_OS_OPENBSD 1 |
129 # define V8_OS_POSIX 1 | 129 # define V8_OS_POSIX 1 |
130 #elif defined(__QNXNTO__) | |
131 # define V8_OS_POSIX 1 | |
132 # define V8_OS_QNX 1 | |
130 #elif defined(_WIN32) | 133 #elif defined(_WIN32) |
131 # define V8_OS_WIN 1 | 134 # define V8_OS_WIN 1 |
132 #endif | 135 #endif |
133 | 136 |
134 | 137 |
135 // ----------------------------------------------------------------------------- | 138 // ----------------------------------------------------------------------------- |
136 // C library detection | 139 // C library detection |
137 // | 140 // |
138 // V8_LIBC_BIONIC - Bionic libc | 141 // V8_LIBC_BIONIC - Bionic libc |
139 // V8_LIBC_BSD - BSD libc derivate | 142 // V8_LIBC_BSD - BSD libc derivate |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
458 # define V8_ALIGNOF(type) __alignof__(type) | 461 # define V8_ALIGNOF(type) __alignof__(type) |
459 #else | 462 #else |
460 // Note that alignment of a type within a struct can be less than the | 463 // Note that alignment of a type within a struct can be less than the |
461 // alignment of the type stand-alone (because of ancient ABIs), so this | 464 // alignment of the type stand-alone (because of ancient ABIs), so this |
462 // should only be used as a last resort. | 465 // should only be used as a last resort. |
463 namespace v8 { template <typename T> class AlignOfHelper { char c; T t; }; } | 466 namespace v8 { template <typename T> class AlignOfHelper { char c; T t; }; } |
464 # define V8_ALIGNOF(type) (sizeof(::v8::AlignOfHelper<type>) - sizeof(type)) | 467 # define V8_ALIGNOF(type) (sizeof(::v8::AlignOfHelper<type>) - sizeof(type)) |
465 #endif | 468 #endif |
466 | 469 |
467 #endif // V8CONFIG_H_ | 470 #endif // V8CONFIG_H_ |
OLD | NEW |