drop WINNT-specific code
This was never really supported and it would probably require a lot of work to get a usable chronyd in Cygwin. Remove all WINNT-specific code.
This commit is contained in:
parent
bde279c093
commit
4bc6950632
4 changed files with 0 additions and 78 deletions
6
configure
vendored
6
configure
vendored
|
@ -440,12 +440,6 @@ case $SYSTEM in
|
||||||
add_def SOLARIS
|
add_def SOLARIS
|
||||||
echo "Configuring for Solaris (" $SYSTEM "SunOS version" $VERSION ")"
|
echo "Configuring for Solaris (" $SYSTEM "SunOS version" $VERSION ")"
|
||||||
;;
|
;;
|
||||||
CYGWIN32_NT-i[3456]86 )
|
|
||||||
EXTRA_OBJECTS="sys_winnt.o"
|
|
||||||
EXTRA_LIBS=""
|
|
||||||
add_def WINNT
|
|
||||||
echo "Configuring for Windows NT (Cygwin32)"
|
|
||||||
;;
|
|
||||||
* )
|
* )
|
||||||
echo "Sorry, I don't know how to build this software on your system."
|
echo "Sorry, I don't know how to build this software on your system."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
26
logging.c
26
logging.c
|
@ -48,10 +48,6 @@ static int parent_fd = 0;
|
||||||
#define DEBUG_LEVEL_PRINT_DEBUG 2
|
#define DEBUG_LEVEL_PRINT_DEBUG 2
|
||||||
static int debug_level = 0;
|
static int debug_level = 0;
|
||||||
|
|
||||||
#ifdef WINNT
|
|
||||||
static FILE *logfile;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct LogFile {
|
struct LogFile {
|
||||||
const char *name;
|
const char *name;
|
||||||
const char *banner;
|
const char *banner;
|
||||||
|
@ -73,10 +69,6 @@ void
|
||||||
LOG_Initialise(void)
|
LOG_Initialise(void)
|
||||||
{
|
{
|
||||||
initialised = 1;
|
initialised = 1;
|
||||||
|
|
||||||
#ifdef WINNT
|
|
||||||
logfile = fopen("./chronyd.err", "a");
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ================================================== */
|
/* ================================================== */
|
||||||
|
@ -85,15 +77,9 @@ LOG_Initialise(void)
|
||||||
void
|
void
|
||||||
LOG_Finalise(void)
|
LOG_Finalise(void)
|
||||||
{
|
{
|
||||||
#ifdef WINNT
|
|
||||||
if (logfile) {
|
|
||||||
fclose(logfile);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (system_log) {
|
if (system_log) {
|
||||||
closelog();
|
closelog();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
LOG_CycleLogFiles();
|
LOG_CycleLogFiles();
|
||||||
|
|
||||||
|
@ -104,11 +90,6 @@ LOG_Finalise(void)
|
||||||
|
|
||||||
static void log_message(int fatal, LOG_Severity severity, const char *message)
|
static void log_message(int fatal, LOG_Severity severity, const char *message)
|
||||||
{
|
{
|
||||||
#ifdef WINNT
|
|
||||||
if (logfile) {
|
|
||||||
fprintf(logfile, fatal ? "Fatal error : %s\n" : "%s\n", message);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (system_log) {
|
if (system_log) {
|
||||||
int priority;
|
int priority;
|
||||||
switch (severity) {
|
switch (severity) {
|
||||||
|
@ -134,7 +115,6 @@ static void log_message(int fatal, LOG_Severity severity, const char *message)
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, fatal ? "Fatal error : %s\n" : "%s\n", message);
|
fprintf(stderr, fatal ? "Fatal error : %s\n" : "%s\n", message);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ================================================== */
|
/* ================================================== */
|
||||||
|
@ -148,8 +128,6 @@ void LOG_Message(LOG_Severity severity, LOG_Facility facility,
|
||||||
time_t t;
|
time_t t;
|
||||||
struct tm stm;
|
struct tm stm;
|
||||||
|
|
||||||
#ifdef WINNT
|
|
||||||
#else
|
|
||||||
if (!system_log) {
|
if (!system_log) {
|
||||||
/* Don't clutter up syslog with timestamps and internal debugging info */
|
/* Don't clutter up syslog with timestamps and internal debugging info */
|
||||||
time(&t);
|
time(&t);
|
||||||
|
@ -159,7 +137,6 @@ void LOG_Message(LOG_Severity severity, LOG_Facility facility,
|
||||||
if (debug_level >= DEBUG_LEVEL_PRINT_FUNCTION)
|
if (debug_level >= DEBUG_LEVEL_PRINT_FUNCTION)
|
||||||
fprintf(stderr, "%s:%d:(%s) ", filename, line_number, function_name);
|
fprintf(stderr, "%s:%d:(%s) ", filename, line_number, function_name);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
va_start(other_args, format);
|
va_start(other_args, format);
|
||||||
vsnprintf(buf, sizeof(buf), format, other_args);
|
vsnprintf(buf, sizeof(buf), format, other_args);
|
||||||
|
@ -197,11 +174,8 @@ void LOG_Message(LOG_Severity severity, LOG_Facility facility,
|
||||||
void
|
void
|
||||||
LOG_OpenSystemLog(void)
|
LOG_OpenSystemLog(void)
|
||||||
{
|
{
|
||||||
#ifdef WINNT
|
|
||||||
#else
|
|
||||||
system_log = 1;
|
system_log = 1;
|
||||||
openlog("chronyd", LOG_PID, LOG_DAEMON);
|
openlog("chronyd", LOG_PID, LOG_DAEMON);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ================================================== */
|
/* ================================================== */
|
||||||
|
|
7
main.c
7
main.c
|
@ -275,11 +275,6 @@ write_lockfile(void)
|
||||||
static void
|
static void
|
||||||
go_daemon(void)
|
go_daemon(void)
|
||||||
{
|
{
|
||||||
#ifdef WINNT
|
|
||||||
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
int pid, fd, pipefd[2];
|
int pid, fd, pipefd[2];
|
||||||
|
|
||||||
/* Create pipe which will the daemon use to notify the grandparent
|
/* Create pipe which will the daemon use to notify the grandparent
|
||||||
|
@ -338,8 +333,6 @@ go_daemon(void)
|
||||||
LOG_SetParentFd(pipefd[1]);
|
LOG_SetParentFd(pipefd[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ================================================== */
|
/* ================================================== */
|
||||||
|
|
39
sysincl.h
39
sysincl.h
|
@ -91,43 +91,4 @@
|
||||||
#include <nlist.h>
|
#include <nlist.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (WINNT)
|
|
||||||
|
|
||||||
/* Designed to work with the GCC from the GNAT-3.10 for Win32
|
|
||||||
distribution */
|
|
||||||
|
|
||||||
#define Win32_Winsock
|
|
||||||
#include <assert.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
#if 1
|
|
||||||
/* Cheat and inline the necessary bits from <errno.h>. We don't
|
|
||||||
include it directly because it redefines some EXXX constants that
|
|
||||||
conflict with <windows32/sockets.h> (included by <windows.h>) */
|
|
||||||
|
|
||||||
int* _errno();
|
|
||||||
int* __doserrno();
|
|
||||||
|
|
||||||
#define errno (*_errno())
|
|
||||||
#define _doserrno (*__doserrno())
|
|
||||||
|
|
||||||
#define ENOENT 2
|
|
||||||
#else
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#include <float.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include <windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* GOT_SYSINCL_H */
|
#endif /* GOT_SYSINCL_H */
|
||||||
|
|
Loading…
Reference in a new issue