Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / databases / mysql56-client / patches / patch-strings_decimal.c
blob56e9951ad9869c6a2d785e3cdb6eb114804c21db
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
6 +++ strings/decimal.c
7 @@ -103,6 +103,9 @@
8 #include <my_sys.h> /* for my_alloca */
9 #include <m_string.h>
10 #include <decimal.h>
11 +#ifdef NEEDS_BSTRING_H
12 +#include <bstring.h> /* defines bzero() */
13 +#endif
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))
19 intg_len= 1;
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;
23 if (fixed_precision)
25 if (frac > fixed_decimals)
26 @@ -387,7 +390,7 @@ int decimal2string(const decimal_t *from
27 else
28 frac-=j;
29 frac_len= frac;
30 - len= from->sign + intg_len + test(frac) + frac_len;
31 + len= from->sign + intg_len + my_test(frac) + frac_len;
33 *to_len= len;
34 s[len]= 0;