summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorglass <glass@NetBSD.org>1993-05-11 08:16:01 +0000
committerglass <glass@NetBSD.org>1993-05-11 08:16:01 +0000
commit4be757ff794a65daee1c3dadca8eb430ba1df690 (patch)
tree54dc42e709e067c231766a2ff4d506ffa6aec656 /libexec
parentc2cbdf5d9e952f45f64ba3b8da6660e761821ff1 (diff)
following changes:
no longer compiled with debugging turned on. uses syslog and not /var/cron/log directly for logging stuff fixed missing ifdef
Diffstat (limited to 'libexec')
-rw-r--r--libexec/crond/Makefile2
-rw-r--r--libexec/crond/config.h4
-rw-r--r--libexec/crond/misc.c8
3 files changed, 9 insertions, 5 deletions
diff --git a/libexec/crond/Makefile b/libexec/crond/Makefile
index 755d6a092e0..35bb9b5daab 100644
--- a/libexec/crond/Makefile
+++ b/libexec/crond/Makefile
@@ -11,7 +11,7 @@
PROG= crond
SRCS= crond.c database.c user.c entry.c misc.c job.c do_command.c env.c
-CFLAGS+=-I${.CURDIR} -DDEBUGGING=1 -DBSD -DCRONDIR='"/var/cron"' -fstrength-reduce
+CFLAGS+=-I${.CURDIR} -DBSD -DCRONDIR='"/var/cron"'
MAN8= crond.0
.include <bsd.prog.mk>
diff --git a/libexec/crond/config.h b/libexec/crond/config.h
index 2f103d6b7a5..227e456044b 100644
--- a/libexec/crond/config.h
+++ b/libexec/crond/config.h
@@ -1,6 +1,6 @@
/* config.h - configurables for Vixie Cron
*
- * $Header: /cvsroot/src/libexec/crond/Attic/config.h,v 1.1.1.1 1993/03/21 09:45:37 cgd Exp $
+ * $Header: /cvsroot/src/libexec/crond/Attic/config.h,v 1.2 1993/05/11 08:16:02 glass Exp $
*/
/* Copyright 1988,1990 by Paul Vixie
@@ -92,7 +92,7 @@
* tell /etc/syslog.conf to send cron's logging to
* a separate file.
*/
-/*#define SYSLOG /*-*/
+#define SYSLOG /*-*/
/* this is the name of the environment variable
* that contains the user name. it isn't read by
diff --git a/libexec/crond/misc.c b/libexec/crond/misc.c
index e4636d50959..3e877f4b22d 100644
--- a/libexec/crond/misc.c
+++ b/libexec/crond/misc.c
@@ -1,5 +1,5 @@
#if !defined(lint) && !defined(LINT)
-static char rcsid[] = "$Header: /cvsroot/src/libexec/crond/Attic/misc.c,v 1.3 1993/04/22 03:45:05 mycroft Exp $";
+static char rcsid[] = "$Header: /cvsroot/src/libexec/crond/Attic/misc.c,v 1.4 1993/05/11 08:16:03 glass Exp $";
#endif
/* vix 26jan87 [RCS has the rest of the log]
@@ -38,7 +38,9 @@ static char rcsid[] = "$Header: /cvsroot/src/libexec/crond/Attic/misc.c,v 1.3 19
#if defined(ATT)
# include <fcntl.h>
#endif
-
+#ifdef SYSLOG
+#include <syslog.h>
+#endif
void log_it(), be_different(), acquire_daemonlock();
@@ -606,10 +608,12 @@ log_it(username, pid, event, detail)
#endif /*SYSLOG*/
+#if DEBUGGING
if (DebugFlags) {
fprintf(stderr, "log_it: (%s %d) %s (%s)",
username, pid, event, detail);
}
+#endif
}
#endif /*LOG_FILE || SYSLOG */