mirror of
https://github.com/fmtlib/fmt.git
synced 2026-04-12 20:56:03 +02:00
Improve POSIX API detection
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
#include "fmt/posix.h"
|
||||
|
||||
#include <climits>
|
||||
|
||||
#if FMT_USE_FCNTL
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
@@ -39,8 +41,8 @@
|
||||
# ifdef __MINGW32__
|
||||
# define _SH_DENYNO 0x40
|
||||
# endif
|
||||
|
||||
#endif // _WIN32
|
||||
#endif // FMT_USE_FCNTL
|
||||
|
||||
#ifdef fileno
|
||||
# undef fileno
|
||||
@@ -94,6 +96,7 @@ int buffered_file::fileno() const {
|
||||
return fd;
|
||||
}
|
||||
|
||||
#if FMT_USE_FCNTL
|
||||
file::file(cstring_view path, int oflag) {
|
||||
int mode = S_IRUSR | S_IWUSR;
|
||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
@@ -230,4 +233,5 @@ long getpagesize() {
|
||||
return size;
|
||||
#endif
|
||||
}
|
||||
#endif // FMT_USE_FCNTL
|
||||
FMT_END_NAMESPACE
|
||||
|
||||
Reference in New Issue
Block a user