From 0a454147568746c503f669e1ba861f76a2e7a585 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 18 Jul 2016 16:26:26 +1000 Subject: Remove local implementation of err, errx. We now have a shared implementation in libopenbsd-compat. --- regress/modpipe.c | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'regress/modpipe.c') diff --git a/regress/modpipe.c b/regress/modpipe.c index e854f9e07..c43e9cba1 100755 --- a/regress/modpipe.c +++ b/regress/modpipe.c @@ -27,34 +27,6 @@ #include #include "openbsd-compat/getopt_long.c" -static void err(int, const char *, ...) __attribute__((format(printf, 2, 3))); -static void errx(int, const char *, ...) __attribute__((format(printf, 2, 3))); - -static void -err(int r, const char *fmt, ...) -{ - va_list args; - - va_start(args, fmt); - fprintf(stderr, "%s: ", strerror(errno)); - vfprintf(stderr, fmt, args); - fputc('\n', stderr); - va_end(args); - exit(r); -} - -static void -errx(int r, const char *fmt, ...) -{ - va_list args; - - va_start(args, fmt); - vfprintf(stderr, fmt, args); - fputc('\n', stderr); - va_end(args); - exit(r); -} - static void usage(void) { -- cgit v1.2.3 From eac1bbd06872c273f16ac0f9976b0aef026b701b Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Mon, 18 Jul 2016 17:12:22 +1000 Subject: Conditionally include err.h. --- regress/modpipe.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'regress/modpipe.c') diff --git a/regress/modpipe.c b/regress/modpipe.c index c43e9cba1..5f4824b51 100755 --- a/regress/modpipe.c +++ b/regress/modpipe.c @@ -25,6 +25,9 @@ #include #include #include +#ifdef HAVE_ERR_H +# include +#endif #include "openbsd-compat/getopt_long.c" static void -- cgit v1.2.3