mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-28 08:20:19 +08:00
Clean os.h macros
This commit is contained in:
parent
6c799d04f8
commit
3954caccc1
@ -21,25 +21,15 @@ SPDLOG_API std::tm gmtime(const std::time_t &time_tt) noexcept;
|
|||||||
|
|
||||||
SPDLOG_API std::tm gmtime() noexcept;
|
SPDLOG_API std::tm gmtime() noexcept;
|
||||||
|
|
||||||
// eol definition
|
// eol definition and folder separator for the current os
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
constexpr static const char *default_eol = "\r\n";
|
constexpr static const char *default_eol = "\r\n";
|
||||||
|
constexpr static const filename_t::value_type folder_seps_filename[] = SPDLOG_FILENAME_T("\\/");
|
||||||
#else
|
#else
|
||||||
constexpr static const char *default_eol = "\n";
|
constexpr static const char *default_eol = "\n";
|
||||||
|
constexpr static const filename_t::value_type folder_seps_filename[] = SPDLOG_FILENAME_T("/");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// folder separator
|
|
||||||
#if !defined(SPDLOG_FOLDER_SEPS)
|
|
||||||
#ifdef _WIN32
|
|
||||||
#define SPDLOG_FOLDER_SEPS "\\/"
|
|
||||||
#else
|
|
||||||
#define SPDLOG_FOLDER_SEPS "/"
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
constexpr static const char folder_seps[] = SPDLOG_FOLDER_SEPS;
|
|
||||||
constexpr static const filename_t::value_type folder_seps_filename[] = SPDLOG_FILENAME_T(SPDLOG_FOLDER_SEPS);
|
|
||||||
|
|
||||||
// fopen_s on non windows for writing
|
// fopen_s on non windows for writing
|
||||||
SPDLOG_API bool fopen_s(FILE **fp, const filename_t &filename, const filename_t &mode);
|
SPDLOG_API bool fopen_s(FILE **fp, const filename_t &filename, const filename_t &mode);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user