diff options
author | 2014-07-12 03:32:00 +0000 | |
---|---|---|
committer | 2014-07-12 03:32:00 +0000 | |
commit | 52143d7ad4f69a68ddc1745ff2ef76c56f120457 (patch) | |
tree | 370b85651a6c14c321fbfd22c72f352734663f70 | |
parent | -DOPENSSL_NO_KRB5 is no longer needed (diff) | |
download | wireguard-openbsd-52143d7ad4f69a68ddc1745ff2ef76c56f120457.tar.xz wireguard-openbsd-52143d7ad4f69a68ddc1745ff2ef76c56f120457.zip |
Kill os-openbsd.h: we have <paths.h>, _PATH_RSH, and utimes()
-rw-r--r-- | usr.bin/rdist/Makefile | 4 | ||||
-rw-r--r-- | usr.bin/rdist/common.c | 26 | ||||
-rw-r--r-- | usr.bin/rdist/config.h | 14 | ||||
-rw-r--r-- | usr.bin/rdist/defs.h | 3 | ||||
-rw-r--r-- | usr.bin/rdist/os-openbsd.h | 52 | ||||
-rw-r--r-- | usr.bin/rdist/rdist.c | 4 | ||||
-rw-r--r-- | usr.bin/rdistd/Makefile | 4 |
7 files changed, 13 insertions, 94 deletions
diff --git a/usr.bin/rdist/Makefile b/usr.bin/rdist/Makefile index d7a04d202e7..19b1dc630b4 100644 --- a/usr.bin/rdist/Makefile +++ b/usr.bin/rdist/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.18 2014/07/05 05:31:35 guenther Exp $ +# $OpenBSD: Makefile,v 1.19 2014/07/12 03:32:00 guenther Exp $ PROG= rdist -CFLAGS+=-I. -I${.CURDIR} -DOS_H=\"os-openbsd.h\" +CFLAGS+=-I. -I${.CURDIR} SRCS= gram.y child.c client.c common.c distopt.c docmd.c expand.c \ isexec.c lookup.c message.c rdist.c CLEANFILES+=gram.c y.tab.h diff --git a/usr.bin/rdist/common.c b/usr.bin/rdist/common.c index b5e3d14a35f..0780c51c6a5 100644 --- a/usr.bin/rdist/common.c +++ b/usr.bin/rdist/common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: common.c,v 1.32 2014/07/12 03:25:03 guenther Exp $ */ +/* $OpenBSD: common.c,v 1.33 2014/07/12 03:32:00 guenther Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. @@ -620,33 +620,15 @@ notilde: int setfiletime(char *file, time_t atime, time_t mtime) { -#if SETFTIME_TYPE == SETFTIME_UTIMES struct timeval tv[2]; if (atime != 0 && mtime != 0) { tv[0].tv_sec = atime; tv[1].tv_sec = mtime; - tv[0].tv_usec = tv[1].tv_usec = (time_t) 0; - return(utimes(file, tv)); + tv[0].tv_usec = tv[1].tv_usec = 0; + return (utimes(file, tv)); } else /* Set to current time */ - return(utimes(file, NULL)); - -#endif /* SETFTIME_UTIMES */ - -#if SETFTIME_TYPE == SETFTIME_UTIME - struct utimbuf utbuf; - - if (atime != 0 && mtime != 0) { - utbuf.actime = atime; - utbuf.modtime = mtime; - return(utime(file, &utbuf)); - } else /* Set to current time */ - return(utime(file, NULL)); -#endif /* SETFTIME_UTIME */ - -#if !defined(SETFTIME_TYPE) - There is no "SETFTIME_TYPE" defined! -#endif /* SETFTIME_TYPE */ + return (utimes(file, NULL)); } /* diff --git a/usr.bin/rdist/config.h b/usr.bin/rdist/config.h index 23f8700cbaa..3d182911c7e 100644 --- a/usr.bin/rdist/config.h +++ b/usr.bin/rdist/config.h @@ -1,4 +1,4 @@ -/* $OpenBSD: config.h,v 1.9 2014/07/10 14:29:27 tedu Exp $ */ +/* $OpenBSD: config.h,v 1.10 2014/07/12 03:32:00 guenther Exp $ */ /* * Copyright (c) 1993 Michael A. Cooper @@ -42,18 +42,6 @@ * Configuration parameters */ -#include OS_H - -/* - * Include system pathname header file. Usually this is <paths.h>. - * If your system doesn't have such a file, use "mypaths.h" - */ -#if defined(PATHS_H) -# include PATHS_H -#else -# include "mypaths.h" -#endif - /* * Check to see if file is on a NFS. If it is, the file is * skipped unless the hostname specified in the Distfile has diff --git a/usr.bin/rdist/defs.h b/usr.bin/rdist/defs.h index 36dd768ed41..4bcbcce1ac0 100644 --- a/usr.bin/rdist/defs.h +++ b/usr.bin/rdist/defs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: defs.h,v 1.27 2014/07/12 03:25:03 guenther Exp $ */ +/* $OpenBSD: defs.h,v 1.28 2014/07/12 03:32:00 guenther Exp $ */ #ifndef __DEFS_H__ #define __DEFS_H__ @@ -45,6 +45,7 @@ #include <errno.h> #include <grp.h> #include <pwd.h> +#include <paths.h> #include <regex.h> #include <setjmp.h> #include <signal.h> diff --git a/usr.bin/rdist/os-openbsd.h b/usr.bin/rdist/os-openbsd.h deleted file mode 100644 index 017eda52e4a..00000000000 --- a/usr.bin/rdist/os-openbsd.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 1993 Michael A. Cooper - * Copyright (c) 1993 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* - * $OpenBSD: os-openbsd.h,v 1.24 2014/07/12 03:02:27 guenther Exp $ - */ - -/* - * OpenBSD os-*.h file - */ - -/* - * Type of set file time function available - */ -#define SETFTIME_TYPE SETFTIME_UTIMES - -/* - * Path to remote shell command - */ -#define _PATH_REMSH "/usr/bin/ssh" - -/* - * Use the system <paths.h> - */ -#define PATHS_H <paths.h> diff --git a/usr.bin/rdist/rdist.c b/usr.bin/rdist/rdist.c index 358c32a5416..f6b7caf2f77 100644 --- a/usr.bin/rdist/rdist.c +++ b/usr.bin/rdist/rdist.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rdist.c,v 1.27 2014/07/12 03:07:22 guenther Exp $ */ +/* $OpenBSD: rdist.c,v 1.28 2014/07/12 03:32:00 guenther Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. @@ -260,7 +260,7 @@ main(int argc, char **argv, char **envp) if ((cp = getenv("RSH")) != NULL && *cp != '\0') path_remsh = cp; else - path_remsh = _PATH_REMSH; + path_remsh = _PATH_RSH; } /* diff --git a/usr.bin/rdistd/Makefile b/usr.bin/rdistd/Makefile index bac7456575d..6fb0c7110b8 100644 --- a/usr.bin/rdistd/Makefile +++ b/usr.bin/rdistd/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.5 2012/11/12 01:14:41 guenther Exp $ +# $OpenBSD: Makefile,v 1.6 2014/07/12 03:32:00 guenther Exp $ PROG= rdistd SRCS= common.c filesys-os.c filesys.c message.c rdistd.c server.c .PATH: ${.CURDIR}/../rdist -CFLAGS+=-I${.CURDIR}/../rdist -DOS_H=\"os-openbsd.h\" +CFLAGS+=-I${.CURDIR}/../rdist WARNINGS=yes .include <bsd.prog.mk> |