{"action":"created","issue":{"url":"https://api.github.com/repos/hercules-390/hyperion/issues/102","repository_url":"https://api.github.com/repos/hercules-390/hyperion","labels_url":"https://api.github.com/repos/hercules-390/hyperion/issues/102/labels{/name}","comments_url":"https://api.github.com/repos/hercules-390/hyperion/issues/102/comments","events_url":"https://api.github.com/repos/hercules-390/hyperion/issues/102/events","html_url":"https://github.com/hercules-390/hyperion/issues/102","id":150660090,"number":102,"title":"Unable to build 32-bit Hercules using Windows SDK 8.1 or 10","user":{"login":"srorso","id":17149494,"avatar_url":"https://avatars.githubusercontent.com/u/17149494?v=3","gravatar_id":"","url":"https://api.github.com/users/srorso","html_url":"https://github.com/srorso","followers_url":"https://api.github.com/users/srorso/followers","following_url":"https://api.github.com/users/srorso/following{/other_user}","gists_url":"https://api.github.com/users/srorso/gists{/gist_id}","starred_url":"https://api.github.com/users/srorso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srorso/subscriptions","organizations_url":"https://api.github.com/users/srorso/orgs","repos_url":"https://api.github.com/users/srorso/repos","events_url":"https://api.github.com/users/srorso/events{/privacy}","received_events_url":"https://api.github.com/users/srorso/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hercules-390/hyperion/labels/BUG","name":"BUG","color":"FF3300"},{"url":"https://api.github.com/repos/hercules-390/hyperion/labels/Fix%20being%20tested...","name":"Fix being tested...","color":"22DA5C"},{"url":"https://api.github.com/repos/hercules-390/hyperion/labels/In%20progress...","name":"In progress...","color":"FF9933"}],"state":"closed","locked":false,"assignee":{"login":"srorso","id":17149494,"avatar_url":"https://avatars.githubusercontent.com/u/17149494?v=3","gravatar_id":"","url":"https://api.github.com/users/srorso","html_url":"https://github.com/srorso","followers_url":"https://api.github.com/users/srorso/followers","following_url":"https://api.github.com/users/srorso/following{/other_user}","gists_url":"https://api.github.com/users/srorso/gists{/gist_id}","starred_url":"https://api.github.com/users/srorso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srorso/subscriptions","organizations_url":"https://api.github.com/users/srorso/orgs","repos_url":"https://api.github.com/users/srorso/repos","events_url":"https://api.github.com/users/srorso/events{/privacy}","received_events_url":"https://api.github.com/users/srorso/received_events","type":"User","site_admin":false},"milestone":null,"comments":11,"created_at":"2016-04-24T13:18:58Z","updated_at":"2016-04-28T12:21:01Z","closed_at":"2016-04-28T04:24:29Z","body":"Building any Hercules using Windows SDK 8.1 or 10 results in the following error messages, followed by a termination of the build.  Windows SDK 8.1 or 10 are the only SDK's supported by Visual Studio 2015. Because there does not seem to be any \"bit-ness\" in the SDKs, I believe this will be an issue for 64-bit builds as well, but I cannot confirm.  \r\n\r\n>C:\\Program Files\\Windows Kits\\10\\include\\10.0.10586.0\\um\\winioctl.h(6519): error C2143: syntax error: missing ':' before 'constant'\r\n1>C:\\Program Files\\Windows Kits\\10\\include\\10.0.10586.0\\um\\winioctl.h(6520): error C2143: syntax error: missing ':' before 'constant'\r\n1>C:\\Program Files\\Windows Kits\\10\\include\\10.0.10586.0\\um\\winioctl.h(6521): error C2143: syntax error: missing ':' before 'constant'\r\n1>C:\\Program Files\\Windows Kits\\10\\include\\10.0.10586.0\\um\\winioctl.h(6521): error C2034: '<alignment member>': type of bit field too small for number of bits\r\n1>NMAKE : fatal error U1077: '\"C:\\Program Files\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.EXE\"' : return code '0x2'\r\n1>  Stop.\r\n1>C:\\Program Files\\MSBuild\\Microsoft.Cpp\\v4.0\\V140\\Microsoft.MakeFile.Targets(37,5): error MSB3073: The command \"makefile.bat RETAIL makefile.msvc 32\" exited with code 2.\r\n\r\nThis issue arises because winioctl.h in both SDKs defines the following union:\r\n\r\ntypedef union {\r\n       USN_RECORD_COMMON_HEADER Header;\r\n       USN_RECORD_V2 V2;\r\n       USN_RECORD_V3 V3;\r\n       USN_RECORD_V4 V4;\r\n} USN_RECORD_UNION, *PUSN_RECORD_UNION;\r\n\r\nThe union defines the three layouts of the Update Sequence Number records in the NTFS journal; prior to Windows 8.1, there was only one supported layout named USN_RECORD and no union was defined in winioctl.h.  Builds using older SDK's are not affected as a result.  \r\n\r\nWhen HERC_FLAGS.msvc passes preprocessor variables V1, V2, V3, and V4 into the C environment, expansion of those variables creates syntax errors when the union is compiled.  So it's not VS2015 that uses them, it's the Windows 8.1/10 SDK.  \r\n\r\nCommits between 971ebe4 and 6989a0d inclusive can be built using the 8.1/10 SDKs because between those commits, V1, V2, V3, and V4 were not passed to the C environment and winioctl.h compiled cleanly. \r\n\r\nV1, V2, V3, and V4 are defined in makefile.bat, set up and assembled into the Version variable in VERSION.msvc, passed to the C preprocessor via -D flags in HERC_FLAGS.msvc, edit-checked inside the C preprocessor environment in version.h, and edit-checked and if necessary defaulted to zero in dyngui.c.  The defaulting in dyngui.c enabled clean builds when the variables were not included in -D flags in the commit range above.  \r\n\r\nI will rename the Hercules V1, V2, V3, and V4 variables to VERSION_SUB1 etc., and I'll be happy to implement an alternative solution or variable name.  \r\n\r\n\r\nAdditional information:\r\n\r\nNTFS Change Journal Description\r\n\r\n[https://msdn.microsoft.com/en-us/library/windows/desktop/aa363798(v=vs.85).aspx](https://msdn.microsoft.com/en-us/library/windows/desktop/aa363798(v=vs.85).aspx)\r\n\r\n\r\nDescription of USN Journal Record Layout V2 and links to V3 and V4\r\n\r\n[https://msdn.microsoft.com/en-us/library/windows/desktop/aa365722(v=vs.85).aspx](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365722(v=vs.85).aspx)\r\n"},"comment":{"url":"https://api.github.com/repos/hercules-390/hyperion/issues/comments/215406904","html_url":"https://github.com/hercules-390/hyperion/issues/102#issuecomment-215406904","issue_url":"https://api.github.com/repos/hercules-390/hyperion/issues/102","id":215406904,"user":{"login":"srorso","id":17149494,"avatar_url":"https://avatars.githubusercontent.com/u/17149494?v=3","gravatar_id":"","url":"https://api.github.com/users/srorso","html_url":"https://github.com/srorso","followers_url":"https://api.github.com/users/srorso/followers","following_url":"https://api.github.com/users/srorso/following{/other_user}","gists_url":"https://api.github.com/users/srorso/gists{/gist_id}","starred_url":"https://api.github.com/users/srorso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srorso/subscriptions","organizations_url":"https://api.github.com/users/srorso/orgs","repos_url":"https://api.github.com/users/srorso/repos","events_url":"https://api.github.com/users/srorso/events{/privacy}","received_events_url":"https://api.github.com/users/srorso/received_events","type":"User","site_admin":false},"created_at":"2016-04-28T12:21:01Z","updated_at":"2016-04-28T12:21:01Z","body":"Happy to make a contribution...I'm learning and having  fun, so no worries, and thanks for the kind words.  I had to Google Union to figure out what it was--that's where my C skills are--and learned I've been using it for years in other languages.  I thought the risk of doing wrong was limited when I saw that the now-old code was in place for four years.  No matter; you have the vision for how that's supposed to work, and I'm pleased to let the future trump the past (a metaphor rooted in playing-card games, not U.S. politics.)\r\n\r\nI'll be glad to move my OT content above to the Hercules-Devel; that's the right place for it. It would simplify future searches, even if it means everyone has to see the current posts twice.  "}}