summaryrefslogtreecommitdiffstats
path: root/usr.bin/bsdiff/bspatch
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/bsdiff/bspatch')
-rw-r--r--usr.bin/bsdiff/bspatch/Makefile.depend19
-rw-r--r--usr.bin/bsdiff/bspatch/bspatch.c11
2 files changed, 20 insertions, 10 deletions
diff --git a/usr.bin/bsdiff/bspatch/Makefile.depend b/usr.bin/bsdiff/bspatch/Makefile.depend
new file mode 100644
index 0000000..815fd24
--- /dev/null
+++ b/usr.bin/bsdiff/bspatch/Makefile.depend
@@ -0,0 +1,19 @@
+# Autogenerated - do NOT edit!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DIRDEPS = \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libbz2 \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/usr.bin/bsdiff/bspatch/bspatch.c b/usr.bin/bsdiff/bspatch/bspatch.c
index db72e5c..d2af3ca 100644
--- a/usr.bin/bsdiff/bspatch/bspatch.c
+++ b/usr.bin/bsdiff/bspatch/bspatch.c
@@ -57,14 +57,6 @@ static off_t offtin(u_char *buf)
return y;
}
-static void
-usage(void)
-{
-
- fprintf(stderr, "usage: bspatch oldfile newfile patchfile\n");
- exit(1);
-}
-
int main(int argc,char * argv[])
{
FILE * f, * cpf, * dpf, * epf;
@@ -80,8 +72,7 @@ int main(int argc,char * argv[])
off_t lenread;
off_t i;
- if (argc != 4)
- usage();
+ if(argc!=4) errx(1,"usage: %s oldfile newfile patchfile\n",argv[0]);
/* Open patch file */
if ((f = fopen(argv[3], "rb")) == NULL)
OpenPOWER on IntegriCloud