86f7f090d3
Alistair Crooks <agc@netbsd.org> for help on this.
96 lines
2.1 KiB
Text
96 lines
2.1 KiB
Text
$NetBSD: patch-ab,v 1.1 2000/08/23 17:54:14 dmcmahill Exp $
|
|
|
|
needed to build on sparc which implements the va_arg macro differently than
|
|
other ports.
|
|
|
|
--- src/out.c.orig
|
|
+++ src/out.c
|
|
@@ -1054,4 +1054,13 @@
|
|
const char * a_format, va_list a_p)
|
|
{
|
|
+ cw_uint32_t cw32;
|
|
+ cw_uint64_t cw64;
|
|
+#ifdef _TYPE_FP96_DEFINED
|
|
+ cw_fp96_t cw96;
|
|
+#endif
|
|
+#ifdef _TYPE_FP128_DEFINED
|
|
+ cw_fp128_t cw128;
|
|
+#endif
|
|
+
|
|
cw_sint32_t retval, size, format_len, i, j, enti;
|
|
cw_uint32_t metric;
|
|
@@ -1125,10 +1134,12 @@
|
|
case 4:
|
|
{
|
|
- arg = (void *) &va_arg(a_p, cw_uint32_t);
|
|
+ cw32 = va_arg(a_p, cw_uint32_t);
|
|
+ arg = &cw32;
|
|
break;
|
|
}
|
|
case 8:
|
|
{
|
|
- arg = (void *) &va_arg(a_p, cw_uint64_t);
|
|
+ cw64 = va_arg(a_p, cw_uint64_t);
|
|
+ arg = &cw64;
|
|
break;
|
|
}
|
|
@@ -1136,5 +1147,6 @@
|
|
case 12:
|
|
{
|
|
- arg = (void *) &va_arg(a_p, cw_fp96_t);
|
|
+ cw96 = va_arg(a_p, cw_fp96_t);
|
|
+ arg = &cw96;
|
|
break;
|
|
}
|
|
@@ -1143,5 +1155,6 @@
|
|
case 16:
|
|
{
|
|
- arg = (void *) &va_arg(a_p, cw_fp128_t);
|
|
+ cw128 = va_arg(a_p, cw_fp128_t);
|
|
+ arg = &cw128;
|
|
break;
|
|
}
|
|
@@ -1232,4 +1245,12 @@
|
|
va_list a_p)
|
|
{
|
|
+ cw_uint32_t cw32;
|
|
+ cw_uint64_t cw64;
|
|
+#ifdef _TYPE_FP96_DEFINED
|
|
+ cw_fp96_t cw96;
|
|
+#endif
|
|
+#ifdef _TYPE_FP128_DEFINED
|
|
+ cw_fp128_t cw128;
|
|
+#endif
|
|
cw_sint32_t retval, spec_metric;
|
|
cw_uint32_t i, metric; /* Total number of bytes to be printed. */
|
|
@@ -1369,10 +1390,12 @@
|
|
case 4:
|
|
{
|
|
- arg = (void *) &va_arg(a_p, cw_uint32_t);
|
|
+ cw32 = va_arg(a_p, cw_uint32_t);
|
|
+ arg = &cw32;
|
|
break;
|
|
}
|
|
case 8:
|
|
{
|
|
- arg = (void *) &va_arg(a_p, cw_uint64_t);
|
|
+ cw64 = va_arg(a_p, cw_uint64_t);
|
|
+ arg = &cw64;
|
|
break;
|
|
}
|
|
@@ -1380,5 +1403,6 @@
|
|
case 12:
|
|
{
|
|
- arg = (void *) &va_arg(a_p, cw_fp96_t);
|
|
+ cw96 = va_arg(a_p, cw_fp96_t);
|
|
+ arg = &cw96;
|
|
break;
|
|
}
|
|
@@ -1387,5 +1411,6 @@
|
|
case 16:
|
|
{
|
|
- arg = (void *) &va_arg(a_p, cw_fp128_t);
|
|
+ cw128 = va_arg(a_p, cw_fp128_t);
|
|
+ arg = &cw128;
|
|
break;
|
|
}
|