History

macos: add darwin OS detection.

Christian Jullien committed 6 years ago

Commit c6935661 parent a3d1e9c1 file · +7 −4Browse files

Unified · Split

conftest.c+7−4
@@ -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 _WIN3227#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#endif33#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;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t