]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Remove log.* from make files
authorDanny Mayer <mayer@ntp.org>
Thu, 21 Apr 2005 03:55:08 +0000 (23:55 -0400)
committerDanny Mayer <mayer@ntp.org>
Thu, 21 Apr 2005 03:55:08 +0000 (23:55 -0400)
bk: 4267241cCc7sjl59Q-jZQbXxqErobQ

libntp/Makefile.am
libntp/log.c [deleted file]
libntp/log.h [deleted file]

index eb4d5f341f78d828a491eda183fbb0542d496e01..4454c07df1e74ff99e88cfc7757520afe6296399 100644 (file)
@@ -25,11 +25,11 @@ libntp_a_SRCS = a_md5encrypt.c adjtime.c atoint.c atolfp.c atouint.c \
        $(srcdir)/../libisc/netscope.c
 libntp_a_SOURCES = systime.c $(libntp_a_SRCS)
 libntpsim_a_SOURCES = systime_s.c $(libntp_a_SRCS)
-EXTRA_libntp_a_SOURCES = adjtimex.c log.c random.c
+EXTRA_libntp_a_SOURCES = adjtimex.c random.c
 INCLUDES = -I$(top_srcdir)/include -I../include
 ETAGS_ARGS = Makefile.am
 
-noinst_HEADERS = lib_strbuf.h log.h
+noinst_HEADERS = lib_strbuf.h 
 
 ../include/des.h:
        touch ../include/des.h
diff --git a/libntp/log.c b/libntp/log.c
deleted file mode 100644 (file)
index 991b498..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-/* Microsoft Developer Support Copyright (c) 1993 Microsoft Corporation. */
-
-/* Skip asynch rpc inclusion */
-#ifndef __RPCASYNC_H__
-#define __RPCASYNC_H__
-#endif
-
-#include <windows.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "messages.h"
-#include "log.h"
-
-#define PERR(bSuccess, api) {if(!(bSuccess)) printf("%s: Error %d from %s \
-    on line %d\n", __FILE__, GetLastError(), api, __LINE__);}
-
-
-/*********************************************************************
-* FUNCTION: addSourceToRegistry(LPSTR pszAppname, LPSTR pszMsgDLL)   *
-*                                                                    *
-* PURPOSE: Add a source name key, message DLL name value, and        *
-*          message type supported value to the registry              *
-*                                                                    *
-* INPUT: source name, path of message DLL                            *
-*                                                                    *
-* RETURNS: none                                                      *
-*********************************************************************/
-
-void addSourceToRegistry(LPSTR pszAppname, LPSTR pszMsgDLL)
-{
-  HKEY hk;                      /* registry key handle */
-  DWORD dwData;
-  BOOL bSuccess;
-  char   regarray[200];
-  char *lpregarray = regarray;
-
-  /* When an application uses the RegisterEventSource or OpenEventLog
-     function to get a handle of an event log, the event loggging service
-     searches for the specified source name in the registry. You can add a
-     new source name to the registry by opening a new registry subkey
-     under the Application key and adding registry values to the new
-     subkey. */
-
-  strcpy(lpregarray, "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\");
-  strcat(lpregarray, pszAppname);
-
-  /* Create a new key for our application */
-  bSuccess = RegCreateKey(HKEY_LOCAL_MACHINE,lpregarray, &hk);
-  PERR(bSuccess == ERROR_SUCCESS, "RegCreateKey");
-
-  /* Add the Event-ID message-file name to the subkey. */
-  bSuccess = RegSetValueEx(hk,  /* subkey handle         */
-      "EventMessageFile",       /* value name            */
-      0,                        /* must be zero          */
-      REG_EXPAND_SZ,            /* value type            */
-      (LPBYTE) pszMsgDLL,       /* address of value data */
-      strlen(pszMsgDLL) + 1);   /* length of value data  */
-  PERR(bSuccess == ERROR_SUCCESS, "RegSetValueEx");
-
-  /* Set the supported types flags and addit to the subkey. */
-  dwData = EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE |
-      EVENTLOG_INFORMATION_TYPE;
-  bSuccess = RegSetValueEx(hk,  /* subkey handle                */
-      "TypesSupported",         /* value name                   */
-      0,                        /* must be zero                 */
-      REG_DWORD,                /* value type                   */
-      (LPBYTE) &dwData,         /* address of value data        */
-      sizeof(DWORD));           /* length of value data         */
-  PERR(bSuccess == ERROR_SUCCESS, "RegSetValueEx");
-  RegCloseKey(hk);
-  return;
-}
-
-/*********************************************************************
-* FUNCTION: reportAnEvent(DWORD dwIdEvent, WORD cStrings,            *
-*                         LPTSTR *ppszStrings);                      *
-*                                                                    *
-* PURPOSE: add the event to the event log                            *
-*                                                                    *
-* INPUT: the event ID to report in the log, the number of insert     *
-*        strings, and an array of null-terminated insert strings     *
-*                                                                    *
-* RETURNS: none                                                      *
-*********************************************************************/
-
-void reportAnIEvent(DWORD dwIdEvent, WORD cStrings, LPTSTR *pszStrings)
-{
-  HANDLE hAppLog;
-  BOOL bSuccess;
-
-  /* Get a handle to the Application event log */
-  hAppLog = RegisterEventSource(NULL,   /* use local machine      */
-      "NTP");                   /* source name                 */
-  PERR(hAppLog, "RegisterEventSource");
-
-  /* Now report the event, which will add this event to the event log */
-  bSuccess = ReportEvent(hAppLog,       /* event-log handle            */
-      EVENTLOG_INFORMATION_TYPE,      /* event type                  */
-      0,                        /* category zero               */
-      dwIdEvent,                /* event ID                    */
-      NULL,                     /* no user SID                 */
-      cStrings,                 /* number of substitution strings     */
-      0,                        /* no binary data              */
-      pszStrings,               /* string array                */
-      NULL);                    /* address of data             */
-  PERR(bSuccess, "ReportEvent");
-  DeregisterEventSource(hAppLog);
-  return;
-}
-
-void reportAnWEvent(DWORD dwIdEvent, WORD cStrings, LPTSTR *pszStrings)
-{
-  HANDLE hAppLog;
-  BOOL bSuccess;
-
-  /* Get a handle to the Application event log */
-  hAppLog = RegisterEventSource(NULL,   /* use local machine      */
-      "NTP");                   /* source name                 */
-  PERR(hAppLog, "RegisterEventSource");
-
-  /* Now report the event, which will add this event to the event log */
-  bSuccess = ReportEvent(hAppLog,       /* event-log handle            */
-      EVENTLOG_WARNING_TYPE,      /* event type                  */
-      0,                        /* category zero               */
-      dwIdEvent,                /* event ID                    */
-      NULL,                     /* no user SID                 */
-      cStrings,                 /* number of substitution strings     */
-      0,                        /* no binary data              */
-      pszStrings,               /* string array                */
-      NULL);                    /* address of data             */
-  PERR(bSuccess, "ReportEvent");
-  DeregisterEventSource(hAppLog);
-  return;
-}
-
-void reportAnEEvent(DWORD dwIdEvent, WORD cStrings, LPTSTR *pszStrings)
-{
-  HANDLE hAppLog;
-  BOOL bSuccess;
-
-  /* Get a handle to the Application event log */
-  hAppLog = RegisterEventSource(NULL,   /* use local machine      */
-      "NTP");                   /* source name                 */
-  PERR(hAppLog, "RegisterEventSource");
-
-  /* Now report the event, which will add this event to the event log */
-  bSuccess = ReportEvent(hAppLog,       /* event-log handle            */
-      EVENTLOG_ERROR_TYPE,      /* event type                  */
-      0,                        /* category zero               */
-      dwIdEvent,                /* event ID                    */
-      NULL,                     /* no user SID                 */
-      cStrings,                 /* number of substitution strings     */
-      0,                        /* no binary data              */
-      pszStrings,               /* string array                */
-      NULL);                    /* address of data             */
-  PERR(bSuccess, "ReportEvent");
-  DeregisterEventSource(hAppLog);
-  return;
-}
diff --git a/libntp/log.h b/libntp/log.h
deleted file mode 100644 (file)
index 99d0e72..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * log.h - Used only under Windows NT by msyslog.c
- *
- */
-#ifndef WINNT_LOG_H
-#define WINNT_LOG_H
-
-#include <windows.h>
-
-/* function declarations */
-
-void addSourceToRegistry(LPSTR pszAppname, LPSTR pszMsgDLL);
-void reportAnIEvent(DWORD dwIdEvent, WORD cStrings, LPTSTR *pszStrings);
-void reportAnWEvent(DWORD dwIdEvent, WORD cStrings, LPTSTR *pszStrings);
-void reportAnEEvent(DWORD dwIdEvent, WORD cStrings, LPTSTR *pszStrings);
-
-#define MAX_MSG_LENGTH 1024
-#define MSG_ID_MASK            0x0000FFFF
-#define MAX_INSERT_STRS        8
-
-#endif /* WINNT_LOG_H */