pkgsrc/math/dcdflib.f/patches/patch-aa
rillig 7d0ed184e5 Fixed pkglint warnings. Fixed gcc warnings. Bumped PKGREVISION since the
unfixed package may silently fail when sizeof(int) != sizeof(long).
2006-06-09 10:26:05 +00:00

30 lines
723 B
Text

$NetBSD: patch-aa,v 1.2 2006/06/09 10:26:05 rillig Exp $
--- /dev/null Tue Apr 17 00:09:13 2001
+++ src/ipmpar.c
@@ -0,0 +1,25 @@
+#include <float.h>
+#include <limits.h>
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+ipmpar_ (int *i)
+{
+ switch (*i) {
+ case 1: return 2;
+ case 2: return (sizeof(int)*(CHAR_BIT) - 1);
+ case 3: return INT_MAX;
+ case 4: return FLT_RADIX;
+ case 5: return FLT_MANT_DIG;
+ case 6: return FLT_MIN_EXP;
+ case 7: return FLT_MAX_EXP;
+ case 8: return DBL_MANT_DIG;
+ case 9: return DBL_MIN_EXP;
+ case 10: return FLT_MAX_EXP;
+ }
+ fprintf (stderr, "invalid argument: ipmpar(%d)\n", *i);
+ exit (1);
+ return 0;
+}