Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys PR/47055: David Holland: Add hostname to syslog_data...



details:   https://anonhg.NetBSD.org/src/rev/e29d33abd7c9
branches:  trunk
changeset: 781979:e29d33abd7c9
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Oct 10 22:51:55 2012 +0000

description:
PR/47055: David Holland: Add hostname to syslog_data, version number, rename
fields consistently, and version library calls affected.

diffstat:

 sys/sys/syslog.h |  39 +++++++++++++++++++++++++--------------
 1 files changed, 25 insertions(+), 14 deletions(-)

diffs (73 lines):

diff -r b86b03f719d6 -r e29d33abd7c9 sys/sys/syslog.h
--- a/sys/sys/syslog.h  Wed Oct 10 22:51:12 2012 +0000
+++ b/sys/sys/syslog.h  Wed Oct 10 22:51:55 2012 +0000
@@ -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 @@
 /* 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 @@
 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
 



Home | Main Index | Thread Index | Old Index