@@ -154,7 +154,7 @@ inline std::string log_filename_generator_impl(const std::string & log_file_base
154
154
// #include "log.h"
155
155
//
156
156
#ifndef LOG_NO_TIMESTAMPS
157
- #ifndef _WIN32
157
+ #ifndef _MSC_VER
158
158
#define LOG_TIMESTAMP_FMT " [%" PRIu64 " ] "
159
159
#define LOG_TIMESTAMP_VAL , (std::chrono::duration_cast<std::chrono::duration<std::uint64_t >>(std::chrono::system_clock::now().time_since_epoch())).count()
160
160
#else
@@ -167,7 +167,7 @@ inline std::string log_filename_generator_impl(const std::string & log_file_base
167
167
#endif
168
168
169
169
#ifdef LOG_TEE_TIMESTAMPS
170
- #ifndef _WIN32
170
+ #ifndef _MSC_VER
171
171
#define LOG_TEE_TIMESTAMP_FMT " [%" PRIu64 " ] "
172
172
#define LOG_TEE_TIMESTAMP_VAL , (std::chrono::duration_cast<std::chrono::duration<std::uint64_t >>(std::chrono::system_clock::now().time_since_epoch())).count()
173
173
#else
@@ -187,7 +187,7 @@ inline std::string log_filename_generator_impl(const std::string & log_file_base
187
187
// #include "log.h"
188
188
//
189
189
#ifndef LOG_NO_FILE_LINE_FUNCTION
190
- #ifndef _WIN32
190
+ #ifndef _MSC_VER
191
191
#define LOG_FLF_FMT " [%24s:%5d][%24s] "
192
192
#define LOG_FLF_VAL , __FILE__, __LINE__, __FUNCTION__
193
193
#else
@@ -200,7 +200,7 @@ inline std::string log_filename_generator_impl(const std::string & log_file_base
200
200
#endif
201
201
202
202
#ifdef LOG_TEE_FILE_LINE_FUNCTION
203
- #ifndef _WIN32
203
+ #ifndef _MSC_VER
204
204
#define LOG_TEE_FLF_FMT " [%24s:%5d][%24s] "
205
205
#define LOG_TEE_FLF_VAL , __FILE__, __LINE__, __FUNCTION__
206
206
#else
@@ -224,7 +224,7 @@ enum LogTriState
224
224
// INTERNAL, DO NOT USE
225
225
// USE LOG() INSTEAD
226
226
//
227
- #ifndef _WIN32
227
+ #ifndef _MSC_VER
228
228
#define LOG_IMPL (str, ...) \
229
229
{ \
230
230
if (LOG_TARGET != nullptr ) \
@@ -247,7 +247,7 @@ enum LogTriState
247
247
// INTERNAL, DO NOT USE
248
248
// USE LOG_TEE() INSTEAD
249
249
//
250
- #ifndef _WIN32
250
+ #ifndef _MSC_VER
251
251
#define LOG_TEE_IMPL (str, ...) \
252
252
{ \
253
253
if (LOG_TARGET != nullptr ) \
@@ -284,7 +284,7 @@ enum LogTriState
284
284
// Main LOG macro.
285
285
// behaves like printf, and supports arguments the exact same way.
286
286
//
287
- #ifndef _WIN32
287
+ #ifndef _MSC_VER
288
288
#define LOG (...) LOG_IMPL(__VA_ARGS__, " " )
289
289
#else
290
290
#define LOG (str, ...) LOG_IMPL(" %s" str, " " , __VA_ARGS__, " " )
@@ -298,14 +298,14 @@ enum LogTriState
298
298
// Secondary target can be changed just like LOG_TARGET
299
299
// by defining LOG_TEE_TARGET
300
300
//
301
- #ifndef _WIN32
301
+ #ifndef _MSC_VER
302
302
#define LOG_TEE (...) LOG_TEE_IMPL(__VA_ARGS__, " " )
303
303
#else
304
304
#define LOG_TEE (str, ...) LOG_TEE_IMPL(" %s" str, " " , __VA_ARGS__, " " )
305
305
#endif
306
306
307
307
// LOG macro variants with auto endline.
308
- #ifndef _WIN32
308
+ #ifndef _MSC_VER
309
309
#define LOGLN (...) LOG_IMPL(__VA_ARGS__, " \n " )
310
310
#define LOG_TEELN (...) LOG_TEE_IMPL(__VA_ARGS__, " \n " )
311
311
#else
@@ -461,7 +461,7 @@ inline void log_test()
461
461
LOG (" 13 Hello World this time in yet new file?\n " )
462
462
log_set_target (log_filename_generator (" llama_autonamed" , " log" ));
463
463
LOG (" 14 Hello World in log with generated filename!\n " )
464
- #ifdef _WIN32
464
+ #ifdef _MSC_VER
465
465
LOG_TEE (" 15 Hello msvc TEE without arguments\n " )
466
466
LOG_TEE (" 16 Hello msvc TEE with (%d)(%s) arguments\n " , 1 , " test" )
467
467
LOG_TEELN (" 17 Hello msvc TEELN without arguments\n " )
0 commit comments