summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/cron/atrun.c4
-rw-r--r--usr.sbin/cron/cron.c6
-rw-r--r--usr.sbin/cron/crontab.c4
-rw-r--r--usr.sbin/cron/database.c4
-rw-r--r--usr.sbin/cron/do_command.c6
-rw-r--r--usr.sbin/cron/externs.h7
-rw-r--r--usr.sbin/cron/misc.c6
-rw-r--r--usr.sbin/cron/popen.c12
8 files changed, 22 insertions, 27 deletions
diff --git a/usr.sbin/cron/atrun.c b/usr.sbin/cron/atrun.c
index 79e36877c68..52f9070e5f4 100644
--- a/usr.sbin/cron/atrun.c
+++ b/usr.sbin/cron/atrun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atrun.c,v 1.20 2013/11/23 19:18:52 deraadt Exp $ */
+/* $OpenBSD: atrun.c,v 1.21 2015/01/14 17:27:29 millert Exp $ */
/*
* Copyright (c) 2002-2003 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -233,7 +233,7 @@ run_job(atjob *job, char *atfile)
pid_t pid;
long nuid, ngid;
FILE *fp;
- WAIT_T waiter;
+ int waiter;
size_t nread;
char *cp, *ep, mailto[MAX_UNAME], buf[BUFSIZ];
int fd, always_mail;
diff --git a/usr.sbin/cron/cron.c b/usr.sbin/cron/cron.c
index 87654e0de18..3ca77b874ed 100644
--- a/usr.sbin/cron/cron.c
+++ b/usr.sbin/cron/cron.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cron.c,v 1.46 2014/11/26 18:34:52 millert Exp $ */
+/* $OpenBSD: cron.c,v 1.47 2015/01/14 17:27:29 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@@ -468,8 +468,8 @@ quit(int x) {
static void
sigchld_reaper(void) {
- WAIT_T waiter;
- PID_T pid;
+ int waiter;
+ pid_t pid;
do {
pid = waitpid(-1, &waiter, WNOHANG);
diff --git a/usr.sbin/cron/crontab.c b/usr.sbin/cron/crontab.c
index 9f069ce135e..7d01f0b2315 100644
--- a/usr.sbin/cron/crontab.c
+++ b/usr.sbin/cron/crontab.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crontab.c,v 1.66 2015/01/14 17:27:13 millert Exp $ */
+/* $OpenBSD: crontab.c,v 1.67 2015/01/14 17:27:29 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@@ -43,7 +43,7 @@ static char *getoptargs = "u:lerx:";
static char *getoptargs = "u:ler";
#endif
-static PID_T Pid;
+static pid_t Pid;
static char User[MAX_UNAME], RealUser[MAX_UNAME];
static char Filename[MAX_FNAME], TempFilename[MAX_FNAME];
static FILE *NewCrontab;
diff --git a/usr.sbin/cron/database.c b/usr.sbin/cron/database.c
index 477c39f7f0c..2d98f0db294 100644
--- a/usr.sbin/cron/database.c
+++ b/usr.sbin/cron/database.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: database.c,v 1.19 2010/12/14 23:31:33 millert Exp $ */
+/* $OpenBSD: database.c,v 1.20 2015/01/14 17:27:29 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@@ -36,7 +36,7 @@ void
load_database(cron_db *old_db) {
struct stat statbuf, syscron_stat;
cron_db new_db;
- DIR_T *dp;
+ struct dirent *dp;
DIR *dir;
user *u, *nu;
diff --git a/usr.sbin/cron/do_command.c b/usr.sbin/cron/do_command.c
index 64eac4c1510..d647656ae3c 100644
--- a/usr.sbin/cron/do_command.c
+++ b/usr.sbin/cron/do_command.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: do_command.c,v 1.38 2013/11/23 18:23:00 deraadt Exp $ */
+/* $OpenBSD: do_command.c,v 1.39 2015/01/14 17:27:30 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@@ -484,8 +484,8 @@ child_process(entry *e, user *u) {
/* wait for children to die.
*/
for (; children > 0; children--) {
- WAIT_T waiter;
- PID_T pid;
+ int waiter;
+ pid_t pid;
Debug(DPROC, ("[%ld] waiting for grandchild #%d to finish\n",
(long)getpid(), children))
diff --git a/usr.sbin/cron/externs.h b/usr.sbin/cron/externs.h
index 0cf2f0a27b0..ee5d4e52e54 100644
--- a/usr.sbin/cron/externs.h
+++ b/usr.sbin/cron/externs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: externs.h,v 1.13 2015/01/14 17:27:13 millert Exp $ */
+/* $OpenBSD: externs.h,v 1.14 2015/01/14 17:27:30 millert Exp $ */
/* Copyright 1993,1994 by Paul Vixie
* All rights reserved
@@ -62,11 +62,6 @@
# include <bsd_auth.h>
#endif /*BSD_AUTH*/
-#define DIR_T struct dirent
-#define WAIT_T int
-#define SIG_T sig_t
-#define PID_T pid_t
-
#ifndef TZNAME_ALREADY_DEFINED
extern char *tzname[2];
#endif
diff --git a/usr.sbin/cron/misc.c b/usr.sbin/cron/misc.c
index ef1da72f82c..f3a1ef56cbb 100644
--- a/usr.sbin/cron/misc.c
+++ b/usr.sbin/cron/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.49 2015/01/14 17:27:13 millert Exp $ */
+/* $OpenBSD: misc.c,v 1.50 2015/01/14 17:27:30 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@@ -432,9 +432,9 @@ allowed(const char *username, const char *allow_file, const char *deny_file) {
}
void
-log_it(const char *username, PID_T xpid, const char *event, const char *detail) {
+log_it(const char *username, pid_t xpid, const char *event, const char *detail) {
#if defined(LOG_FILE) || DEBUGGING
- PID_T pid = xpid;
+ pid_t pid = xpid;
#endif
#if defined(LOG_FILE)
char *msg;
diff --git a/usr.sbin/cron/popen.c b/usr.sbin/cron/popen.c
index 613d1e8a094..1598f0d969d 100644
--- a/usr.sbin/cron/popen.c
+++ b/usr.sbin/cron/popen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: popen.c,v 1.22 2011/08/22 19:32:42 millert Exp $ */
+/* $OpenBSD: popen.c,v 1.23 2015/01/14 17:27:30 millert Exp $ */
/*
* Copyright (c) 1988, 1993, 1994
@@ -47,7 +47,7 @@
* may create a pipe to a hidden program as a side effect of a list or dir
* command.
*/
-static PID_T *pids;
+static pid_t *pids;
static int fds;
FILE *
@@ -55,7 +55,7 @@ cron_popen(char *program, char *type, struct passwd *pw) {
char *cp;
FILE *iop;
int argc, pdes[2];
- PID_T pid;
+ pid_t pid;
char *argv[MAX_ARGV];
if ((*type != 'r' && *type != 'w') || type[1] != '\0')
@@ -64,7 +64,7 @@ cron_popen(char *program, char *type, struct passwd *pw) {
if (!pids) {
if ((fds = sysconf(_SC_OPEN_MAX)) <= 0)
return (NULL);
- if (!(pids = calloc(fds, sizeof(PID_T))))
+ if (!(pids = calloc(fds, sizeof(pid_t))))
return (NULL);
}
if (pipe(pdes) < 0)
@@ -144,8 +144,8 @@ cron_popen(char *program, char *type, struct passwd *pw) {
int
cron_pclose(FILE *iop) {
int fdes;
- PID_T pid;
- WAIT_T status;
+ pid_t pid;
+ int status;
sigset_t sigset, osigset;
/*