Commit eaaa6f57 authored by atraczyk's avatar atraczyk Committed by gerrit2

build(UWP): remove UWP API violations

- Removes some remaining forbidden API calls from the daemon.

Change-Id: I4276e7a439f15c768179dd49ef64863de54f3a77
Tuleap: #790
parent f31b4e74
......@@ -49,7 +49,7 @@
#include <sys/syscall.h>
#endif // __linux__
#ifdef WIN32
#ifdef _WIN32
#include "winsyslog.h"
#endif
......
......@@ -76,6 +76,7 @@ static constexpr const char* AVLOGLEVEL = "AVLOGLEVEL";
static void
setAvLogLevel()
{
#ifndef RING_UWP
char* envvar = getenv(AVLOGLEVEL);
signed level = AV_LOG_WARNING;
......@@ -86,6 +87,9 @@ setAvLogLevel()
level = std::max(AV_LOG_QUIET, std::min(level, AV_LOG_DEBUG));
}
av_log_set_level(level);
#else
av_log_set_level(0);
#endif
}
static void
......
......@@ -65,7 +65,9 @@ getLastErrorText( // converts "Lasr Error" code into text
void closelog(void)
{
#ifndef RING_UWP
DeregisterEventSource(loghdl);
#endif
free(loghdr);
}
......@@ -83,6 +85,7 @@ void closelog(void)
vsprintf(tmp, format, arglist);
#ifndef RING_UWP
arr[0] = tmp;
BOOL err = ReportEvent(loghdl, (unsigned short) level, (unsigned short)level,
level, NULL, 1, 0, arr, NULL);
......@@ -92,6 +95,7 @@ void closelog(void)
CHAR errText[1024];
puts(getLastErrorText(errText, 1024));
}
#endif
}
/* Emulator for BSD openlog() routine
......@@ -106,7 +110,9 @@ void closelog(void)
if (loghdl) {
closelog();
}
#ifndef RING_UWP
loghdl = RegisterEventSource(NULL, ident);
#endif
sprintf(tmp, (logopt & WINLOG_PID) ? "%s[%d]" : "%s", ident, getpid());
loghdr = _strdup(tmp); /* save header for later */
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment