{"id":641,"date":"2016-06-16T14:56:57","date_gmt":"2016-06-16T23:56:57","guid":{"rendered":"\/blog\/?p=641"},"modified":"2023-09-21T09:38:02","modified_gmt":"2023-09-21T00:38:02","slug":"c-c-os-%ea%b5%ac%eb%b6%84-%ec%a0%84%ec%b2%98%eb%a6%ac%ea%b8%b0-%eb%a7%a4%ed%81%ac%eb%a1%9c","status":"publish","type":"post","link":"https:\/\/hasu0707.duckdns.org\/blog\/?p=641","title":{"rendered":"[C\/C++] OS \uad6c\ubd84 \uc804\ucc98\ub9ac\uae30 \ub9e4\ud06c\ub85c"},"content":{"rendered":"\n<p><span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\ucd9c\ucc98 :\u00a0<\/span><a href=\"http:\/\/fogeaters.cafe24.com\/xe\/board11\/13578\" target=\"_blank\" rel=\"noopener\"><span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">http:\/\/fogeaters.cafe24.com\/xe\/board11\/13578<\/span><\/a><\/p>\n<span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\n<\/span><p><br \/><\/p>\n<span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\n<\/span><p style=\"font-family:'\ub3cb\uc6c0';padding:0px;color:rgb(51,51,51);text-align:justify;background-color:rgb(255,255,255);\"><span style=\"font-family:tahoma;\"><strong><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">* \ub9ac\ub205\uc2a4<\/span><\/strong><\/span><\/p>\n<span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\n<\/span><p style=\"font-family:'\ub3cb\uc6c0';padding:0px;color:rgb(51,51,51);text-align:justify;background-color:rgb(255,255,255);\"><br \/><\/p>\n<span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\n<\/span><p style=\"font-family:'\ub3cb\uc6c0';padding:0px;color:rgb(51,51,51);text-align:justify;background-color:rgb(255,255,255);\"><span style=\"font-family:tahoma;\"><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">#if defined(<\/span><span style=\"color:rgb(255,0,0);font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">__linux__<\/span><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">)<\/span><\/span><br \/><span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\/* Linux. --------------------------------------------------- *\/<\/span><br \/><br \/><span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">#endif<\/span><\/p>\n<span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\n<\/span><p style=\"font-family:'\ub3cb\uc6c0';padding:0px;color:rgb(51,51,51);text-align:justify;background-color:rgb(255,255,255);\"><br \/><\/p>\n<span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\n<\/span><p style=\"font-family:'\ub3cb\uc6c0';padding:0px;color:rgb(51,51,51);text-align:justify;background-color:rgb(255,255,255);\"><span style=\"font-family:tahoma;\"><strong><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">* OSX, iOS<\/span><\/strong><\/span><\/p>\n<span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\n<\/span><p style=\"font-family:'\ub3cb\uc6c0';padding:0px;color:rgb(51,51,51);text-align:justify;background-color:rgb(255,255,255);\"><br \/><\/p>\n<span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\n<\/span><p style=\"font-family:'\ub3cb\uc6c0';padding:0px;color:rgb(51,51,51);text-align:justify;background-color:rgb(255,255,255);\"><span style=\"font-family:tahoma;\"><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">#if defined(<\/span><span style=\"color:rgb(255,0,0);font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">__APPLE__<\/span><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">) &amp;&amp; defined(<\/span><span style=\"color:rgb(255,0,0);font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">__MACH__<\/span><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">)<\/span><\/span><br \/><span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\/* Apple OSX and iOS (Darwin). ------------------------------ *\/<\/span><br \/><span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">#include &lt;TargetConditionals.h&gt;<\/span><br \/><span style=\"font-family:tahoma;\"><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">#if<\/span><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">\u00a0<\/span><span style=\"color:rgb(255,0,0);\"><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">TARGET_IPHONE_SIMULATOR<\/span><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">\u00a0<\/span><\/span><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">== 1<\/span><\/span><br \/><span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\/* iOS in Xcode simulator *\/<\/span><br \/><br \/><span style=\"font-family:tahoma;\"><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">#elif<\/span><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">\u00a0<\/span><span style=\"color:rgb(255,0,0);\"><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">TARGET_OS_IPHONE<\/span><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">\u00a0<\/span><\/span><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">== 1<\/span><\/span><br \/><span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\/* iOS on iPhone, iPad, etc. *\/<\/span><br \/><br \/><span style=\"font-family:tahoma;\"><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">#elif<\/span><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">\u00a0<\/span><span style=\"color:rgb(255,0,0);\"><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">TARGET_OS_MAC<\/span><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">\u00a0<\/span><\/span><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">== 1<\/span><\/span><br \/><span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\/* OSX *\/<\/span><br \/><br \/><span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">#endif<\/span><br \/><span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">#endif<\/span><\/p>\n<span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\n<\/span><p style=\"font-family:'\ub3cb\uc6c0';padding:0px;color:rgb(51,51,51);text-align:justify;background-color:rgb(255,255,255);\"><br \/><\/p>\n<span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\n<\/span><p style=\"font-family:'\ub3cb\uc6c0';padding:0px;color:rgb(51,51,51);text-align:justify;background-color:rgb(255,255,255);\"><span style=\"font-family:tahoma;\"><strong><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">* \uc708\ub3c4\uc6b0\uc988<\/span><\/strong><\/span><\/p>\n<span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\n<\/span><p style=\"font-family:'\ub3cb\uc6c0';padding:0px;color:rgb(51,51,51);text-align:justify;background-color:rgb(255,255,255);\"><br \/><\/p>\n<span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\n<\/span><p style=\"font-family:'\ub3cb\uc6c0';padding:0px;color:rgb(51,51,51);text-align:justify;background-color:rgb(255,255,255);\"><span style=\"font-family:tahoma;\"><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">#if defined(<\/span><span style=\"color:rgb(255,0,0);font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">_WIN64<\/span><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">)<\/span><\/span><br \/><span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\/* Microsoft Windows (64-bit). ------------------------------ *\/<\/span><br \/><br \/><span style=\"font-family:tahoma;\"><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">#elif defined(<\/span><span style=\"color:rgb(255,0,0);font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">_WIN32<\/span><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">)<\/span><\/span><br \/><span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\/* Microsoft Windows (32-bit). ------------------------------ *\/<\/span><br \/><span style=\"font-family:tahoma;\"><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">\u00a0<\/span><span style=\"font-size:12px;font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';\">\u00a0<\/span><\/span><br \/><span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">#endif<\/span><\/p>\n<span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\n<\/span><p style=\"font-family:'\ub3cb\uc6c0';padding:0px;color:rgb(51,51,51);text-align:justify;background-color:rgb(255,255,255);\"><br \/><\/p>\n<span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\n<\/span><p style=\"font-family:'\ub3cb\uc6c0';padding:0px;color:rgb(51,51,51);text-align:justify;background-color:rgb(255,255,255);\"><span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">[\ucc38\uace0\uc790\ub8cc]\u00a0<\/span><a class=\"con_link\" href=\"http:\/\/nadeausoftware.com\/articles\/2012\/01\/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system\" target=\"_blank\" style=\"color:rgb(0,136,204);text-decoration:none;\" rel=\"noopener\"><span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">http:\/\/nadeausoftware.com\/articles\/2012\/01\/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system<\/span><\/a><\/p>\n<span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">\n<\/span><p style=\"font-family:'\ub3cb\uc6c0';padding:0px;color:rgb(51,51,51);text-align:justify;background-color:rgb(255,255,255);\"><a href=\"http:\/\/beefchunk.com\/documentation\/lang\/c\/pre-defined-c\/preos.html\" target=\"_blank\" class=\"con_link\" style=\"color:rgb(0,136,204);text-decoration:none;\" rel=\"noopener\"><span style=\"font-family:'\uad74\ub9bc\uccb4', 'Courier New', 'Lucida Console';font-size:12px;\">http:\/\/beefchunk.com\/documentation\/lang\/c\/pre-defined-c\/preos.html<\/span><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ucd9c\ucc98 :\u00a0http:\/\/fogeaters.cafe24.com\/xe\/board11\/13578 * \ub9ac\ub205\uc2a4 #if defined(__linux__)\/* Linux. &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; *\/ #endif * OSX, iOS #if defined(__APPLE__) &amp;&amp; defined(__MACH__)\/* Apple OSX and iOS (Darwin). &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; *\/#include &lt;TargetConditionals.h&gt;#if\u00a0TARGET_IPHONE_SIMULATOR\u00a0== 1\/* iOS in Xcode simulator *\/ #elif\u00a0TARGET_OS_IPHONE\u00a0== 1\/* iOS on iPhone, iPad, etc. *\/ #elif\u00a0TARGET_OS_MAC\u00a0== 1\/* OSX *\/ #endif#endif * \uc708\ub3c4\uc6b0\uc988 #if defined(_WIN64)\/* Microsoft Windows (64-bit). &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; *\/ #elif defined(_WIN32)\/* [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[22],"tags":[],"class_list":["post-641","post","type-post","status-publish","format-standard","hentry","category-development_unix"],"_links":{"self":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/641","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=641"}],"version-history":[{"count":0,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/641\/revisions"}],"wp:attachment":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=641"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=641"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}