diff options
author | Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> | 2019-05-11 21:36:41 -0500 |
---|---|---|
committer | Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> | 2019-05-11 21:36:41 -0500 |
commit | 9d6d971d463053417e18e01095cc3c7bf722f892 (patch) | |
tree | efdc90a9ac38fb0a09295856a7a182b2a692a230 /bin/cp/cp.c | |
parent | 6acee58ff11645500868d4b86e7470293c478f57 (diff) | |
download | userland-9d6d971d463053417e18e01095cc3c7bf722f892.tar.gz userland-9d6d971d463053417e18e01095cc3c7bf722f892.tar.bz2 userland-9d6d971d463053417e18e01095cc3c7bf722f892.tar.xz userland-9d6d971d463053417e18e01095cc3c7bf722f892.zip |
bin/cp: make buildable via libbsd
Diffstat (limited to 'bin/cp/cp.c')
-rw-r--r-- | bin/cp/cp.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/bin/cp/cp.c b/bin/cp/cp.c index 2f4fab1..4f5d960 100644 --- a/bin/cp/cp.c +++ b/bin/cp/cp.c @@ -32,21 +32,6 @@ * SUCH DAMAGE. */ -#include <sys/cdefs.h> -#ifndef lint -__COPYRIGHT( -"@(#) Copyright (c) 1988, 1993, 1994\ - The Regents of the University of California. All rights reserved."); -#endif /* not lint */ - -#ifndef lint -#if 0 -static char sccsid[] = "@(#)cp.c 8.5 (Berkeley) 4/29/95"; -#else -__RCSID("$NetBSD: cp.c,v 1.59 2016/03/05 19:48:55 uwe Exp $"); -#endif -#endif /* not lint */ - /* * Cp copies source files to target files. * @@ -72,9 +57,11 @@ __RCSID("$NetBSD: cp.c,v 1.59 2016/03/05 19:48:55 uwe Exp $"); #include <locale.h> #include <signal.h> #include <stdlib.h> +#include <bsd/stdlib.h> #include <stdio.h> #include <string.h> #include <unistd.h> +#include <signal.h> #include "extern.h" @@ -96,7 +83,7 @@ enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE }; static int copy(char *[], enum op, int); static void -progress(int sig __unused) +progress(int sig) { pinfo++; @@ -218,7 +205,7 @@ main(int argc, char *argv[]) /* Set end of argument list for fts(3). */ argv[argc] = NULL; - (void)signal(SIGINFO, progress); + (void)signal(SIGHUP, progress); /* * Cp has two distinct cases: |