chiark / gitweb /
Rename log() to slilog()
authorStephen Early <steve@greenend.org.uk>
Wed, 6 Apr 2005 00:23:59 +0000 (01:23 +0100)
committerStephen Early <steve@greenend.org.uk>
Wed, 18 May 2011 18:02:02 +0000 (19:02 +0100)
Rename global 'log' to 'slilog' to avoid conflict with gcc built-in
log() function.

log.c
secnet.h
site.c
util.c

diff --git a/log.c b/log.c
index c2da4af09b3713dd6d0ec6835d65676538b5e4f3..32aed704b06e20e595ef366661426103fac6342f 100644 (file)
--- 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;
        /* 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 {
            memmove(buff,nlp+1,strlen(nlp+1)+1);
        }
     } else {
index 7327350e8ba7a2c1f5852485e4a1d50b8950f67f..c3cadb9737a0feb03301017c6a04dd0afd4e6e21 100644 (file)
--- a/secnet.h
+++ b/secnet.h
@@ -296,7 +296,7 @@ struct log_if {
     log_vmsg_fn *vlog;
 };
 /* (convenience function, defined in util.c) */
     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 */
 FORMAT(printf,3,4);
 
 /* SITE interface */
diff --git a/site.c b/site.c
index 49e1b143d3b265120d01a28f9021225329ac310b..2fafd915b4beeacfa069c9efe8e83f516799bced 100644 (file)
--- 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)
     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)
 }
 
 static uint32_t site_status(void *st)
diff --git a/util.c b/util.c
index a795223600bbdd731e1ea36c525da8140ad49328..d2a3e98b76e7692e948a08c9bd3598823ec35ffe 100644 (file)
--- a/util.c
+++ b/util.c
@@ -198,7 +198,7 @@ bool_t remove_hook(uint32_t phase, hook_fn *fn, void *state)
     return False;
 }
 
     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;
     
 {
     va_list ap;