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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 # define V8_OS_POSIX 1 | 132 # define V8_OS_POSIX 1 |
133 # define V8_OS_QNX 1 | 133 # define V8_OS_QNX 1 |
134 #elif defined(_WIN32) | 134 #elif defined(_WIN32) |
135 # define V8_OS_WIN 1 | 135 # define V8_OS_WIN 1 |
136 #endif | 136 #endif |
137 | 137 |
138 | 138 |
139 // ----------------------------------------------------------------------------- | 139 // ----------------------------------------------------------------------------- |
140 // C library detection | 140 // C library detection |
141 // | 141 // |
| 142 // V8_LIBC_MSVCRT - MSVC libc |
142 // V8_LIBC_BIONIC - Bionic libc | 143 // V8_LIBC_BIONIC - Bionic libc |
143 // V8_LIBC_BSD - BSD libc derivate | 144 // V8_LIBC_BSD - BSD libc derivate |
144 // V8_LIBC_GLIBC - GNU C library | 145 // V8_LIBC_GLIBC - GNU C library |
145 // V8_LIBC_UCLIBC - uClibc | 146 // V8_LIBC_UCLIBC - uClibc |
146 // | 147 // |
147 // Note that testing for libc must be done using #if not #ifdef. For example, | 148 // Note that testing for libc must be done using #if not #ifdef. For example, |
148 // to test for the GNU C library, use: | 149 // to test for the GNU C library, use: |
149 // #if V8_LIBC_GLIBC | 150 // #if V8_LIBC_GLIBC |
150 // ... | 151 // ... |
151 // #endif | 152 // #endif |
152 | 153 |
153 #if defined(__BIONIC__) | 154 #if defined (_MSC_VER) |
| 155 # define V8_LIBC_MSVCRT 1 |
| 156 #elif defined(__BIONIC__) |
154 # define V8_LIBC_BIONIC 1 | 157 # define V8_LIBC_BIONIC 1 |
155 # define V8_LIBC_BSD 1 | 158 # define V8_LIBC_BSD 1 |
156 #elif defined(__UCLIBC__) | 159 #elif defined(__UCLIBC__) |
157 # define V8_LIBC_UCLIBC 1 | 160 # define V8_LIBC_UCLIBC 1 |
158 #elif defined(__GLIBC__) || defined(__GNU_LIBRARY__) | 161 #elif defined(__GLIBC__) || defined(__GNU_LIBRARY__) |
159 # define V8_LIBC_GLIBC 1 | 162 # define V8_LIBC_GLIBC 1 |
160 #else | 163 #else |
161 # define V8_LIBC_BSD V8_OS_BSD | 164 # define V8_LIBC_BSD V8_OS_BSD |
162 #endif | 165 #endif |
163 | 166 |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 # define V8_ALIGNOF(type) __alignof__(type) | 465 # define V8_ALIGNOF(type) __alignof__(type) |
463 #else | 466 #else |
464 // Note that alignment of a type within a struct can be less than the | 467 // Note that alignment of a type within a struct can be less than the |
465 // alignment of the type stand-alone (because of ancient ABIs), so this | 468 // alignment of the type stand-alone (because of ancient ABIs), so this |
466 // should only be used as a last resort. | 469 // should only be used as a last resort. |
467 namespace v8 { template <typename T> class AlignOfHelper { char c; T t; }; } | 470 namespace v8 { template <typename T> class AlignOfHelper { char c; T t; }; } |
468 # define V8_ALIGNOF(type) (sizeof(::v8::AlignOfHelper<type>) - sizeof(type)) | 471 # define V8_ALIGNOF(type) (sizeof(::v8::AlignOfHelper<type>) - sizeof(type)) |
469 #endif | 472 #endif |
470 | 473 |
471 #endif // V8CONFIG_H_ | 474 #endif // V8CONFIG_H_ |
OLD | NEW |