Skip to content

Commit

Permalink
Consistently use lowercase names for Windows libraries and headers (#673
Browse files Browse the repository at this point in the history
)

MinGW consistently uses lowercase names for all libraries and header files, and
this toolchain is often employed to build libraries for Windows on Linux
systems, which typically use case-sensitive file systems.
  • Loading branch information
giordano authored Aug 8, 2023
1 parent ea21135 commit 5bffff3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ if(USE_OPENMP)
endif()

if(WIN32 AND (NOT MSVC)) # On Windows, link Shlwapi.lib for non-MSVC compilers
target_link_libraries(dmlc PRIVATE Shlwapi)
target_link_libraries(dmlc PRIVATE shlwapi)
endif()

# Check location of clock_gettime; if it's in librt, link it
Expand Down
4 changes: 2 additions & 2 deletions include/dmlc/filesystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#ifdef _WIN32
#define NOMINMAX
#include <windows.h>
#include <Shlwapi.h>
#pragma comment(lib, "Shlwapi.lib")
#include <shlwapi.h>
#pragma comment(lib, "shlwapi.lib")
#else // _WIN32
#include <unistd.h>
#include <sys/stat.h>
Expand Down
2 changes: 1 addition & 1 deletion src/io/local_filesys.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ extern "C" {
}
#define stat_struct stat
#else // _WIN32
#include <Windows.h>
#include <windows.h>
#define stat _stat64
#define stat_struct __stat64
#endif // _WIN32
Expand Down

0 comments on commit 5bffff3

Please sign in to comment.