{"action":"opened","number":1051,"pull_request":{"url":"https://api.github.com/repos/Alexpux/MINGW-packages/pulls/1051","id":58522516,"html_url":"https://github.com/Alexpux/MINGW-packages/pull/1051","diff_url":"https://github.com/Alexpux/MINGW-packages/pull/1051.diff","patch_url":"https://github.com/Alexpux/MINGW-packages/pull/1051.patch","issue_url":"https://api.github.com/repos/Alexpux/MINGW-packages/issues/1051","number":1051,"state":"open","locked":false,"title":"Fix relocatable gettext-runtime on 64-bit systems","user":{"login":"dscho","id":127790,"avatar_url":"https://avatars.githubusercontent.com/u/127790?v=3","gravatar_id":"","url":"https://api.github.com/users/dscho","html_url":"https://github.com/dscho","followers_url":"https://api.github.com/users/dscho/followers","following_url":"https://api.github.com/users/dscho/following{/other_user}","gists_url":"https://api.github.com/users/dscho/gists{/gist_id}","starred_url":"https://api.github.com/users/dscho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dscho/subscriptions","organizations_url":"https://api.github.com/users/dscho/orgs","repos_url":"https://api.github.com/users/dscho/repos","events_url":"https://api.github.com/users/dscho/events{/privacy}","received_events_url":"https://api.github.com/users/dscho/received_events","type":"User","site_admin":false},"body":"When compiling code on 64-bit systems, the default return value of previously undeclared functions is `int`, as in *32-bit* integer value. This is a problem when the return value is actually a pointer. It becomes a real problem when the upper 32 bits of the register used to return that pointer are still set from previous usage (as is the case e.g. when the [`FLG_LDR_TOP_DOWN` global flag](https://technet.microsoft.com/en-us/library/cc779664%28v=ws.10%29.aspx) is set, as pretty much all return addresses have pretty much all of the upper 32 bits set to 1).\r\n\r\nThis is the problem that let anything using `bindtextdomain()` of the `gettext-runtime` package cause segmentation faults in this developer's tests.\r\n\r\nDeclaring the functions before using them miraculously fixes the segmentation faults.\r\n\r\nNote that there is more work to do, as e.g. `gdb.exe` *still* fails (it does not link `libintl` at all) and most likely has a similar issue in another code location.\r\n\r\nPlease also note that in my tests, the patched code was not even compiled when building `mingw-w64-gcc`. But then, `gcc.exe` did not crash with a segmentation fault to begin with.\r\n\r\nAnd lastly, I did not manage to get `mingw-w64-gcc-git` to build at all, so I did not fix that package's [\"Relocate libintl\" patch](https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-gcc-git/0001-Relocate-libintl.patch).","created_at":"2016-02-06T15:31:13Z","updated_at":"2016-02-06T15:31:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Alexpux/MINGW-packages/pulls/1051/commits","review_comments_url":"https://api.github.com/repos/Alexpux/MINGW-packages/pulls/1051/comments","review_comment_url":"https://api.github.com/repos/Alexpux/MINGW-packages/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Alexpux/MINGW-packages/issues/1051/comments","statuses_url":"https://api.github.com/repos/Alexpux/MINGW-packages/statuses/ce3aebc70f806d5f18dc431e34d6571f6a73887a","head":{"label":"dscho:relocatex-64-upstream","ref":"relocatex-64-upstream","sha":"ce3aebc70f806d5f18dc431e34d6571f6a73887a","user":{"login":"dscho","id":127790,"avatar_url":"https://avatars.githubusercontent.com/u/127790?v=3","gravatar_id":"","url":"https://api.github.com/users/dscho","html_url":"https://github.com/dscho","followers_url":"https://api.github.com/users/dscho/followers","following_url":"https://api.github.com/users/dscho/following{/other_user}","gists_url":"https://api.github.com/users/dscho/gists{/gist_id}","starred_url":"https://api.github.com/users/dscho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dscho/subscriptions","organizations_url":"https://api.github.com/users/dscho/orgs","repos_url":"https://api.github.com/users/dscho/repos","events_url":"https://api.github.com/users/dscho/events{/privacy}","received_events_url":"https://api.github.com/users/dscho/received_events","type":"User","site_admin":false},"repo":{"id":30747555,"name":"MINGW-packages","full_name":"dscho/MINGW-packages","owner":{"login":"dscho","id":127790,"avatar_url":"https://avatars.githubusercontent.com/u/127790?v=3","gravatar_id":"","url":"https://api.github.com/users/dscho","html_url":"https://github.com/dscho","followers_url":"https://api.github.com/users/dscho/followers","following_url":"https://api.github.com/users/dscho/following{/other_user}","gists_url":"https://api.github.com/users/dscho/gists{/gist_id}","starred_url":"https://api.github.com/users/dscho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dscho/subscriptions","organizations_url":"https://api.github.com/users/dscho/orgs","repos_url":"https://api.github.com/users/dscho/repos","events_url":"https://api.github.com/users/dscho/events{/privacy}","received_events_url":"https://api.github.com/users/dscho/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dscho/MINGW-packages","description":"Package scripts for MinGW-w64 targets to build under MSYS2.","fork":true,"url":"https://api.github.com/repos/dscho/MINGW-packages","forks_url":"https://api.github.com/repos/dscho/MINGW-packages/forks","keys_url":"https://api.github.com/repos/dscho/MINGW-packages/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dscho/MINGW-packages/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dscho/MINGW-packages/teams","hooks_url":"https://api.github.com/repos/dscho/MINGW-packages/hooks","issue_events_url":"https://api.github.com/repos/dscho/MINGW-packages/issues/events{/number}","events_url":"https://api.github.com/repos/dscho/MINGW-packages/events","assignees_url":"https://api.github.com/repos/dscho/MINGW-packages/assignees{/user}","branches_url":"https://api.github.com/repos/dscho/MINGW-packages/branches{/branch}","tags_url":"https://api.github.com/repos/dscho/MINGW-packages/tags","blobs_url":"https://api.github.com/repos/dscho/MINGW-packages/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dscho/MINGW-packages/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dscho/MINGW-packages/git/refs{/sha}","trees_url":"https://api.github.com/repos/dscho/MINGW-packages/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dscho/MINGW-packages/statuses/{sha}","languages_url":"https://api.github.com/repos/dscho/MINGW-packages/languages","stargazers_url":"https://api.github.com/repos/dscho/MINGW-packages/stargazers","contributors_url":"https://api.github.com/repos/dscho/MINGW-packages/contributors","subscribers_url":"https://api.github.com/repos/dscho/MINGW-packages/subscribers","subscription_url":"https://api.github.com/repos/dscho/MINGW-packages/subscription","commits_url":"https://api.github.com/repos/dscho/MINGW-packages/commits{/sha}","git_commits_url":"https://api.github.com/repos/dscho/MINGW-packages/git/commits{/sha}","comments_url":"https://api.github.com/repos/dscho/MINGW-packages/comments{/number}","issue_comment_url":"https://api.github.com/repos/dscho/MINGW-packages/issues/comments{/number}","contents_url":"https://api.github.com/repos/dscho/MINGW-packages/contents/{+path}","compare_url":"https://api.github.com/repos/dscho/MINGW-packages/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dscho/MINGW-packages/merges","archive_url":"https://api.github.com/repos/dscho/MINGW-packages/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dscho/MINGW-packages/downloads","issues_url":"https://api.github.com/repos/dscho/MINGW-packages/issues{/number}","pulls_url":"https://api.github.com/repos/dscho/MINGW-packages/pulls{/number}","milestones_url":"https://api.github.com/repos/dscho/MINGW-packages/milestones{/number}","notifications_url":"https://api.github.com/repos/dscho/MINGW-packages/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dscho/MINGW-packages/labels{/name}","releases_url":"https://api.github.com/repos/dscho/MINGW-packages/releases{/id}","deployments_url":"https://api.github.com/repos/dscho/MINGW-packages/deployments","created_at":"2015-02-13T08:34:15Z","updated_at":"2015-02-13T08:34:20Z","pushed_at":"2016-02-06T12:49:21Z","git_url":"git://github.com/dscho/MINGW-packages.git","ssh_url":"git@github.com:dscho/MINGW-packages.git","clone_url":"https://github.com/dscho/MINGW-packages.git","svn_url":"https://github.com/dscho/MINGW-packages","homepage":null,"size":14875,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Alexpux:master","ref":"master","sha":"07718323108f6403e744f8ac6324baf498b9f0cf","user":{"login":"Alexpux","id":1898153,"avatar_url":"https://avatars.githubusercontent.com/u/1898153?v=3","gravatar_id":"","url":"https://api.github.com/users/Alexpux","html_url":"https://github.com/Alexpux","followers_url":"https://api.github.com/users/Alexpux/followers","following_url":"https://api.github.com/users/Alexpux/following{/other_user}","gists_url":"https://api.github.com/users/Alexpux/gists{/gist_id}","starred_url":"https://api.github.com/users/Alexpux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alexpux/subscriptions","organizations_url":"https://api.github.com/users/Alexpux/orgs","repos_url":"https://api.github.com/users/Alexpux/repos","events_url":"https://api.github.com/users/Alexpux/events{/privacy}","received_events_url":"https://api.github.com/users/Alexpux/received_events","type":"User","site_admin":false},"repo":{"id":14447732,"name":"MINGW-packages","full_name":"Alexpux/MINGW-packages","owner":{"login":"Alexpux","id":1898153,"avatar_url":"https://avatars.githubusercontent.com/u/1898153?v=3","gravatar_id":"","url":"https://api.github.com/users/Alexpux","html_url":"https://github.com/Alexpux","followers_url":"https://api.github.com/users/Alexpux/followers","following_url":"https://api.github.com/users/Alexpux/following{/other_user}","gists_url":"https://api.github.com/users/Alexpux/gists{/gist_id}","starred_url":"https://api.github.com/users/Alexpux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alexpux/subscriptions","organizations_url":"https://api.github.com/users/Alexpux/orgs","repos_url":"https://api.github.com/users/Alexpux/repos","events_url":"https://api.github.com/users/Alexpux/events{/privacy}","received_events_url":"https://api.github.com/users/Alexpux/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Alexpux/MINGW-packages","description":"Package scripts for MinGW-w64 targets to build under MSYS2.","fork":false,"url":"https://api.github.com/repos/Alexpux/MINGW-packages","forks_url":"https://api.github.com/repos/Alexpux/MINGW-packages/forks","keys_url":"https://api.github.com/repos/Alexpux/MINGW-packages/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Alexpux/MINGW-packages/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Alexpux/MINGW-packages/teams","hooks_url":"https://api.github.com/repos/Alexpux/MINGW-packages/hooks","issue_events_url":"https://api.github.com/repos/Alexpux/MINGW-packages/issues/events{/number}","events_url":"https://api.github.com/repos/Alexpux/MINGW-packages/events","assignees_url":"https://api.github.com/repos/Alexpux/MINGW-packages/assignees{/user}","branches_url":"https://api.github.com/repos/Alexpux/MINGW-packages/branches{/branch}","tags_url":"https://api.github.com/repos/Alexpux/MINGW-packages/tags","blobs_url":"https://api.github.com/repos/Alexpux/MINGW-packages/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Alexpux/MINGW-packages/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Alexpux/MINGW-packages/git/refs{/sha}","trees_url":"https://api.github.com/repos/Alexpux/MINGW-packages/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Alexpux/MINGW-packages/statuses/{sha}","languages_url":"https://api.github.com/repos/Alexpux/MINGW-packages/languages","stargazers_url":"https://api.github.com/repos/Alexpux/MINGW-packages/stargazers","contributors_url":"https://api.github.com/repos/Alexpux/MINGW-packages/contributors","subscribers_url":"https://api.github.com/repos/Alexpux/MINGW-packages/subscribers","subscription_url":"https://api.github.com/repos/Alexpux/MINGW-packages/subscription","commits_url":"https://api.github.com/repos/Alexpux/MINGW-packages/commits{/sha}","git_commits_url":"https://api.github.com/repos/Alexpux/MINGW-packages/git/commits{/sha}","comments_url":"https://api.github.com/repos/Alexpux/MINGW-packages/comments{/number}","issue_comment_url":"https://api.github.com/repos/Alexpux/MINGW-packages/issues/comments{/number}","contents_url":"https://api.github.com/repos/Alexpux/MINGW-packages/contents/{+path}","compare_url":"https://api.github.com/repos/Alexpux/MINGW-packages/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Alexpux/MINGW-packages/merges","archive_url":"https://api.github.com/repos/Alexpux/MINGW-packages/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Alexpux/MINGW-packages/downloads","issues_url":"https://api.github.com/repos/Alexpux/MINGW-packages/issues{/number}","pulls_url":"https://api.github.com/repos/Alexpux/MINGW-packages/pulls{/number}","milestones_url":"https://api.github.com/repos/Alexpux/MINGW-packages/milestones{/number}","notifications_url":"https://api.github.com/repos/Alexpux/MINGW-packages/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Alexpux/MINGW-packages/labels{/name}","releases_url":"https://api.github.com/repos/Alexpux/MINGW-packages/releases{/id}","deployments_url":"https://api.github.com/repos/Alexpux/MINGW-packages/deployments","created_at":"2013-11-16T13:47:02Z","updated_at":"2016-02-06T15:11:09Z","pushed_at":"2016-02-06T15:15:59Z","git_url":"git://github.com/Alexpux/MINGW-packages.git","ssh_url":"git@github.com:Alexpux/MINGW-packages.git","clone_url":"https://github.com/Alexpux/MINGW-packages.git","svn_url":"https://github.com/Alexpux/MINGW-packages","homepage":null,"size":15162,"stargazers_count":334,"watchers_count":334,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":203,"mirror_url":null,"open_issues_count":117,"forks":203,"open_issues":117,"watchers":334,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Alexpux/MINGW-packages/pulls/1051"},"html":{"href":"https://github.com/Alexpux/MINGW-packages/pull/1051"},"issue":{"href":"https://api.github.com/repos/Alexpux/MINGW-packages/issues/1051"},"comments":{"href":"https://api.github.com/repos/Alexpux/MINGW-packages/issues/1051/comments"},"review_comments":{"href":"https://api.github.com/repos/Alexpux/MINGW-packages/pulls/1051/comments"},"review_comment":{"href":"https://api.github.com/repos/Alexpux/MINGW-packages/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Alexpux/MINGW-packages/pulls/1051/commits"},"statuses":{"href":"https://api.github.com/repos/Alexpux/MINGW-packages/statuses/ce3aebc70f806d5f18dc431e34d6571f6a73887a"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":1704,"deletions":1605,"changed_files":4}}