-
Notifications
You must be signed in to change notification settings - Fork 520
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normalized build for MinGW-w64 (#432)
* Normalized build for MinGW-w64 * Creared default build config * Moved inclusion of build config to top in single_file_split.h * Moved inclusion of build config to top in local_filesys.cc * Commented out #define FOPEN_64_PRESENT * Excluded include/dmlc/build_config.h from lint. * Use existing logic for fopen64 when CMake is not called * Pass build_config.h to lint check * Use dmlc/base.h in local_filesys.cc to capture DMLC_USE_FOPEN64 flag
- Loading branch information
Showing
7 changed files
with
43 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,4 @@ build | |
# CLion | ||
.idea | ||
cmake-build-* | ||
/include/dmlc/build_config.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#ifndef DMLC_BUILD_CONFIG_H_ | ||
#define DMLC_BUILD_CONFIG_H_ | ||
|
||
#cmakedefine FOPEN_64_PRESENT | ||
|
||
#if !defined(FOPEN_64_PRESENT) && DMLC_USE_FOPEN64 | ||
#warning "Redefining fopen64 with std::fopen" | ||
#define fopen64 std::fopen | ||
#endif | ||
|
||
#endif // DMLC_BUILD_CONFIG_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/*! | ||
* Copyright (c) 2018 by Contributors | ||
* \file build_config.h | ||
* \brief Default detection logic for fopen64. May be overriden by CMake | ||
* \author KOLANICH | ||
*/ | ||
#ifndef DMLC_BUILD_CONFIG_H_ | ||
#define DMLC_BUILD_CONFIG_H_ | ||
|
||
#if DMLC_USE_FOPEN64 && \ | ||
(!defined(__GNUC__) || (defined __ANDROID__) || (defined __FreeBSD__) \ | ||
|| (defined __APPLE__) || ((defined __MINGW32__) && !(defined __MINGW64__))) | ||
#warning "Redefining fopen64 with std::fopen" | ||
#define fopen64 std::fopen | ||
#endif | ||
|
||
#endif // DMLC_BUILD_CONFIG_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters