1 $NetBSD
: patch
-strings_decimal
.c
,v
1.1 2013/02/13 21:00:08 adam Exp $
3 * Portability
: include
<bstring
.h
> if exists
.
5 --- strings
/decimal
.c
.orig
2013-04-05 12:27:17.000000000 +0000
8 #include <my_sys.h> /* for my_alloca */
11 +#ifdef NEEDS_BSTRING_H
12 +#include <bstring.h> /* defines bzero() */
16 Internally decimal numbers are stored base 10^9 (see DIG_BASE below)
17 @@ -353,7 +356,7 @@ int decimal2string(const decimal_t *from
18 if (!(intg_len= fixed_precision ? fixed_intg : intg))
20 frac_len= fixed_precision ? fixed_decimals : frac;
21 - len= from->sign + intg_len + test(frac) + frac_len;
22 + len= from->sign + intg_len + my_test(frac) + frac_len;
25 if (frac > fixed_decimals)
26 @@ -387,7 +390,7 @@ int decimal2string(const decimal_t *from
30 - len= from->sign + intg_len + test(frac) + frac_len;
31 + len= from->sign + intg_len + my_test(frac) + frac_len;