#endif
} /* end warn_errno */
+/* fatal error */
+void die(const char *fmt, ...)
+{
+ va_list ap;
+
+ fflush(stdout); /* in case stdout and stderr are the same */
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ if (errno)
+ fprintf(stderr, " (%s)", strerror(errno));
+ fputc('\n', stderr);
+ fflush(stderr);
+ exit(1);
+}
+
#ifdef __cplusplus
} /* end extern "C" */
#endif