# include "zbxwinservice.h"
static HANDLE system_log_handle = INVALID_HANDLE_VALUE;
static char log_filename[MAX_STRING_LEN];
static int log_type = ZBX_LOG_TYPE_UNDEFINED;
static zbx_mutex_t log_access = ZBX_MUTEX_NULL;
static int config_log_file_size = -1;
static int get_config_log_file_size(void)
if (-1 != config_log_file_size)
return config_log_file_size;
THIS_SHOULD_NEVER_HAPPEN;
# define LOCK_LOG zbx_mutex_lock(log_access)
# define UNLOCK_LOG zbx_mutex_unlock(log_access)
# define LOCK_LOG lock_log()
# define UNLOCK_LOG unlock_log()
# define STDIN_FILENO _fileno(stdin)
# define STDOUT_FILENO _fileno(stdout)
# define STDERR_FILENO _fileno(stderr)
# define ZBX_DEV_NULL "NUL"
# define dup2(fd1, fd2) _dup2(fd1, fd2)
# define ZBX_DEV_NULL "/dev/null"
int zbx_redirect_stdio(const char *filename)