refactor
This commit is contained in:
parent
e652c9956e
commit
dd4724e374
@ -156,6 +156,48 @@ using namespace std::chrono_literals;
|
|||||||
|
|
||||||
REPERTORY_IGNORE_WARNINGS_DISABLE()
|
REPERTORY_IGNORE_WARNINGS_DISABLE()
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#ifdef CreateDirectory
|
||||||
|
#undef CreateDirectory
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CreateFile
|
||||||
|
#undef CreateFile
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DeleteFile
|
||||||
|
#undef DeleteFile
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef RemoveDirectory
|
||||||
|
#undef RemoveDirectory
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _SH_DENYRW
|
||||||
|
#define _SH_DENYRW 0x10 // deny read/write mode
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _SH_DENYWR
|
||||||
|
#define _SH_DENYWR 0x20 // deny write mode
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _SH_DENYRD
|
||||||
|
#define _SH_DENYRD 0x30 // deny read mode
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _SH_DENYNO
|
||||||
|
#define _SH_DENYNO 0x40 // deny none mode
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _SH_SECURE
|
||||||
|
#define _SH_SECURE 0x80 // secure mode
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ENETDOWN
|
||||||
|
#define ENETDOWN 100
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace repertory {
|
namespace repertory {
|
||||||
auto get_repertory_git_revision() -> const std::string &;
|
auto get_repertory_git_revision() -> const std::string &;
|
||||||
auto get_repertory_version() -> const std::string &;
|
auto get_repertory_version() -> const std::string &;
|
||||||
|
@ -22,55 +22,10 @@
|
|||||||
#ifndef INCLUDE_PLATFORM_PLATFORM_HPP_
|
#ifndef INCLUDE_PLATFORM_PLATFORM_HPP_
|
||||||
#define INCLUDE_PLATFORM_PLATFORM_HPP_
|
#define INCLUDE_PLATFORM_PLATFORM_HPP_
|
||||||
|
|
||||||
#include "platform/unix_platform.hpp"
|
|
||||||
#include "platform/win32_platform.hpp"
|
|
||||||
|
|
||||||
#define WINFSP_ALLOCATION_UNIT UINT64(4096U)
|
#define WINFSP_ALLOCATION_UNIT UINT64(4096U)
|
||||||
|
|
||||||
constexpr const auto NANOS_PER_SECOND = 1000000000L;
|
constexpr const auto NANOS_PER_SECOND = 1000000000L;
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#ifdef CreateDirectory
|
|
||||||
#undef CreateDirectory
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CreateFile
|
|
||||||
#undef CreateFile
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DeleteFile
|
|
||||||
#undef DeleteFile
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef RemoveDirectory
|
|
||||||
#undef RemoveDirectory
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _SH_DENYRW
|
|
||||||
#define _SH_DENYRW 0x10 // deny read/write mode
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _SH_DENYWR
|
|
||||||
#define _SH_DENYWR 0x20 // deny write mode
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _SH_DENYRD
|
|
||||||
#define _SH_DENYRD 0x30 // deny read mode
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _SH_DENYNO
|
|
||||||
#define _SH_DENYNO 0x40 // deny none mode
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _SH_SECURE
|
|
||||||
#define _SH_SECURE 0x80 // secure mode
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef ENETDOWN
|
|
||||||
#define ENETDOWN 100
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SETATTR_WANTS_MODE
|
#ifndef SETATTR_WANTS_MODE
|
||||||
#define SETATTR_WANTS_MODE(attr) ((attr)->valid & (1 << 0))
|
#define SETATTR_WANTS_MODE(attr) ((attr)->valid & (1 << 0))
|
||||||
#endif // SETATTR_WANTS_MODE
|
#endif // SETATTR_WANTS_MODE
|
||||||
@ -257,4 +212,7 @@ using FileInfo = FSP_FSCTL_FILE_INFO;
|
|||||||
|
|
||||||
using namespace Fsp;
|
using namespace Fsp;
|
||||||
|
|
||||||
|
#include "platform/unix_platform.hpp"
|
||||||
|
#include "platform/win32_platform.hpp"
|
||||||
|
|
||||||
#endif // INCLUDE_PLATFORM_PLATFORM_HPP_
|
#endif // INCLUDE_PLATFORM_PLATFORM_HPP_
|
||||||
|
Loading…
x
Reference in New Issue
Block a user