aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2025-01-15 03:13:06 +0100
committerFederico Angelilli <code@fedang.net>2025-01-15 03:13:06 +0100
commitaff00a5c0eef3f7249993bbb03c9cd6776afc8c3 (patch)
treeadc80ed342abba9d74100b054af63669d1808593
parentbf823b5e86f5a677ca5ceebb17a4507fa01f73c7 (diff)
Remove windows macro
-rw-r--r--any_log.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/any_log.h b/any_log.h
index c34fea7..7190c97 100644
--- a/any_log.h
+++ b/any_log.h
@@ -80,8 +80,8 @@ typedef enum {
// NOTE: log_panic will always terminate the program and should be used only
// for non recoverable situations! For normal errors just use log_error.
//
-// The reason log_panic was made with a different interface compared to
-// the other logging functions was to mark it as noreturn.
+// This function was made with a different interface compared to the
+// other logging functions in order to be marked as *noreturn*.
//
#define log_panic(...) any_log_panic(__FILE__, __LINE__, ANY_LOG_MODULE, ANY_LOG_FUNC, __VA_ARGS__)
@@ -238,23 +238,15 @@ typedef void (*any_log_formatter_t)(FILE *stream, ANY_LOG_VALUE_GENERIC_TYPE val
// lock the logging stream for the current thread, while ANY_LOG_FUNLOCK
// will be called at the end of the writes to unlock it.
//
-// You can define the macro ANY_LOG_LOCKING to use the default functions
-// for your platform (Windows and POSIX are supported).
+// You can define ANY_LOG_LOCKING to automatically define the aforementioned
+// macros using flockfile(3) (from POSIX 2001).
//
#ifdef ANY_LOG_LOCKING
-// If _WIN32 is defined use _lock_file Windows api, otherwise
-// default to the POSIX api by using flockfile(3).
-//
#ifndef ANY_LOG_FLOCK
-#ifdef _WIN32
-#define ANY_LOG_FLOCK(stream) _lock_file(stream)
-#define ANY_LOG_FUNLOCK(stream) _unlock_file(stream)
-#else
#define ANY_LOG_FLOCK(stream) flockfile(stream)
#define ANY_LOG_FUNLOCK(stream) funlockfile(stream)
#endif
-#endif
#else