Skip to content

Commit 4986990

Browse files
committed
config_msvc: mv log_msg compat macros do debug
1 parent ec3f472 commit 4986990

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

src/aja_common.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author Martin Pulec <[email protected]>
44
*/
55
/*
6-
* Copyright (c) 2018-2024 CESNET
6+
* Copyright (c) 2018-2025 CESNET, zájmové sdružení právnických osob
77
* All rights reserved.
88
*
99
* Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,6 @@
4343
class CNTV2Card;
4444

4545
#ifdef _MSC_VER
46-
#define log_msg(x, ...) fprintf(stderr, __VA_ARGS__)
4746
#define bug_msg(x, ...) \
4847
log_msg(x, __VA_ARGS__); \
4948
log_msg(x, " Please report a bug if you reach here.\n")

src/config_msvc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author Martin Pulec <[email protected]>
44
*/
55
/*
6-
* Copyright (c) 2017-2023 CESNET, z. s. p. o.
6+
* Copyright (c) 2017-2025 CESNET, zájmové sdružení právnických osob
77
* All rights reserved.
88
*
99
* Redistribution and use in source and binary forms, with or without

src/debug.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* AUTHOR: Isidor Kouvelas + Colin Perkins + Mark Handley + Orion Hodson
55
*
66
* Copyright (c) 1995-2000 University College London
7-
* Copyright (c) 2005-2023 CESNET, z. s. p. o.
7+
* Copyright (c) 2005-2025 CESNET, zájmové sdružení právnických osob
88
* All rights reserved.
99
*
1010
* Redistribution and use in source and binary forms, with or without
@@ -82,7 +82,11 @@ void debug_dump(const void*lp, int len);
8282
#define verbose_msg(...) log_msg(LOG_LEVEL_VERBOSE, __VA_ARGS__)
8383
///#define debug_msg(...) log_msg(LOG_LEVEL_DEBUG, "[pid/%d +%d %s] ", getpid(), __LINE__, __FILE__), log_msg(LOG_LEVEL_DEBUG, __VA_ARGS__)
8484
#define debug_msg(...) log_msg(LOG_LEVEL_DEBUG, __VA_ARGS__)
85+
#if defined _MSC_VER
86+
#define log_msg(x, ...) fprintf(stderr, __VA_ARGS__)
87+
#else
8588
void log_msg(int log_level, const char *format, ...) __attribute__((format (printf, 2, 3)));
89+
#endif
8690
void log_msg_once(int log_level, uint32_t id, const char *msg, ...) __attribute__((format (printf, 3, 4)));
8791
void log_perror(int log_level, const char *msg);
8892
#define MSG(l, fmt, ...) \

0 commit comments

Comments
 (0)