{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/MIEngine/pulls/comments/59617444","id":59617444,"diff_hunk":"@@ -0,0 +1,149 @@\n+﻿// Copyright (c) Microsoft. All rights reserved.\n+// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n+\n+using System;\n+using System.Collections.Generic;\n+using System.Collections.Specialized;\n+using System.Diagnostics;\n+using System.Runtime.InteropServices;\n+\n+namespace MICore\n+{\n+    public static class PlatformUtilities\n+    {\n+        private enum RuntimePlatform\n+        {\n+            Unset = 0,\n+            Unknown,\n+            Windows,\n+            MacOSX,\n+            Unix,\n+        }\n+\n+        private static RuntimePlatform _runtimePlatform;\n+\n+        private static RuntimePlatform GetRuntimePlatform()\n+        {\n+            if (_runtimePlatform == RuntimePlatform.Unset)\n+            {\n+                _runtimePlatform = CalculateRuntimePlatform();\n+            }\n+            return _runtimePlatform;\n+        }\n+\n+#if !CORECLR\n+        [DllImport(\"libc\")]\n+        static extern int uname(IntPtr buf);\n+\n+        private static RuntimePlatform GetUnixVariant()\n+        {\n+            IntPtr buf = Marshal.AllocHGlobal(8192);\n+            try\n+            {\n+                if (uname(buf) == 0)","path":"src/MICore/PlatformUtilities.cs","position":43,"original_position":43,"commit_id":"5b772357bebf6d85169df71285c89e859a44fdbc","original_commit_id":"5b772357bebf6d85169df71285c89e859a44fdbc","user":{"login":"wiktork","id":15879456,"avatar_url":"https://avatars.githubusercontent.com/u/15879456?v=3","gravatar_id":"","url":"https://api.github.com/users/wiktork","html_url":"https://github.com/wiktork","followers_url":"https://api.github.com/users/wiktork/followers","following_url":"https://api.github.com/users/wiktork/following{/other_user}","gists_url":"https://api.github.com/users/wiktork/gists{/gist_id}","starred_url":"https://api.github.com/users/wiktork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wiktork/subscriptions","organizations_url":"https://api.github.com/users/wiktork/orgs","repos_url":"https://api.github.com/users/wiktork/repos","events_url":"https://api.github.com/users/wiktork/events{/privacy}","received_events_url":"https://api.github.com/users/wiktork/received_events","type":"User","site_admin":false},"body":"if we're accounting for null in the finally, we should probably check for null before uname as well.","created_at":"2016-04-13T20:17:05Z","updated_at":"2016-04-13T20:17:05Z","html_url":"https://github.com/Microsoft/MIEngine/pull/266#discussion_r59617444","pull_request_url":"https://api.github.com/repos/Microsoft/MIEngine/pulls/266","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/MIEngine/pulls/comments/59617444"},"html":{"href":"https://github.com/Microsoft/MIEngine/pull/266#discussion_r59617444"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/MIEngine/pulls/266"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/MIEngine/pulls/266","id":65863499,"html_url":"https://github.com/Microsoft/MIEngine/pull/266","diff_url":"https://github.com/Microsoft/MIEngine/pull/266.diff","patch_url":"https://github.com/Microsoft/MIEngine/pull/266.patch","issue_url":"https://api.github.com/repos/Microsoft/MIEngine/issues/266","number":266,"state":"open","locked":false,"title":"Add new build configurations for desktop CLR","user":{"login":"andrewcrawley","id":17841637,"avatar_url":"https://avatars.githubusercontent.com/u/17841637?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewcrawley","html_url":"https://github.com/andrewcrawley","followers_url":"https://api.github.com/users/andrewcrawley/followers","following_url":"https://api.github.com/users/andrewcrawley/following{/other_user}","gists_url":"https://api.github.com/users/andrewcrawley/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewcrawley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewcrawley/subscriptions","organizations_url":"https://api.github.com/users/andrewcrawley/orgs","repos_url":"https://api.github.com/users/andrewcrawley/repos","events_url":"https://api.github.com/users/andrewcrawley/events{/privacy}","received_events_url":"https://api.github.com/users/andrewcrawley/received_events","type":"User","site_admin":false},"body":"Add new \"Debug.Desktop\" and \"Release.Desktop\" build configurations that produce binaries targeted at the desktop CLR\r\nAdd abstractions for platform detection and setting the environment of launched processes to support running on Mono","created_at":"2016-04-09T00:14:21Z","updated_at":"2016-04-13T20:17:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cc1a8d66e6e32b63c478090a62f851e31c2bf621","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/MIEngine/pulls/266/commits","review_comments_url":"https://api.github.com/repos/Microsoft/MIEngine/pulls/266/comments","review_comment_url":"https://api.github.com/repos/Microsoft/MIEngine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/MIEngine/issues/266/comments","statuses_url":"https://api.github.com/repos/Microsoft/MIEngine/statuses/5b772357bebf6d85169df71285c89e859a44fdbc","head":{"label":"andrewcrawley:users/andrewcr/mono-cr","ref":"users/andrewcr/mono-cr","sha":"5b772357bebf6d85169df71285c89e859a44fdbc","user":{"login":"andrewcrawley","id":17841637,"avatar_url":"https://avatars.githubusercontent.com/u/17841637?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewcrawley","html_url":"https://github.com/andrewcrawley","followers_url":"https://api.github.com/users/andrewcrawley/followers","following_url":"https://api.github.com/users/andrewcrawley/following{/other_user}","gists_url":"https://api.github.com/users/andrewcrawley/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewcrawley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewcrawley/subscriptions","organizations_url":"https://api.github.com/users/andrewcrawley/orgs","repos_url":"https://api.github.com/users/andrewcrawley/repos","events_url":"https://api.github.com/users/andrewcrawley/events{/privacy}","received_events_url":"https://api.github.com/users/andrewcrawley/received_events","type":"User","site_admin":false},"repo":{"id":53908908,"name":"MIEngine","full_name":"andrewcrawley/MIEngine","owner":{"login":"andrewcrawley","id":17841637,"avatar_url":"https://avatars.githubusercontent.com/u/17841637?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewcrawley","html_url":"https://github.com/andrewcrawley","followers_url":"https://api.github.com/users/andrewcrawley/followers","following_url":"https://api.github.com/users/andrewcrawley/following{/other_user}","gists_url":"https://api.github.com/users/andrewcrawley/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewcrawley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewcrawley/subscriptions","organizations_url":"https://api.github.com/users/andrewcrawley/orgs","repos_url":"https://api.github.com/users/andrewcrawley/repos","events_url":"https://api.github.com/users/andrewcrawley/events{/privacy}","received_events_url":"https://api.github.com/users/andrewcrawley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andrewcrawley/MIEngine","description":"The Visual Studio MI Debug Engine (\"MIEngine\") provides an open-source Visual Studio Debugger extension that works with MI-enabled debuggers such as gdb, lldb, and clrdbg. ","fork":true,"url":"https://api.github.com/repos/andrewcrawley/MIEngine","forks_url":"https://api.github.com/repos/andrewcrawley/MIEngine/forks","keys_url":"https://api.github.com/repos/andrewcrawley/MIEngine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrewcrawley/MIEngine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrewcrawley/MIEngine/teams","hooks_url":"https://api.github.com/repos/andrewcrawley/MIEngine/hooks","issue_events_url":"https://api.github.com/repos/andrewcrawley/MIEngine/issues/events{/number}","events_url":"https://api.github.com/repos/andrewcrawley/MIEngine/events","assignees_url":"https://api.github.com/repos/andrewcrawley/MIEngine/assignees{/user}","branches_url":"https://api.github.com/repos/andrewcrawley/MIEngine/branches{/branch}","tags_url":"https://api.github.com/repos/andrewcrawley/MIEngine/tags","blobs_url":"https://api.github.com/repos/andrewcrawley/MIEngine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrewcrawley/MIEngine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrewcrawley/MIEngine/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrewcrawley/MIEngine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrewcrawley/MIEngine/statuses/{sha}","languages_url":"https://api.github.com/repos/andrewcrawley/MIEngine/languages","stargazers_url":"https://api.github.com/repos/andrewcrawley/MIEngine/stargazers","contributors_url":"https://api.github.com/repos/andrewcrawley/MIEngine/contributors","subscribers_url":"https://api.github.com/repos/andrewcrawley/MIEngine/subscribers","subscription_url":"https://api.github.com/repos/andrewcrawley/MIEngine/subscription","commits_url":"https://api.github.com/repos/andrewcrawley/MIEngine/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrewcrawley/MIEngine/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrewcrawley/MIEngine/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrewcrawley/MIEngine/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrewcrawley/MIEngine/contents/{+path}","compare_url":"https://api.github.com/repos/andrewcrawley/MIEngine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrewcrawley/MIEngine/merges","archive_url":"https://api.github.com/repos/andrewcrawley/MIEngine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrewcrawley/MIEngine/downloads","issues_url":"https://api.github.com/repos/andrewcrawley/MIEngine/issues{/number}","pulls_url":"https://api.github.com/repos/andrewcrawley/MIEngine/pulls{/number}","milestones_url":"https://api.github.com/repos/andrewcrawley/MIEngine/milestones{/number}","notifications_url":"https://api.github.com/repos/andrewcrawley/MIEngine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrewcrawley/MIEngine/labels{/name}","releases_url":"https://api.github.com/repos/andrewcrawley/MIEngine/releases{/id}","deployments_url":"https://api.github.com/repos/andrewcrawley/MIEngine/deployments","created_at":"2016-03-15T02:42:54Z","updated_at":"2016-04-08T16:45:12Z","pushed_at":"2016-04-13T19:44:24Z","git_url":"git://github.com/andrewcrawley/MIEngine.git","ssh_url":"git@github.com:andrewcrawley/MIEngine.git","clone_url":"https://github.com/andrewcrawley/MIEngine.git","svn_url":"https://github.com/andrewcrawley/MIEngine","homepage":null,"size":4161,"stargazers_count":1,"watchers_count":1,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"Microsoft:release-cpptools","ref":"release-cpptools","sha":"174593d9ef4ad7091b5080e2df29274ba3c88e35","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":36405087,"name":"MIEngine","full_name":"Microsoft/MIEngine","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/MIEngine","description":"The Visual Studio MI Debug Engine (\"MIEngine\") provides an open-source Visual Studio Debugger extension that works with MI-enabled debuggers such as gdb, lldb, and clrdbg. ","fork":false,"url":"https://api.github.com/repos/Microsoft/MIEngine","forks_url":"https://api.github.com/repos/Microsoft/MIEngine/forks","keys_url":"https://api.github.com/repos/Microsoft/MIEngine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/MIEngine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/MIEngine/teams","hooks_url":"https://api.github.com/repos/Microsoft/MIEngine/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/MIEngine/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/MIEngine/events","assignees_url":"https://api.github.com/repos/Microsoft/MIEngine/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/MIEngine/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/MIEngine/tags","blobs_url":"https://api.github.com/repos/Microsoft/MIEngine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/MIEngine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/MIEngine/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/MIEngine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/MIEngine/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/MIEngine/languages","stargazers_url":"https://api.github.com/repos/Microsoft/MIEngine/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/MIEngine/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/MIEngine/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/MIEngine/subscription","commits_url":"https://api.github.com/repos/Microsoft/MIEngine/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/MIEngine/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/MIEngine/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/MIEngine/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/MIEngine/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/MIEngine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/MIEngine/merges","archive_url":"https://api.github.com/repos/Microsoft/MIEngine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/MIEngine/downloads","issues_url":"https://api.github.com/repos/Microsoft/MIEngine/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/MIEngine/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/MIEngine/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/MIEngine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/MIEngine/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/MIEngine/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/MIEngine/deployments","created_at":"2015-05-28T00:44:08Z","updated_at":"2016-04-12T08:12:59Z","pushed_at":"2016-04-13T18:11:29Z","git_url":"git://github.com/Microsoft/MIEngine.git","ssh_url":"git@github.com:Microsoft/MIEngine.git","clone_url":"https://github.com/Microsoft/MIEngine.git","svn_url":"https://github.com/Microsoft/MIEngine","homepage":null,"size":4565,"stargazers_count":294,"watchers_count":294,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":82,"mirror_url":null,"open_issues_count":33,"forks":82,"open_issues":33,"watchers":294,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/MIEngine/pulls/266"},"html":{"href":"https://github.com/Microsoft/MIEngine/pull/266"},"issue":{"href":"https://api.github.com/repos/Microsoft/MIEngine/issues/266"},"comments":{"href":"https://api.github.com/repos/Microsoft/MIEngine/issues/266/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/MIEngine/pulls/266/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/MIEngine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/MIEngine/pulls/266/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/MIEngine/statuses/5b772357bebf6d85169df71285c89e859a44fdbc"}}}}