{"action":"created","comment":{"url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments/24752177","id":24752177,"diff_hunk":"@@ -463,17 +467,39 @@ void ResourceManager::flush(const char *filename, bool flushText, bool target64b\n         E->Release();\n         //translate the assert exceptions into something else...\n         StringBuffer msg;\n-        msg.appendf(\"%s: %s\", filename, bfd_errmsg(bfd_get_error()));\n+        msg.appendf(\"%s: %s\", filename.str(), bfd_errmsg(bfd_get_error()));\n         delete syms;\n         if (file)\n             bfd_close_all_done(file); // allow bfd to clean up memory\n         throwError1(HQLERR_ResourceCreateFailed, msg.str());\n     }\n #else\n-    UNIMPLEMENTED;\n+    isObjectFile = false;\n+    filename.append(basename).append(\".res.s\");\n+    FILE *f = fopen(filename, \"wt\");\n+    if (!f)\n+        throwError1(HQLERR_ResourceCreateFailed, filename.str());\n+    ForEachItemIn(idx, resources)\n+    {\n+        ResourceItem &s = (ResourceItem &) resources.item(idx);\n+        const char *type = s.type.str();\n+        unsigned id = s.id;\n+        VStringBuffer binfile(\"%s_%s_%u.bin\", filename.str(), type, id);\n+        fprintf(f, \" .section __TEXT,%s_%u\\n\", type, id);\n+        fprintf(f, \" .global _%s_%u_txt_start\\n\", type, id);  // For some reason apple needs a leading underbar and linux does not\n+        fprintf(f, \"_%s_%u_txt_start:\\n\", type, id);\n+        fprintf(f, \" .incbin \\\"%s\\\"\\n\", binfile.str());\n+        FILE *bin = fopen(binfile, \"wb\");\n+        if (!bin)\n+            throwError1(HQLERR_ResourceCreateFailed, binfile.str());","path":"ecl/hqlcpp/hqlres.cpp","position":64,"original_position":64,"commit_id":"0e13912252f5e01863399b6043ac26e73cdbe08c","original_commit_id":"6a9b5fdbe0b21ba0082bfc36234caefcb466b3a2","user":{"login":"richardkchapman","id":900820,"avatar_url":"https://avatars.githubusercontent.com/u/900820?v=3","gravatar_id":"","url":"https://api.github.com/users/richardkchapman","html_url":"https://github.com/richardkchapman","followers_url":"https://api.github.com/users/richardkchapman/followers","following_url":"https://api.github.com/users/richardkchapman/following{/other_user}","gists_url":"https://api.github.com/users/richardkchapman/gists{/gist_id}","starred_url":"https://api.github.com/users/richardkchapman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardkchapman/subscriptions","organizations_url":"https://api.github.com/users/richardkchapman/orgs","repos_url":"https://api.github.com/users/richardkchapman/repos","events_url":"https://api.github.com/users/richardkchapman/events{/privacy}","received_events_url":"https://api.github.com/users/richardkchapman/received_events","type":"User","site_admin":false},"body":"Yes, I probably should. Ideally I should have coded using a CFile that would have auto-destructed. In practice it's very unlikely to happen and even less likely to cause a problem though.","created_at":"2015-02-16T14:06:55Z","updated_at":"2015-02-16T14:06:55Z","html_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/6979#discussion_r24752177","pull_request_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6979","_links":{"self":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments/24752177"},"html":{"href":"https://github.com/hpcc-systems/HPCC-Platform/pull/6979#discussion_r24752177"},"pull_request":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6979"}}},"pull_request":{"url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6979","id":29367085,"html_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/6979","diff_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/6979.diff","patch_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/6979.patch","issue_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/6979","number":6979,"state":"open","locked":false,"title":"HPCC-13055 OSX support","user":{"login":"richardkchapman","id":900820,"avatar_url":"https://avatars.githubusercontent.com/u/900820?v=3","gravatar_id":"","url":"https://api.github.com/users/richardkchapman","html_url":"https://github.com/richardkchapman","followers_url":"https://api.github.com/users/richardkchapman/followers","following_url":"https://api.github.com/users/richardkchapman/following{/other_user}","gists_url":"https://api.github.com/users/richardkchapman/gists{/gist_id}","starred_url":"https://api.github.com/users/richardkchapman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardkchapman/subscriptions","organizations_url":"https://api.github.com/users/richardkchapman/orgs","repos_url":"https://api.github.com/users/richardkchapman/repos","events_url":"https://api.github.com/users/richardkchapman/events{/privacy}","received_events_url":"https://api.github.com/users/richardkchapman/received_events","type":"User","site_admin":false},"body":"Add resources using a generated assembler file with .incbin directives -\r\nthis should be more portable than binutils method which has proved\r\nproblematic on new architectures.\r\n\r\nRead resources using mach-o support API.\r\n\r\nVarious changes in jcomp to support adding files to compile that are\r\nnot cpp files, and to support Apple toolchain.\r\n\r\nAlso add default:break; code to eclhelper to suppress warnings in generated\r\ncode, and add missing include files to allow getDiskUsage to work.\r\n\r\nSigned-off-by: Richard Chapman <rchapman@hpccsystems.com>","created_at":"2015-02-16T11:44:07Z","updated_at":"2015-02-16T14:06:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b3502d5cd2e442c6fda28854cf1e9a6fd5f0a83","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6979/commits","review_comments_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6979/comments","review_comment_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments/{number}","comments_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/6979/comments","statuses_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/statuses/0e13912252f5e01863399b6043ac26e73cdbe08c","head":{"label":"richardkchapman:osx","ref":"osx","sha":"0e13912252f5e01863399b6043ac26e73cdbe08c","user":{"login":"richardkchapman","id":900820,"avatar_url":"https://avatars.githubusercontent.com/u/900820?v=3","gravatar_id":"","url":"https://api.github.com/users/richardkchapman","html_url":"https://github.com/richardkchapman","followers_url":"https://api.github.com/users/richardkchapman/followers","following_url":"https://api.github.com/users/richardkchapman/following{/other_user}","gists_url":"https://api.github.com/users/richardkchapman/gists{/gist_id}","starred_url":"https://api.github.com/users/richardkchapman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardkchapman/subscriptions","organizations_url":"https://api.github.com/users/richardkchapman/orgs","repos_url":"https://api.github.com/users/richardkchapman/repos","events_url":"https://api.github.com/users/richardkchapman/events{/privacy}","received_events_url":"https://api.github.com/users/richardkchapman/received_events","type":"User","site_admin":false},"repo":{"id":2031005,"name":"HPCC-Platform","full_name":"richardkchapman/HPCC-Platform","owner":{"login":"richardkchapman","id":900820,"avatar_url":"https://avatars.githubusercontent.com/u/900820?v=3","gravatar_id":"","url":"https://api.github.com/users/richardkchapman","html_url":"https://github.com/richardkchapman","followers_url":"https://api.github.com/users/richardkchapman/followers","following_url":"https://api.github.com/users/richardkchapman/following{/other_user}","gists_url":"https://api.github.com/users/richardkchapman/gists{/gist_id}","starred_url":"https://api.github.com/users/richardkchapman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardkchapman/subscriptions","organizations_url":"https://api.github.com/users/richardkchapman/orgs","repos_url":"https://api.github.com/users/richardkchapman/repos","events_url":"https://api.github.com/users/richardkchapman/events{/privacy}","received_events_url":"https://api.github.com/users/richardkchapman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/richardkchapman/HPCC-Platform","description":"HPCC Systems big data solution, community edition","fork":true,"url":"https://api.github.com/repos/richardkchapman/HPCC-Platform","forks_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/forks","keys_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/teams","hooks_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/hooks","issue_events_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/issues/events{/number}","events_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/events","assignees_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/assignees{/user}","branches_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/branches{/branch}","tags_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/tags","blobs_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/statuses/{sha}","languages_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/languages","stargazers_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/stargazers","contributors_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/contributors","subscribers_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/subscribers","subscription_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/subscription","commits_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/issues/comments/{number}","contents_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/contents/{+path}","compare_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/merges","archive_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/downloads","issues_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/issues{/number}","pulls_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/pulls{/number}","milestones_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/milestones{/number}","notifications_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/labels{/name}","releases_url":"https://api.github.com/repos/richardkchapman/HPCC-Platform/releases{/id}","created_at":"2011-07-11T15:22:03Z","updated_at":"2015-02-12T17:31:52Z","pushed_at":"2015-02-16T14:05:35Z","git_url":"git://github.com/richardkchapman/HPCC-Platform.git","ssh_url":"git@github.com:richardkchapman/HPCC-Platform.git","clone_url":"https://github.com/richardkchapman/HPCC-Platform.git","svn_url":"https://github.com/richardkchapman/HPCC-Platform","homepage":"www.hpccsystems.com","size":138189,"stargazers_count":5,"watchers_count":5,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":5,"default_branch":"master"}},"base":{"label":"hpcc-systems:candidate-5.2.0","ref":"candidate-5.2.0","sha":"c948063f3595bcc54f1e30f1d1b6bdf78ed9ffdc","user":{"login":"hpcc-systems","id":900867,"avatar_url":"https://avatars.githubusercontent.com/u/900867?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcc-systems","html_url":"https://github.com/hpcc-systems","followers_url":"https://api.github.com/users/hpcc-systems/followers","following_url":"https://api.github.com/users/hpcc-systems/following{/other_user}","gists_url":"https://api.github.com/users/hpcc-systems/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcc-systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcc-systems/subscriptions","organizations_url":"https://api.github.com/users/hpcc-systems/orgs","repos_url":"https://api.github.com/users/hpcc-systems/repos","events_url":"https://api.github.com/users/hpcc-systems/events{/privacy}","received_events_url":"https://api.github.com/users/hpcc-systems/received_events","type":"Organization","site_admin":false},"repo":{"id":2030681,"name":"HPCC-Platform","full_name":"hpcc-systems/HPCC-Platform","owner":{"login":"hpcc-systems","id":900867,"avatar_url":"https://avatars.githubusercontent.com/u/900867?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcc-systems","html_url":"https://github.com/hpcc-systems","followers_url":"https://api.github.com/users/hpcc-systems/followers","following_url":"https://api.github.com/users/hpcc-systems/following{/other_user}","gists_url":"https://api.github.com/users/hpcc-systems/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcc-systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcc-systems/subscriptions","organizations_url":"https://api.github.com/users/hpcc-systems/orgs","repos_url":"https://api.github.com/users/hpcc-systems/repos","events_url":"https://api.github.com/users/hpcc-systems/events{/privacy}","received_events_url":"https://api.github.com/users/hpcc-systems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hpcc-systems/HPCC-Platform","description":"IMPORTANT - Issue tracking has been migrated to JIRA - use your github ID and password reset mechanism to log in","fork":false,"url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform","forks_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/forks","keys_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/teams","hooks_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/hooks","issue_events_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/events{/number}","events_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/events","assignees_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/assignees{/user}","branches_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/branches{/branch}","tags_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/tags","blobs_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/statuses/{sha}","languages_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/languages","stargazers_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/stargazers","contributors_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/contributors","subscribers_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/subscribers","subscription_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/subscription","commits_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/comments/{number}","contents_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/contents/{+path}","compare_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/merges","archive_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/downloads","issues_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues{/number}","pulls_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls{/number}","milestones_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/milestones{/number}","notifications_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/labels{/name}","releases_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/releases{/id}","created_at":"2011-07-11T14:29:51Z","updated_at":"2015-02-16T13:36:37Z","pushed_at":"2015-02-16T13:36:36Z","git_url":"git://github.com/hpcc-systems/HPCC-Platform.git","ssh_url":"git@github.com:hpcc-systems/HPCC-Platform.git","clone_url":"https://github.com/hpcc-systems/HPCC-Platform.git","svn_url":"https://github.com/hpcc-systems/HPCC-Platform","homepage":"track.hpccsystems.com","size":266718,"stargazers_count":242,"watchers_count":242,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":96,"mirror_url":null,"open_issues_count":421,"forks":96,"open_issues":421,"watchers":242,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6979"},"html":{"href":"https://github.com/hpcc-systems/HPCC-Platform/pull/6979"},"issue":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/6979"},"comments":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/6979/comments"},"review_comments":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6979/comments"},"review_comment":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6979/commits"},"statuses":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/statuses/0e13912252f5e01863399b6043ac26e73cdbe08c"}}}}