{"id":72,"date":"2017-06-21T20:38:03","date_gmt":"2017-06-21T12:38:03","guid":{"rendered":"http:\/\/49.232.131.197\/?p=72"},"modified":"2017-06-25T00:23:59","modified_gmt":"2017-06-24T16:23:59","slug":"cc","status":"publish","type":"post","link":"http:\/\/www.sourcecool.com\/index.php\/2017\/06\/21\/cc\/","title":{"rendered":"C\/C++\u8de8\u5e73\u53f0\u7684\u7684\u9884\u7f16\u8bd1\u5b8f"},"content":{"rendered":"<p>\u6211\u4eec\u5728\u7f16\u8bd1\u4e00\u4e9b\u8de8\u5e73\u53f0\u7684\u7a0b\u5e8f\u7684\u65f6\u5019\u96be\u514d\u4f1a\u9047\u5230_WIN32 \u00a0__linux__\u4ec0\u4e48\u4e4b\u7c7b\u7684SDK\u6216\u8005\u7f16\u8bd1\u5668\u73af\u5883\u9884\u5b9a\u4e49\u7684\u5b8f\u3002\u6709\u5f88\u591a\uff0c\u4e4b\u524d\u8fd8\u5206\u4e0d\u6e05_WIN32 \u548cWIN32\u7684\u533a\u522b\u3002\u4e0d\u8fc7\u8fd9\u91cc\u8fd8\u597d\u6709\u4e2a\u5217\u8868\uff0c\u505a\u4e2a\u5907\u5fd8\u3002<\/p>\n<p>&nbsp;<\/p>\n<div>\n<p>Please send updates\/corrections to\u00a0<a href=\"mailto:predef-contribute@lists.sourceforge.net\" target=\"_blank\" rel=\"noopener noreferrer\">predef-contribute<\/a>.<\/p>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/AIX_operating_system\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">AIX<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>_AIX<\/code><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>_AIX'VR'<\/code><\/td>\n<td>V = Version<br \/>\nR = Revision<\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__TOS_AIX__<\/code><\/td>\n<td>Defined by xlC<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>Example<\/h5>\n<p>If\u00a0<code>_AIX<\/code>\u00a0is defined, then the following macros can be used to determine the version. Notice that the macros indicates the mentioned version or higher. For example, if\u00a0<code>_AIX43<\/code>\u00a0is defined, then\u00a0<code>_AIX41<\/code>\u00a0will also be defined.<\/p>\n<table>\n<thead>\n<tr>\n<th>AIX Version<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>3.2.x<\/td>\n<td><code>_AIX3<\/code><br \/>\n<code>_AIX32<\/code><\/td>\n<\/tr>\n<tr>\n<td>4.1<\/td>\n<td><code>_AIX41<\/code><\/td>\n<\/tr>\n<tr>\n<td>4.3<\/td>\n<td><code>_AIX43<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Android_%28operating_system%29\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Android<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Format<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__ANDROID__<\/code><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>__ANDROID_API__<\/code><\/td>\n<td>V<\/td>\n<td>V = API Version<\/p>\n<p>Must be included from\u00a0<code>&lt;android\/api-level.h&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Notice that Android is based on Linux, and that the Linux macros also are defined for Android.<\/p>\n<h5>Example<\/h5>\n<table>\n<thead>\n<tr>\n<th>Android Version<\/th>\n<th><code>__ANDROID_API__<\/code><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1.0<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>1.1<\/td>\n<td>2<\/td>\n<\/tr>\n<tr>\n<td>1.5<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>1.6<\/td>\n<td>4<\/td>\n<\/tr>\n<tr>\n<td>2.0<\/td>\n<td>5<\/td>\n<\/tr>\n<tr>\n<td>2.0.1<\/td>\n<td>6<\/td>\n<\/tr>\n<tr>\n<td>2.1<\/td>\n<td>7<\/td>\n<\/tr>\n<tr>\n<td>2.2<\/td>\n<td>8<\/td>\n<\/tr>\n<tr>\n<td>2.3<\/td>\n<td>9<\/td>\n<\/tr>\n<tr>\n<td>2.3.3<\/td>\n<td>10<\/td>\n<\/tr>\n<tr>\n<td>3.0<\/td>\n<td>11<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/UTS_%28Mainframe_UNIX%29\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Amdahl UTS<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>UTS<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/AmigaOS\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">AmigaOS<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>AMIGA<\/code><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__amigaos__<\/code><\/td>\n<td>Defined by GNU C<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Domain\/OS\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Apollo AEGIS<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>aegis<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Domain\/OS\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Apollo Domain\/OS<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>apollo<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Bada_%28operating_system%29\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Bada<\/a><\/h2>\n<p>Based on Nucleus OS.<\/p>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/BeOS\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">BeOS<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__BEOS__<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Bluegene\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Blue Gene<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__bg__<\/code><\/td>\n<td>All Blue Gene systems<\/p>\n<p>Defined by XL C\/C++ and GNU C<\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>__bgq__<\/code><\/td>\n<td>Blue Gene\/Q<\/p>\n<p>Defined for XL C\/C++ and GNU C<\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__THW_BLUEGENE__<\/code><\/td>\n<td>All Blue Gene systems<\/p>\n<p>Defined by XL C\/C++<\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>__TOS_BGQ__<\/code><\/td>\n<td>Blue Gene\/Q<\/p>\n<p>Defined by XL C\/C++<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Bsd\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">BSD Environment<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Format<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__FreeBSD__<\/code><br \/>\n<code>__NetBSD__<\/code><br \/>\n<code>__OpenBSD__<\/code><br \/>\n<code>__bsdi__<\/code><br \/>\n<code>__DragonFly__<\/code><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>BSD<\/code><\/td>\n<td>YYYYMM<\/td>\n<td>YYYY = Year<br \/>\nMM = MonthMust be included from\u00a0<code>&lt;sys\/param.h&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>BSD4_2<\/code><br \/>\n<code>BSD4_3<\/code><br \/>\n<code>BSD4_4<\/code><\/td>\n<td><\/td>\n<td>Must be included from\u00a0<code>&lt;sys\/param.h&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>_SYSTYPE_BSD<\/code><\/td>\n<td><\/td>\n<td>Defined by DEC C<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>Example<\/h5>\n<table>\n<thead>\n<tr>\n<th>Version<\/th>\n<th><code>BSD<\/code><\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>4.3 Net2<\/td>\n<td>199103<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>4.4<\/td>\n<td>199306<\/td>\n<td><code>BSD4_4<\/code><\/td>\n<\/tr>\n<tr>\n<td>4.4BSD-Lite2<\/td>\n<td>199506<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/BSD\/OS\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">BSD\/OS<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__bsdi__<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Convex_Computer\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">ConvexOS<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__convex__<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Cygwin\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Cygwin Environment<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__CYGWIN__<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Data_General\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">DG\/UX<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>DGUX<\/code><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__DGUX__<\/code><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__dgux__<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/DragonFly_BSD\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">DragonFly<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__DragonFly__<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Dynix\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">DYNIX\/ptx<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>_SEQUENT_<\/code><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>sequent<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/ECos\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">eCos<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__ECOS<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/EMX_%28programming_environment%29\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">EMX Environment<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__EMX__<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Freebsd\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">FreeBSD<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Format<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__FreeBSD__<\/code><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__FreeBSD_kernel__<\/code><\/td>\n<td><\/td>\n<td>From FreeBSD 8.3, 9.1, and 10.0.<a href=\"http:\/\/svnweb.freebsd.org\/base\/head\/sys\/sys\/param.h?view=markup\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">1<\/a><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>BSD<\/code><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>__FreeBSD__<\/code><\/td>\n<td>V<\/td>\n<td>V = Version<\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>__FreeBSD_version<\/code><\/td>\n<td>?<\/td>\n<td>Must be included from\u00a0<code>&lt;osreldate.h&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>Example<\/h5>\n<table>\n<thead>\n<tr>\n<th>FreeBSD<\/th>\n<th><code>__FreeBSD__<\/code><\/th>\n<th><code>__FreeBSD_version<\/code><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1.x<\/td>\n<td>1<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>2.0-RELEASE<\/td>\n<td>2<\/td>\n<td>119411<\/td>\n<\/tr>\n<tr>\n<td>2.2-RELEASE<\/td>\n<td>2<\/td>\n<td>220000<\/td>\n<\/tr>\n<tr>\n<td>3.0-RELEASE<\/td>\n<td>3<\/td>\n<td>300005<\/td>\n<\/tr>\n<tr>\n<td>4.0-RELEASE<\/td>\n<td>4<\/td>\n<td>400017<\/td>\n<\/tr>\n<tr>\n<td>4.5-RELEASE<\/td>\n<td>4<\/td>\n<td>450000<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>For more information see the\u00a0<a href=\"http:\/\/www.freebsd.org\/doc\/en_US.ISO8859-1\/books\/porters-handbook\/freebsd-versions.html\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">FreeBSD porters handbook<\/a>.<\/p>\n<h2>GNU aka\u00a0<a href=\"http:\/\/en.wikipedia.org\/wiki\/GNU\/Hurd\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">GNU\/Hurd<\/a><\/h2>\n<p>The official name of this operating system is GNU. Hurd is the kernel in the GNU operating system. It is often listed as GNU\/Hurd since there is also GNU\/Linux and GNU\/kFreeBSD, which are most of the GNU operating system with the Linux and FreeBSD kernels respectively.<\/p>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__GNU__<\/code>\u00a0<a href=\"http:\/\/gcc.gnu.org\/viewcvs\/trunk\/gcc\/config\/gnu.h?view=markup\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">1<\/a><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__gnu_hurd__<\/code>\u00a0<a href=\"http:\/\/gcc.gnu.org\/viewcvs\/trunk\/gcc\/config\/gnu.h?view=markup\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">1<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/GNU\/kFreeBSD\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">GNU\/kFreeBSD<\/a><\/h2>\n<p>GNU\/kFreeBSD is one of the Debian distros that is based on the FreeBSD kernel rather than the Linux or Hurd kernels.<\/p>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__FreeBSD_kernel__<\/code>\u00a0<code>&amp;&amp;<\/code>\u00a0<code>__GLIBC__<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Notice that FreeBSD also defines\u00a0<code>__FreeBSD_kernel__<\/code>\u00a0so the\u00a0<code>__GLIBC__<\/code>\u00a0macro must be checked to distinguish it.<\/p>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/GNU\/Linux\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">GNU\/Linux<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__gnu_linux__<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/HI-UX\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">HI-UX MPP<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__hiuxmpp<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/HP-UX\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">HP-UX<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>_hpux<\/code><\/td>\n<td>Defined by HP UPC<\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>hpux<\/code><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__hpux<\/code><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/IBM_i\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">IBM OS\/400<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__OS400__<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Integrity_%28operating_system%29\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">INTEGRITY<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__INTEGRITY<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Interix\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Interix Environment<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__INTERIX<\/code><\/td>\n<td>Defined by GNU C and Visual Studio<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Irix\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">IRIX<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>sgi<\/code><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__sgi<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Linux_kernel\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Linux kernel<\/a><\/h2>\n<p>Systems based on the Linux kernel define these macros. There are two major Linux-based operating systems:\u00a0<a href=\"http:\/\/en.wikipedia.org\/wiki\/GNU\/Linux\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">GNU\/Linux<\/a>\u00a0and<a href=\"http:\/\/en.wikipedia.org\/wiki\/Android\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Android<\/a>, and numerous others like\u00a0<a href=\"http:\/\/www.angstrom-distribution.org\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\u00c5ngstr\u00f6m<\/a>\u00a0or\u00a0<a href=\"http:\/\/www.openembedded.org\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">OpenEmbedded<\/a><\/p>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__linux__<\/code><\/td>\n<td><a href=\"http:\/\/www.faqs.org\/docs\/Linux-HOWTO\/GCC-HOWTO.html#INDEX.25\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">1<\/a><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>linux<\/code><\/td>\n<td>Obsolete (not POSIX compliant)<\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__linux<\/code><\/td>\n<td>Obsolete (not POSIX compliant)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/LynxOS\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">LynxOS<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__Lynx__<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Mac_OS\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">MacOS<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>macintosh<\/code><\/td>\n<td>Mac OS 9<\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>Macintosh<\/code><\/td>\n<td>Mac OS 9<\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__APPLE__<\/code>\u00a0<code>&amp;&amp;<\/code>\u00a0<code>__MACH__<\/code><\/td>\n<td>Mac OS X<\/p>\n<p>Defined by GNU C and Intel C++<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/OS-9\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Microware OS-9<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__OS9000<\/code><\/td>\n<td>Defined by Ultimate C\/C++<\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>_OSK<\/code><\/td>\n<td>Defined by Ultimate C\/C++<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Minix\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">MINIX<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__minix<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Morphos\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">MorphOS<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__MORPHOS__<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/MPE\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">MPE\/iX<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>mpeix<\/code><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__mpexl<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/MS-DOS\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">MSDOS<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>MSDOS<\/code><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__MSDOS__<\/code><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>_MSDOS<\/code><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__DOS__<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Netbsd\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">NetBSD<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Format<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__NetBSD__<\/code><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>BSD<\/code><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>NetBSD'V'_'R'<\/code><\/td>\n<td><\/td>\n<td>V = Version<br \/>\nR = RevisionMust be included from\u00a0<code>&lt;sys\/param.h&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>__NetBSD_Version__<\/code><\/td>\n<td>VVRRAAPP00<\/td>\n<td>VV = Version<br \/>\nRR = Revision<br \/>\nAA = Release<br \/>\nPP = PatchFrom NetBSD 1.2D (?) until NetBSD 2.0HMust be included from\u00a0<code>&lt;sys\/param.h&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>__NetBSD_Version__<\/code><\/td>\n<td>VVRR00PP00<\/td>\n<td>VV = Version<br \/>\nRR = Revision<br \/>\nPP = PatchFrom NetBSD 2.99.9Must be included from\u00a0<code>&lt;sys\/param.h&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>Example<\/h5>\n<table>\n<thead>\n<tr>\n<th>NetBSD<\/th>\n<th><code>__NetBSD_Version__<\/code><\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>0.8<\/td>\n<td><\/td>\n<td><code>NetBSD0_8<\/code><\/td>\n<\/tr>\n<tr>\n<td>0.9<\/td>\n<td><\/td>\n<td><code>NetBSD0_9<\/code><\/td>\n<\/tr>\n<tr>\n<td>1.0<\/td>\n<td><\/td>\n<td><code>NetBSD1_0<\/code>\u00a0= 1<\/td>\n<\/tr>\n<tr>\n<td>1.0A<\/td>\n<td><\/td>\n<td><code>NetBSD1_0<\/code>\u00a0= 2<\/td>\n<\/tr>\n<tr>\n<td>1.2D<\/td>\n<td>102040000<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>1.2.1<\/td>\n<td>102000100<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/NonStop\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">NonStop<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__TANDEM<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Nucleus_RTOS\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Nucleus RTOS<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__nucleus__<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Openbsd\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">OpenBSD<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Format<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__OpenBSD__<\/code><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>BSD<\/code><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>OpenBSD'V'_'R'<\/code><\/td>\n<td><\/td>\n<td>V = Version<br \/>\nR = RevisionMust be included from\u00a0<code>&lt;sys\/param.h&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>Example<\/h5>\n<table>\n<thead>\n<tr>\n<th>OpenBSD<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>3.1<\/td>\n<td><code>OpenBSD3_1<\/code><\/td>\n<\/tr>\n<tr>\n<td>3.9<\/td>\n<td><code>OpenBSD3_9<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/OS\/2\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">OS\/2<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>OS2<\/code><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>_OS2<\/code><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__OS2__<\/code><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__TOS_OS2__<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Palmos\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Palm OS<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__palmos__<\/code><\/td>\n<td>Defined by GNU C in\u00a0<a href=\"http:\/\/prc-tools.sourceforge.net\/\" target=\"_blank\" rel=\"noopener noreferrer\">PRC-Tools<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Plan_9_from_Bell_Labs\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Plan 9<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>EPLAN9<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/DC\/OSx\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Pyramid DC\/OSx<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>pyr<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/QNX\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">QNX<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Format<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__QNX__<\/code><\/td>\n<td><\/td>\n<td>QNX 4.x<\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__QNXNTO__<\/code><\/td>\n<td><\/td>\n<td>QNX 6.x<\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>_NTO_VERSION<\/code><\/td>\n<td>VRR<\/td>\n<td>V = Version<br \/>\nRR = RevisionOnly available when\u00a0<code>__QNXNTO__<\/code>\u00a0is defined.Must be included from\u00a0<code>&lt;sys\/neutrino.h&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>BBNDK_VERSION_CURRENT<\/code><\/td>\n<td>VVRRRRPPPP<\/td>\n<td>V = Version<br \/>\nRRRR = Revision<br \/>\nPPPP = PatchOnly available on\u00a0<a href=\"http:\/\/en.wikipedia.org\/wiki\/Blackberry_10\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Blackberry 10<\/a>From Blackberry 10.1.0<\/p>\n<p>Must be included from\u00a0<code>&lt;bbndk.h&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>Example<\/h5>\n<table>\n<thead>\n<tr>\n<th>QNX<\/th>\n<th><code>_NTO_VERSION<\/code><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>6.2<\/td>\n<td>620<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Reliant_UNIX\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Reliant UNIX<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>sinux<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/SCO_OpenServer\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">SCO OpenServer<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>M_I386<\/code><\/td>\n<td>Defined by GNU C<\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>M_XENIX<\/code><\/td>\n<td>Defined by GNU C<\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>_SCO_DS<\/code><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Solaris_Operating_Environment\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Solaris<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>sun<\/code><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__sun<\/code><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>__'System'_'Version'<\/code><\/td>\n<td>System =\u00a0<code>uname -s<\/code><br \/>\nVersion =\u00a0<code>uname -r<\/code><br \/>\nAny illegal character is replaced by an underscore.Defined by Sun Studio<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Use the SVR4 macros to distinguish between Solaris and SunOS.<\/p>\n<div>#if defined(sun) || defined(__sun)# if defined(__SVR4) || defined(__svr4__)\/* Solaris *\/# else\/* SunOS *\/# endif#endif<\/div>\n<h5>Example<\/h5>\n<table>\n<thead>\n<tr>\n<th>Solaris<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>2.7<\/td>\n<td><code>__SunOS_5_7<\/code><\/td>\n<\/tr>\n<tr>\n<td>8<\/td>\n<td><code>__SunOS_5_8<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Stratus_VOS\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Stratus VOS<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Format<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__VOS__<\/code><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>__VOS__<\/code><\/td>\n<td>V<\/td>\n<td>V = Version<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Notice that the\u00a0<code>__VOS__<\/code>\u00a0macro is defined by the compiler, but as several compilers can co-exist in the same OS release, the version number is not reliable.<\/p>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/UNIX_System_V\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">SVR4 Environment<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__sysv__<\/code><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__SVR4<\/code><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__svr4__<\/code><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>_SYSTYPE_SVR4<\/code><\/td>\n<td>Defined on IRIX<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Syllable_Desktop\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Syllable<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__SYLLABLE__<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Symbian_OS\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Symbian OS<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__SYMBIAN32__<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Digital_UNIX\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Tru64 (OSF\/1)<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__osf__<\/code><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__osf<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Ultrix\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Ultrix<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>ultrix<\/code><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__ultrix<\/code><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__ultrix__<\/code><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>unix<\/code>\u00a0&amp;\u00a0<code>vax<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/UNICOS\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">UNICOS<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Format<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>_UNICOS<\/code><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>_UNICOS<\/code><\/td>\n<td>V<\/td>\n<td>V = Version<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Unicos\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">UNICOS\/mp<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>_CRAY<\/code><br \/>\n<code>__crayx1<\/code><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Unix\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">UNIX Environment<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__unix__<\/code><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__unix<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Notice that not all compilers defines these macros, e.g. the xlC or the DEC C\/C++ compiler, so it may be better to use the POSIX or X\/Open standard macros instead.<\/p>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/UnixWare\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">UnixWare<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>sco<\/code><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>_UNIXWARE7<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/UWIN\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">U\/Win Environment<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>_UWIN<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Vms\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">VMS<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Format<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>VMS<\/code><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__VMS<\/code><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>__VMS_VER<\/code><\/td>\n<td>VVRREPPTT<\/td>\n<td>VV = Version<br \/>\nRR = Revision<br \/>\nE = Edit number<br \/>\nPP = Patch (01 = A, &#8230; 26 = Z)<br \/>\nTT = Type (22 = official)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>Example<\/h5>\n<table>\n<thead>\n<tr>\n<th>VMS<\/th>\n<th><code>__VMS_VER<\/code><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>6.1<\/td>\n<td>60100022<\/td>\n<\/tr>\n<tr>\n<td>6.2<\/td>\n<td>60200022<\/td>\n<\/tr>\n<tr>\n<td>6.2-1I<\/td>\n<td>60210922<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/VxWorks\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">VxWorks<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Description<\/th>\n<th><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__VXWORKS__<\/code><\/td>\n<td>Defined by GNU C and Diab (from ?)<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__vxworks<\/code><\/td>\n<td>Defined by GNU C and Diab (from ?)<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>_WRS_VXWORKS_MAJOR<\/code><\/td>\n<td>Version<\/p>\n<p>Must be included from\u00a0<code>&lt;version.h&gt;<\/code><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>_WRS_VXWORKS_MINOR<\/code><\/td>\n<td>Revision<\/p>\n<p>Must be included from\u00a0<code>&lt;version.h&gt;<\/code><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>_WRS_VXWORKS_MAINT<\/code><\/td>\n<td>Patch\/maintenance<\/p>\n<p>Must be included from\u00a0<code>&lt;version.h&gt;<\/code><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Mode<\/td>\n<td><code>__RTP__<\/code><\/td>\n<td>For real-time mode<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Mode<\/td>\n<td><code>_WRS_KERNEL<\/code><\/td>\n<td>For kernel mode<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>Example<\/h5>\n<table>\n<thead>\n<tr>\n<th>VxWorks<\/th>\n<th><code>_WRS_VXWORKS_MAJOR<\/code><\/th>\n<th><code>_WRS_VXWORKS_MINOR<\/code><\/th>\n<th><code>_WRS_VXWORKS_MAINT<\/code><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>6.2<\/td>\n<td>6<\/td>\n<td>2<\/td>\n<td>0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Category:Microsoft_Windows\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Windows<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>_WIN16<\/code><\/td>\n<td>Defined for 16-bit environments\u00a0<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ff540443.aspx\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">1<\/a><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>_WIN32<\/code><\/td>\n<td>Defined for both 32-bit and 64-bit environments\u00a0<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ff540443.aspx\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">1<\/a><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>_WIN64<\/code><\/td>\n<td>Defined for 64-bit environments\u00a0<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ff540443.aspx\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">1<\/a><\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__WIN32__<\/code><\/td>\n<td>Defined by Borland C++<\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__TOS_WIN__<\/code><\/td>\n<td>Defined by xlC<\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__WINDOWS__<\/code><\/td>\n<td>Defined by Watcom C\/C++<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Windows_CE\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Windows CE<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Format<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>_WIN32_WCE<\/code><\/td>\n<td><\/td>\n<td>Defined by Embedded Visual Studio C++<\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>_WIN32_WCE<\/code><\/td>\n<td>VRR<\/td>\n<td>V = Version<br \/>\nR = Revision<\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>WIN32_PLATFORM_'P'<\/code><\/td>\n<td><\/td>\n<td>P = Platform<\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>WIN32_PLATFORM_'P'<\/code><\/td>\n<td>V<\/td>\n<td>P = Platform<br \/>\nV = Version<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>Example<\/h5>\n<table>\n<thead>\n<tr>\n<th>Version<\/th>\n<th><code>_WIN32_WCE<\/code><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>2.01<\/td>\n<td>201<\/td>\n<\/tr>\n<tr>\n<td>2.11<\/td>\n<td>211<\/td>\n<\/tr>\n<tr>\n<td>3.0<\/td>\n<td>300<\/td>\n<\/tr>\n<tr>\n<td>4.0<\/td>\n<td>400<\/td>\n<\/tr>\n<tr>\n<td>4.1<\/td>\n<td>410<\/td>\n<\/tr>\n<tr>\n<td>4.2<\/td>\n<td>420<\/td>\n<\/tr>\n<tr>\n<td>5.0<\/td>\n<td>501<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<thead>\n<tr>\n<th>Platform<\/th>\n<th>Macro<\/th>\n<th>Value<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>H\/PC 2000<\/td>\n<td><code>WIN32_PLATFORM_HPC2000<\/code><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>H\/PC Pro 2.11<\/td>\n<td><code>WIN32_PLATFORM_HPCPRO<\/code><\/td>\n<td>211<\/td>\n<\/tr>\n<tr>\n<td>H\/PC Pro 3.0<\/td>\n<td><code>WIN32_PLATFORM_HPCPRO<\/code><\/td>\n<td>300<\/td>\n<\/tr>\n<tr>\n<td>Pocket PC<\/td>\n<td><code>WIN32_PLATFORM_PSPC<\/code><\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>Pocket PC 2002<\/td>\n<td><code>WIN32_PLATFORM_PSPC<\/code><\/td>\n<td>310<\/td>\n<\/tr>\n<tr>\n<td>Windows Mobile 2003<\/td>\n<td><code>WIN32_PLATFORM_PSPC<\/code><\/td>\n<td>400<\/td>\n<\/tr>\n<tr>\n<td>Smartphone 2002<\/td>\n<td><code>WIN32_PLATFORM_WFSP<\/code><\/td>\n<td>100<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Bristol_Technology_Inc.\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Wind\/U Environment<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Format<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>_WINDU_SOURCE<\/code><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Version<\/td>\n<td><code>_WINDU_SOURCE<\/code><\/td>\n<td>0xVVRRPP<\/td>\n<td>VV = Version<br \/>\nRR = Revision<br \/>\nPP = Patch<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>Example<\/h5>\n<table>\n<thead>\n<tr>\n<th>Wind\/U<\/th>\n<th><code>_WINDU_SOURCE<\/code><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>3.1.2<\/td>\n<td>0x030102<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a href=\"http:\/\/en.wikipedia.org\/wiki\/Z\/OS\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">z\/OS<\/a><\/h2>\n<table>\n<thead>\n<tr>\n<th>Type<\/th>\n<th>Macro<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identification<\/td>\n<td><code>__MVS__<\/code><\/td>\n<td>Host<\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__HOS_MVS__<\/code><\/td>\n<td>Host<\/td>\n<\/tr>\n<tr>\n<td>Identification<\/td>\n<td><code>__TOS_MVS__<\/code><\/td>\n<td>Target<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u4eec\u5728\u7f16\u8bd1\u4e00\u4e9b\u8de8\u5e73\u53f0\u7684\u7a0b\u5e8f\u7684\u65f6&hellip;<\/p>\n","protected":false},"author":1,"featured_media":74,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/www.sourcecool.com\/index.php\/wp-json\/wp\/v2\/posts\/72"}],"collection":[{"href":"http:\/\/www.sourcecool.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.sourcecool.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.sourcecool.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.sourcecool.com\/index.php\/wp-json\/wp\/v2\/comments?post=72"}],"version-history":[{"count":3,"href":"http:\/\/www.sourcecool.com\/index.php\/wp-json\/wp\/v2\/posts\/72\/revisions"}],"predecessor-version":[{"id":140,"href":"http:\/\/www.sourcecool.com\/index.php\/wp-json\/wp\/v2\/posts\/72\/revisions\/140"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.sourcecool.com\/index.php\/wp-json\/wp\/v2\/media\/74"}],"wp:attachment":[{"href":"http:\/\/www.sourcecool.com\/index.php\/wp-json\/wp\/v2\/media?parent=72"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.sourcecool.com\/index.php\/wp-json\/wp\/v2\/categories?post=72"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.sourcecool.com\/index.php\/wp-json\/wp\/v2\/tags?post=72"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}