Skip to content

Commit 8bf6702

Browse files
authored
Merge pull request #226 from alex85k/master
Make libosmium compatible with MSYS2 (gcc 7.2.0 on Windows)
2 parents c059758 + e8dad73 commit 8bf6702

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

include/osmium/osm/timestamp.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,11 @@ namespace osmium {
230230
#ifndef NDEBUG
231231
auto result =
232232
#endif
233-
#ifndef _MSC_VER
234-
gmtime_r(&sse, &tm);
233+
#ifndef _WIN32
234+
gmtime_r(&sse, &tm);
235235
assert(result != nullptr);
236236
#else
237-
gmtime_s(&tm, &sse);
237+
gmtime_s(&tm, &sse);
238238
assert(result == 0);
239239
#endif
240240

include/osmium/util/file.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ namespace osmium {
174174
* @throws std::system_error If ftruncate(2) call failed
175175
*/
176176
inline void resize_file(int fd, std::size_t new_size) {
177-
#ifdef _WIN32
177+
#ifdef _MSC_VER
178178
detail::disable_invalid_parameter_handler diph;
179179
// https://msdn.microsoft.com/en-us/library/whx354w1.aspx
180180
if (::_chsize_s(fd, static_cast_with_assert<__int64>(new_size)) != 0) {

include/osmium/util/memory_mapping.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ namespace osmium {
146146

147147
#ifdef _WIN32
148148
HANDLE get_handle() const noexcept;
149-
HANDLE osmium::util::MemoryMapping::create_file_mapping() const noexcept;
150-
void* osmium::util::MemoryMapping::map_view_of_file() const noexcept;
149+
HANDLE create_file_mapping() const noexcept;
150+
void* map_view_of_file() const noexcept;
151151
#endif
152152

153153
int resize_fd(int fd) {

0 commit comments

Comments
 (0)