summaryrefslogtreecommitdiff
path: root/util/messages.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/messages.c')
-rw-r--r--util/messages.c32
1 files changed, 10 insertions, 22 deletions
diff --git a/util/messages.c b/util/messages.c
index 7714c2b..ef920b2 100644
--- a/util/messages.c
+++ b/util/messages.c
@@ -1,5 +1,4 @@
-/* $Id$
- *
+/*
* Message and error reporting (possibly fatal).
*
* Usage:
@@ -52,26 +51,13 @@
* va_list, and the applicable errno value (if any).
*
* Copyright 2008 Board of Trustees, Leland Stanford Jr. University
- * Copyright 2004, 2005, 2006
+ * Copyright (c) 2004, 2005, 2006
* by Internet Systems Consortium, Inc. ("ISC")
- * Copyright 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- * 2003 by The Internet Software Consortium and Rich Salz
- *
- * This code is derived from software contributed to the Internet Software
- * Consortium by Rich Salz.
+ * Copyright (c) 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+ * 2002, 2003 by The Internet Software Consortium and Rich Salz
*
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
-*/
+ * See LICENSE for licensing terms.
+ */
#include <config.h>
#include <portable/system.h>
@@ -91,7 +77,9 @@
# define LOG_CRIT EVENTLOG_ERROR_TYPE
#endif
-#include <util/util.h>
+#include <util/macros.h>
+#include <util/messages.h>
+#include <util/xmalloc.h>
/* The default handler lists. */
static message_handler_func stdout_handlers[2] = {
@@ -212,7 +200,7 @@ message_log_syslog(int pri, int len, const char *fmt, va_list args, int err)
eventlog = RegisterEventSource(NULL, message_program_name);
if (eventlog != NULL) {
- ReportEvent(eventlog, pri, 0, 0, NULL, 1, 0, &buffer, NULL);
+ ReportEvent(eventlog, (WORD) pri, 0, 0, NULL, 1, 0, &buffer, NULL);
CloseEventLog(eventlog);
}
}