]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
drop WINNT-specific code
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 15 Sep 2015 16:12:32 +0000 (18:12 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 17 Sep 2015 13:52:49 +0000 (15:52 +0200)
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.

configure
logging.c
main.c
sysincl.h

index 03b9f130463908e96f3bf9ee1d0530d8fda6cb81..c634711255f91f2d38b67567f3ff10fe000fc0b5 100755 (executable)
--- a/configure
+++ b/configure
@@ -440,12 +440,6 @@ case $SYSTEM in
         add_def SOLARIS
         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."
         exit 1
index 0ffaa29721cf457f4a8910b0f0d0589f952f80fb..d9685f1094db85c84f963053a1d61f251497b42c 100644 (file)
--- a/logging.c
+++ b/logging.c
@@ -48,10 +48,6 @@ static int parent_fd = 0;
 #define DEBUG_LEVEL_PRINT_DEBUG 2
 static int debug_level = 0;
 
-#ifdef WINNT
-static FILE *logfile;
-#endif
-
 struct LogFile {
   const char *name;
   const char *banner;
@@ -73,10 +69,6 @@ void
 LOG_Initialise(void)
 {
   initialised = 1;
-
-#ifdef WINNT
-  logfile = fopen("./chronyd.err", "a");
-#endif
 }
 
 /* ================================================== */
@@ -85,15 +77,9 @@ LOG_Initialise(void)
 void
 LOG_Finalise(void)
 {
-#ifdef WINNT
-  if (logfile) {
-    fclose(logfile);
-  }
-#else
   if (system_log) {
     closelog();
   }
-#endif
 
   LOG_CycleLogFiles();
 
@@ -104,11 +90,6 @@ LOG_Finalise(void)
 
 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) {
     int priority;
     switch (severity) {
@@ -134,7 +115,6 @@ static void log_message(int fatal, LOG_Severity severity, const char *message)
   } else {
     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;
   struct tm stm;
 
-#ifdef WINNT
-#else
   if (!system_log) {
     /* Don't clutter up syslog with timestamps and internal debugging info */
     time(&t);
@@ -159,7 +137,6 @@ void LOG_Message(LOG_Severity severity, LOG_Facility facility,
     if (debug_level >= DEBUG_LEVEL_PRINT_FUNCTION)
       fprintf(stderr, "%s:%d:(%s) ", filename, line_number, function_name);
   }
-#endif
 
   va_start(other_args, format);
   vsnprintf(buf, sizeof(buf), format, other_args);
@@ -197,11 +174,8 @@ void LOG_Message(LOG_Severity severity, LOG_Facility facility,
 void
 LOG_OpenSystemLog(void)
 {
-#ifdef WINNT
-#else
   system_log = 1;
   openlog("chronyd", LOG_PID, LOG_DAEMON);
-#endif
 }
 
 /* ================================================== */
diff --git a/main.c b/main.c
index 83f0c4aced92769704b6d02bf9ba771a4ffc82ce..5626e86b10a642b4e4deb646a29d34f48da76ed8 100644 (file)
--- a/main.c
+++ b/main.c
@@ -275,11 +275,6 @@ write_lockfile(void)
 static void
 go_daemon(void)
 {
-#ifdef WINNT
-
-
-#else
-
   int pid, fd, pipefd[2];
 
   /* Create pipe which will the daemon use to notify the grandparent
@@ -338,8 +333,6 @@ go_daemon(void)
       LOG_SetParentFd(pipefd[1]);
     }
   }
-
-#endif
 }
 
 /* ================================================== */
index 4976e97c7687af6b28d874a99f53d420d6ea9fe6..31d28ad0191ac76b02631ec936b842f94ea9fcb7 100644 (file)
--- a/sysincl.h
+++ b/sysincl.h
 #include <nlist.h>
 #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 */