@@ -475,6 +475,7 @@ int error(const char *err, ...) __attribute__((format (printf, 1, 2)));
int error_errno(const char *err, ...) __attribute__((format (printf, 1, 2)));
void warning(const char *err, ...) __attribute__((format (printf, 1, 2)));
void warning_errno(const char *err, ...) __attribute__((format (printf, 1, 2)));
+void warning_fp(FILE *out, const char *warn, ...) __attribute__((format (printf, 2, 3)));
#ifndef NO_OPENSSL
#ifdef APPLE_COMMON_CRYPTO
@@ -253,6 +253,20 @@ void warning(const char *warn, ...)
va_end(params);
}
+void warning_fp(FILE *out, const char *warn, ...)
+{
+ va_list params;
+
+ va_start(params, warn);
+ if (out == stderr)
+ warn_routine(warn, params);
+ else {
+ vfprintf(out, warn, params);
+ fputc('\n', out);
+ }
+ va_end(params);
+}
+
/* Only set this, ever, from t/helper/, when verifying that bugs are caught. */
int BUG_exit_code;