| 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 24 matching lines...) Expand all Loading... |
| 35 // for example clang and the Intel C++ compiler for Linux. | 35 // for example clang and the Intel C++ compiler for Linux. |
| 36 // Use like: | 36 // Use like: |
| 37 // #if V8_GNUC_PREREQ(4, 3, 1) | 37 // #if V8_GNUC_PREREQ(4, 3, 1) |
| 38 // ... | 38 // ... |
| 39 // #endif | 39 // #endif |
| 40 #if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) | 40 #if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) |
| 41 # define V8_GNUC_PREREQ(major, minor, patchlevel) \ | 41 # define V8_GNUC_PREREQ(major, minor, patchlevel) \ |
| 42 ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= \ | 42 ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= \ |
| 43 ((major) * 10000 + (minor) * 100 + (patchlevel))) | 43 ((major) * 10000 + (minor) * 100 + (patchlevel))) |
| 44 #elif defined(__GNUC__) && defined(__GNUC_MINOR__) | 44 #elif defined(__GNUC__) && defined(__GNUC_MINOR__) |
| 45 # define V8_GNUC_PREREQ(major, minor, patchlevel) \ | 45 # define V8_GNUC_PREREQ(major, minor, patchlevel) \ |
| 46 ((__GNUC__ * 10000 + __GNUC_MINOR__) >= \ | 46 ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= \ |
| 47 ((major) * 10000 + (minor) * 100 + (patchlevel))) | 47 ((major) * 10000 + (minor) * 100 + (patchlevel))) |
| 48 #else | 48 #else |
| 49 # define V8_GNUC_PREREQ(major, minor, patchlevel) 0 | 49 # define V8_GNUC_PREREQ(major, minor, patchlevel) 0 |
| 50 #endif | 50 #endif |
| 51 | 51 |
| 52 | 52 |
| 53 | 53 |
| 54 // ----------------------------------------------------------------------------- | 54 // ----------------------------------------------------------------------------- |
| 55 // Operating system detection | 55 // Operating system detection |
| 56 // | 56 // |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 // Annotate a function indicating the caller must examine the return value. | 428 // Annotate a function indicating the caller must examine the return value. |
| 429 // Use like: | 429 // Use like: |
| 430 // int foo() WARN_UNUSED_RESULT; | 430 // int foo() WARN_UNUSED_RESULT; |
| 431 #if V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT | 431 #if V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT |
| 432 #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) | 432 #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) |
| 433 #else | 433 #else |
| 434 #define V8_WARN_UNUSED_RESULT /* NOT SUPPORTED */ | 434 #define V8_WARN_UNUSED_RESULT /* NOT SUPPORTED */ |
| 435 #endif | 435 #endif |
| 436 | 436 |
| 437 #endif // V8CONFIG_H_ | 437 #endif // V8CONFIG_H_ |
| OLD | NEW |