|
|
@@ -12,11 +12,29 @@ |
|
|
|
|
|
|
|
#pragma once |
|
|
|
|
|
|
|
#include <version> |
|
|
|
#if defined _LIBCPP_HAS_NO_INCOMPLETE_FORMAT |
|
|
|
#define LOL_HAS_STD_FORMAT 1 |
|
|
|
|
|
|
|
#if !defined __SCE__ |
|
|
|
# include <version> // Provide _LIBCPP_HAS_NO_INCOMPLETE_FORMAT if relevant |
|
|
|
# if defined _LIBCPP_HAS_NO_INCOMPLETE_FORMAT |
|
|
|
# undef LOL_HAS_STD_FORMAT |
|
|
|
# endif |
|
|
|
#endif |
|
|
|
|
|
|
|
#if defined __SCE__ |
|
|
|
# undef LOL_HAS_STD_FORMAT |
|
|
|
# include <cstdio> |
|
|
|
// These functions are used unconditionally in libfmt |
|
|
|
static inline void flockfile(FILE* f) { } |
|
|
|
static inline void funlockfile(FILE* f) { } |
|
|
|
static inline int getc_unlocked(FILE*) { return 0; } |
|
|
|
static inline int putc_unlocked(int, FILE*) { return 0; } |
|
|
|
#endif |
|
|
|
|
|
|
|
#if defined LOL_HAS_STD_FORMAT |
|
|
|
# include <format> |
|
|
|
#else |
|
|
|
# define FMT_HEADER_ONLY |
|
|
|
# include "3rdparty/fmt/include/fmt/format.h" |
|
|
|
namespace std { using fmt::format; } |
|
|
|
#else |
|
|
|
# include <format> |
|
|
|
#endif |