{"action":"opened","issue":{"url":"https://api.github.com/repos/libdynd/libdynd/issues/1325","repository_url":"https://api.github.com/repos/libdynd/libdynd","labels_url":"https://api.github.com/repos/libdynd/libdynd/issues/1325/labels{/name}","comments_url":"https://api.github.com/repos/libdynd/libdynd/issues/1325/comments","events_url":"https://api.github.com/repos/libdynd/libdynd/issues/1325/events","html_url":"https://github.com/libdynd/libdynd/issues/1325","id":244789334,"number":1325,"title":"Use lowercase names for Windows API includes","user":{"login":"Alexhuszagh","id":9440903,"avatar_url":"https://avatars3.githubusercontent.com/u/9440903?v=4","gravatar_id":"","url":"https://api.github.com/users/Alexhuszagh","html_url":"https://github.com/Alexhuszagh","followers_url":"https://api.github.com/users/Alexhuszagh/followers","following_url":"https://api.github.com/users/Alexhuszagh/following{/other_user}","gists_url":"https://api.github.com/users/Alexhuszagh/gists{/gist_id}","starred_url":"https://api.github.com/users/Alexhuszagh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alexhuszagh/subscriptions","organizations_url":"https://api.github.com/users/Alexhuszagh/orgs","repos_url":"https://api.github.com/users/Alexhuszagh/repos","events_url":"https://api.github.com/users/Alexhuszagh/events{/privacy}","received_events_url":"https://api.github.com/users/Alexhuszagh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-21T21:36:31Z","updated_at":"2017-07-21T21:36:31Z","closed_at":null,"body":"Although Windows uses a case-insensitive filesystem, most other operating systems do not. Therefore, when cross-compiling, such as when using MXE or Fedora MinGW, the cross-compiler may not recognize valid includes from Windows headers. A convention was made, and all includes should use lowercase, since this does not conflict with a case-insensitive filesystem, and mirrors the naming conventions of headers in standard C++.\r\n\r\nTo support cross-compilers, only the following changes are required:\r\n\r\n```diff\r\ndiff --git a/include/dynd/memblock/memmap_memory_block.hpp b/include/dynd/memblock/memmap_memory_block.hpp\r\nindex 5a1f9b325..a6ebd6ded 100644\r\n--- a/include/dynd/memblock/memmap_memory_block.hpp\r\n+++ b/include/dynd/memblock/memmap_memory_block.hpp\r\n@@ -12,7 +12,7 @@\r\n #ifndef NOMINMAX\r\n #define NOMINMAX\r\n #endif\r\n-#include <Windows.h>\r\n+#include <windows.h>\r\n #else\r\n #include <fcntl.h>\r\n #include <sys/mman.h>\r\n```\r\n\r\n```diff\r\ndiff --git a/src/sysinfo.cc b/src/sysinfo.cc\r\nindex e10e19d..1c24239 100644\r\n--- a/src/sysinfo.cc\r\n+++ b/src/sysinfo.cc\r\n@@ -16,9 +16,9 @@\r\n #include \"internal_macros.h\"\r\n \r\n #ifdef BENCHMARK_OS_WINDOWS\r\n-#include <Shlwapi.h>\r\n-#include <Windows.h>\r\n-#include <VersionHelpers.h>\r\n+#include <shlwapi.h>\r\n+#include <windows.h>\r\n+#include <versionhelpers.h>\r\n #else\r\n #include <fcntl.h>\r\n #include <sys/resource.h>\r\n```\r\n\r\n```diff\r\ndiff --git a/src/colorprint.cc b/src/colorprint.cc\r\nindex 81f917b..e580738 100644\r\n--- a/src/colorprint.cc\r\n+++ b/src/colorprint.cc\r\n@@ -21,7 +21,7 @@\r\n #include \"internal_macros.h\"\r\n \r\n #ifdef BENCHMARK_OS_WINDOWS\r\n-#include <Windows.h>\r\n+#include <windows.h>\r\n #endif\r\n \r\n DECLARE_bool(color_print);\r\n```\r\n\r\n```diff\r\ndiff --git a/src/sleep.cc b/src/sleep.cc\r\nindex 918abc4..8f102d5 100644\r\n--- a/src/sleep.cc\r\n+++ b/src/sleep.cc\r\n@@ -20,7 +20,7 @@\r\n #include \"internal_macros.h\"\r\n \r\n #ifdef BENCHMARK_OS_WINDOWS\r\n-#include <Windows.h>\r\n+#include <windows.h>\r\n #endif\r\n \r\n namespace benchmark {\r\n```"}}
{"actor":{"display_login":"Alexhuszagh"}}