pkgsrc/math/dieharder/patches/patch-aa
gson a14fbf5c76 Initial import of dieharder-2.24.4 into pkgsrc.
DieHarder is a test suite for random number generators.  It includes a
reimplementation in C of the well-known Diehard test suite as well as
additional tests.
2007-09-13 10:07:36 +00:00

23 lines
582 B
Text

$NetBSD: patch-aa,v 1.1.1.1 2007/09/13 10:07:36 gson Exp $
--- dieharder/gnu_r_rngs.c.orig 2007-05-22 03:34:27.000000000 +0300
+++ dieharder/gnu_r_rngs.c
@@ -58,7 +58,17 @@ typedef unsigned long int Int32;
typedef void * (*DL_FUNC)();
-void error(const char *txt, ...);
+void error(const char *fmt, ...) {
+ va_list args;
+ va_start(args, fmt);
+ fflush(stdout);
+ fprintf(stderr, "error: ");
+ vfprintf(stderr, fmt, args);
+ va_end(args);
+ fprintf(stderr, "\n");
+ exit(1);
+}
+
char *_(char *txt) { return(txt); };
/* UINT_MAX from limits.h */