Make shadow_logfd and Prog not extern

Closes #444
Closes #465

Signed-off-by: Serge Hallyn <serge@hallyn.com>
This commit is contained in:
Serge Hallyn
2021-11-28 17:37:53 -06:00
parent b8c67c320c
commit 79157cbad8
79 changed files with 371 additions and 217 deletions

28
lib/shadowlog.c Normal file
View File

@ -0,0 +1,28 @@
#include "shadowlog.h"
#include "lib/shadowlog_internal.h"
void log_set_progname(const char *progname)
{
Prog = progname;
}
const char *log_get_progname(void)
{
return Prog;
}
void log_set_logfd(FILE *fd)
{
if (NULL != fd)
shadow_logfd = fd;
else
shadow_logfd = stderr;
}
FILE *log_get_logfd(void)
{
if (shadow_logfd != NULL)
return shadow_logfd;
return stderr;
}