-#include "config.h"
-
-#if HAVE_ERR
-
-int dummy;
-
-#else
-
-/* $Id: compat_err.c,v 1.3 2015/11/07 14:22:29 schwarze Exp $ */
+/* $Id: compat_err.c,v 1.5 2020/06/15 01:37:14 schwarze Exp $ */
/*
* Copyright (c) 1993
* The Regents of the University of California. All rights reserved.
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+#include "config.h"
#include <errno.h>
#include <stdarg.h>
exit(eval);
}
+void
+errx(int eval, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ vwarnxi(fmt, ap);
+ va_end(ap);
+ fputc('\n', stderr);
+ exit(eval);
+}
+
void
warn(const char *fmt, ...)
{
va_end(ap);
fputc('\n', stderr);
}
-
-#endif