Unified · Split
| @@ -24,8 +24,10 @@ · 23 unmodified lines | |||
| 24 | # define TRIPLET_OS "linux" | 24 | # define TRIPLET_OS "linux" |
| 25 | #elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__) | 25 | #elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__) |
| 26 | # define TRIPLET_OS "kfreebsd" | 26 | # define TRIPLET_OS "kfreebsd" |
| 27 | #elif defined _WIN32 | 27 | #elif defined(_WIN32) |
| 28 | # define TRIPLET_OS "win32" | 28 | # define TRIPLET_OS "win32" |
| 29 | #elif defined(__APPLE__) | ||
| 30 | # define TRIPLET_OS "darwin" | ||
| 29 | #elif !defined (__GNU__) | 31 | #elif !defined (__GNU__) |
| 30 | # define TRIPLET_OS "unknown" | 32 | # define TRIPLET_OS "unknown" |
| 31 | #endif | 33 | #endif |
| @@ -65,21 +67,22 @@ int main(int argc, char *argv[]) · 33 unmodified lines | |||
| 65 | puts(*(unsigned char*)&foo == 0x67 ? "no" : "yes"); | 67 | puts(*(unsigned char*)&foo == 0x67 ? "no" : "yes"); |
| 66 | break; | 68 | break; |
| 67 | } | 69 | } |
| 68 | #ifdef __clang__ | 70 | #if defined(__clang__) |
| 69 | case 'm': | 71 | case 'm': |
| 70 | printf("%d\n", __clang_minor__); | 72 | printf("%d\n", __clang_minor__); |
| 71 | break; | 73 | break; |
| 72 | case 'v': | 74 | case 'v': |
| 73 | printf("%d\n", __clang_major__); | 75 | printf("%d\n", __clang_major__); |
| 74 | break; | 76 | break; |
| 75 | #elif defined __TINYC__ | 77 | #elif defined(__TINYC__) |
| 76 | case 'v': | 78 | case 'v': |
| 77 | puts("0"); | 79 | puts("0"); |
| 78 | break; | 80 | break; |
| 79 | case 'm': | 81 | case 'm': |
| 80 | printf("%d\n", __TINYC__); | 82 | printf("%d\n", __TINYC__); |
| 81 | break; | 83 | break; |
| 82 | #elif defined( __GNUC__) && defined(__GNUC_MINOR__) | 84 | #elif defined(__GNUC__) && defined(__GNUC_MINOR__) |
| 85 | /* GNU comes last as other compilers may add 'GNU' compatibility */ | ||
| 83 | case 'm': | 86 | case 'm': |
| 84 | printf("%d\n", __GNUC_MINOR__); | 87 | printf("%d\n", __GNUC_MINOR__); |
| 85 | break; | 88 | break; |