Module Name: src
Committed By: christos
Date: Wed Oct 10 22:51:55 UTC 2012
Modified Files:
src/sys/sys: syslog.h
Log Message:
PR/47055: David Holland: Add hostname to syslog_data, version number, rename
fields consistently, and version library calls affected.
To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/sys/syslog.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/sys/syslog.h
diff -u src/sys/sys/syslog.h:1.34 src/sys/sys/syslog.h:1.35
--- src/sys/sys/syslog.h:1.34 Sun Nov 20 23:36:06 2011
+++ src/sys/sys/syslog.h Wed Oct 10 18:51:55 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: syslog.h,v 1.34 2011/11/21 04:36:06 christos Exp $ */
+/* $NetBSD: syslog.h,v 1.35 2012/10/10 22:51:55 christos Exp $ */
/*
* Copyright (c) 1982, 1986, 1988, 1993
@@ -170,17 +170,25 @@ CODE facilitynames[] = {
/* Used by reentrant functions */
struct syslog_data {
+ int log_version;
int log_file;
- int connected;
- int opened;
+ int log_connected;
+ int log_opened;
int log_stat;
const char *log_tag;
+ char log_hostname[256]; /* MAXHOSTNAMELEN */
int log_fac;
int log_mask;
};
#define SYSLOG_DATA_INIT { \
+ .log_version = 1, \
.log_file = -1, \
+ .log_connected = 0, \
+ .log_opened = 0, \
+ .log_stat = 0, \
+ .log_tag = 0, \
+ .log_hostname = { '\0' }, \
.log_fac = LOG_USER, \
.log_mask = 0xff, \
}
@@ -196,21 +204,24 @@ int setlogmask(int);
void syslog(int, const char *, ...) __printflike(2, 3);
#if defined(_NETBSD_SOURCE)
void vsyslog(int, const char *, __va_list) __printflike(2, 0);
-void closelog_r(struct syslog_data *);
-void openlog_r(const char *, int, int, struct syslog_data *);
-int setlogmask_r(int, struct syslog_data *);
+#ifndef __LIBC12_SOURCE__
+void closelog_r(struct syslog_data *) __RENAME(__closelog_r60);
+void openlog_r(const char *, int, int, struct syslog_data *)
+ __RENAME(__openlog_r60);
+int setlogmask_r(int, struct syslog_data *) __RENAME(__setlogmask_r60);
void syslog_r(int, struct syslog_data *, const char *, ...)
- __printflike(3, 4);
+ __RENAME(__syslog_r60) __printflike(3, 4);
void vsyslog_r(int, struct syslog_data *, const char *, __va_list)
- __printflike(3, 0);
-void syslogp(int, const char *, const char *, const char *, ...)
+ __RENAME(__vsyslog_r60) __printflike(3, 0);
+void syslogp_r(int, struct syslog_data *, const char *, const char *,
+ const char *, ...) __RENAME(__syslogp_r60) __printflike(5, 6);
+void vsyslogp_r(int, struct syslog_data *, const char *, const char *,
+ const char *, __va_list) __RENAME(__vsyslogp_r60) __printflike(5, 0);
+#endif
+void syslogp(int, const char *, const char *, const char *, ...)
__printflike(4, 5);
-void vsyslogp(int, const char *, const char *, const char *, __va_list)
+void vsyslogp(int, const char *, const char *, const char *, __va_list)
__printflike(4, 0);
-void syslogp_r(int, struct syslog_data *, const char *, const char *,
- const char *, ...) __printflike(5, 6);
-void vsyslogp_r(int, struct syslog_data *, const char *, const char *,
- const char *, __va_list) __printflike(5, 0);
#endif
__END_DECLS