Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
9b7fe2a4
Commit
9b7fe2a4
authored
Nov 15, 2019
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use POSIX API on UWP
parent
c58b7d9c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
include/fmt/posix.h
include/fmt/posix.h
+7
-2
test/CMakeLists.txt
test/CMakeLists.txt
+0
-1
test/gtest-extra.cc
test/gtest-extra.cc
+1
-1
No files found.
include/fmt/posix.h
View file @
9b7fe2a4
...
@@ -26,7 +26,12 @@
...
@@ -26,7 +26,12 @@
#include "format.h"
#include "format.h"
#if FMT_HAS_INCLUDE("fcntl.h")
// UWP doesn't provide _pipe.
#if FMT_HAS_INCLUDE("winapifamily.h")
# include <winapifamily.h>
#endif
#if FMT_HAS_INCLUDE("fcntl.h") && \
(!defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP))
# include <fcntl.h> // for O_RDONLY
# include <fcntl.h> // for O_RDONLY
# define FMT_USE_FCNTL 1
# define FMT_USE_FCNTL 1
#else
#else
...
@@ -60,7 +65,7 @@
...
@@ -60,7 +65,7 @@
#ifndef _WIN32
#ifndef _WIN32
# define FMT_RETRY_VAL(result, expression, error_result) \
# define FMT_RETRY_VAL(result, expression, error_result) \
do { \
do { \
(result) = (expression);
\
(result) = (expression); \
} while ((result) == (error_result) && errno == EINTR)
} while ((result) == (error_result) && errno == EINTR)
#else
#else
# define FMT_RETRY_VAL(result, expression, error_result) result = (expression)
# define FMT_RETRY_VAL(result, expression, error_result) result = (expression)
...
...
test/CMakeLists.txt
View file @
9b7fe2a4
...
@@ -116,7 +116,6 @@ if (NOT MSVC_BUILD_STATIC)
...
@@ -116,7 +116,6 @@ if (NOT MSVC_BUILD_STATIC)
posix-mock-test.cc ../src/format.cc
${
TEST_MAIN_SRC
}
)
posix-mock-test.cc ../src/format.cc
${
TEST_MAIN_SRC
}
)
target_include_directories
(
target_include_directories
(
posix-mock-test PRIVATE
${
PROJECT_SOURCE_DIR
}
/include
)
posix-mock-test PRIVATE
${
PROJECT_SOURCE_DIR
}
/include
)
target_compile_definitions
(
posix-mock-test PRIVATE FMT_USE_FILE_DESCRIPTORS=1
)
target_link_libraries
(
posix-mock-test gmock
)
target_link_libraries
(
posix-mock-test gmock
)
target_include_directories
(
posix-mock-test SYSTEM PUBLIC gtest gmock
)
target_include_directories
(
posix-mock-test SYSTEM PUBLIC gtest gmock
)
if
(
FMT_PEDANTIC
)
if
(
FMT_PEDANTIC
)
...
...
test/gtest-extra.cc
View file @
9b7fe2a4
...
@@ -78,7 +78,7 @@ std::string read(file& f, std::size_t count) {
...
@@ -78,7 +78,7 @@ std::string read(file& f, std::size_t count) {
return
buffer
;
return
buffer
;
}
}
#endif // FMT_USE_F
ILE_DESCRIPTORS
#endif // FMT_USE_F
CNTL
std
::
string
format_system_error
(
int
error_code
,
fmt
::
string_view
message
)
{
std
::
string
format_system_error
(
int
error_code
,
fmt
::
string_view
message
)
{
fmt
::
memory_buffer
out
;
fmt
::
memory_buffer
out
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment