Improve POSIX API detection

This commit is contained in:
Victor Zverovich
2019-11-15 07:28:02 -08:00
parent 2145a7bdcc
commit dcde089b4e
12 changed files with 67 additions and 55 deletions
+4 -1
View File
@@ -30,7 +30,6 @@
using fmt::buffered_file;
using fmt::error_code;
using fmt::file;
using testing::_;
using testing::Return;
@@ -198,6 +197,9 @@ static void write_file(fmt::cstring_view filename, fmt::string_view content) {
f.print("{}", content);
}
#if FMT_USE_FCNTL
using fmt::file;
TEST(UtilTest, GetPageSize) {
#ifdef _WIN32
SYSTEM_INFO si = {};
@@ -429,6 +431,7 @@ TEST(BufferedFileTest, FilenoNoRetry) {
EXPECT_EQ(2, fileno_count);
fileno_count = 0;
}
#endif // FMT_USE_FCNTL
struct TestMock {
static TestMock* instance;