From 040ee979539e88ef71fb21a80d4a05d24961ae70 Mon Sep 17 00:00:00 2001 From: Stephen Early Date: Wed, 6 Apr 2005 01:23:59 +0100 Subject: [PATCH] Rename log() to slilog() Rename global 'log' to 'slilog' to avoid conflict with gcc built-in log() function. --- log.c | 2 +- secnet.h | 2 +- site.c | 6 +++--- util.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/log.c b/log.c index c2da4af..32aed70 100644 --- a/log.c +++ b/log.c @@ -28,7 +28,7 @@ static void vMessage(uint32_t class, const char *message, va_list args) /* Each line is sent separately */ while ((nlp=strchr(buff,'\n'))) { *nlp=0; - log(system_log,class,buff); + slilog(system_log,class,buff); memmove(buff,nlp+1,strlen(nlp+1)+1); } } else { diff --git a/secnet.h b/secnet.h index 7327350..c3cadb9 100644 --- a/secnet.h +++ b/secnet.h @@ -296,7 +296,7 @@ struct log_if { log_vmsg_fn *vlog; }; /* (convenience function, defined in util.c) */ -extern void log(struct log_if *lf, int class, const char *message, ...) +extern void slilog(struct log_if *lf, int class, const char *message, ...) FORMAT(printf,3,4); /* SITE interface */ diff --git a/site.c b/site.c index 49e1b14..2fafd91 100644 --- a/site.c +++ b/site.c @@ -675,9 +675,9 @@ static void dump_packet(struct site *st, struct buffer_if *buf, uint32_t msgtype=ntohl(*(uint32_t *)(buf->start+8)); if (st->log_events & LOG_DUMP) - log(st->log,M_DEBUG,"%s: %s: %08x<-%08x: %08x:", - st->tunname,incoming?"incoming":"outgoing", - dest,source,msgtype); + slilog(st->log,M_DEBUG,"%s: %s: %08x<-%08x: %08x:", + st->tunname,incoming?"incoming":"outgoing", + dest,source,msgtype); } static uint32_t site_status(void *st) diff --git a/util.c b/util.c index a795223..d2a3e98 100644 --- a/util.c +++ b/util.c @@ -198,7 +198,7 @@ bool_t remove_hook(uint32_t phase, hook_fn *fn, void *state) return False; } -void log(struct log_if *lf, int priority, const char *message, ...) +void slilog(struct log_if *lf, int priority, const char *message, ...) { va_list ap; -- 2.30.2