Mail Archives: djgpp-workers/2004/01/03/15:54:05
--part1_185.2489dbc9.2d2885a2_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
There continues to be a conflict with symbol 'roundl' in doprnt.c and the C99
function roundl(). A suggested fix that works is:
--- src/libc/ansi/stdio/doprnt.c 2003-11-08 07:19:40.000000000 -0500
+++ c:/gputil/doprnt.c 2004-01-03 15:36:26.000000000 -0500
@@ -69,7 +69,7 @@ static __inline__ char tochar(int n)
static int cvtl(long double number, int prec, int flags, char *signp,
unsigned char fmtch, char *startp, char *endp);
-static char *roundl(long double fract, int *expv, char *start, char *end,
+static char *__roundl(long double fract, int *expv, char *start, char *end,
char ch, char *signp);
static char *exponentl(char *p, int expv, unsigned char fmtch);
#ifdef __GO32__
@@ -615,7 +615,7 @@ cvtl(long double number, int prec, int f
*t++ = tochar((int)tmp);
} while (--prec && fract);
if (fract)
- startp = roundl(fract, (int *)NULL, startp,
+ startp = __roundl(fract, (int *)NULL, startp,
t - 1, (char)0, signp);
}
for (; prec--; *t++ = '0');
@@ -639,7 +639,7 @@ cvtl(long double number, int prec, int f
if (!prec && ++p < endp)
{
fract = 0;
- startp = roundl((long double)0.0L, &expcnt,
+ startp = __roundl((long double)0.0L, &expcnt,
startp, t - 1, *p, signp);
}
/* adjust expcnt for digit in front of decimal */
@@ -701,7 +701,7 @@ cvtl(long double number, int prec, int f
*t++ = tochar((int)tmp);
} while (--prec && fract);
if (fract)
- startp = roundl(fract, &expcnt, startp,
+ startp = __roundl(fract, &expcnt, startp,
t - 1, (char)0, signp);
}
/* if requires more precision */
@@ -781,7 +781,7 @@ cvtl(long double number, int prec, int f
}
}
if (fract)
- startp = roundl(fract, (int *)NULL, startp, t - 1,
+ startp = __roundl(fract, (int *)NULL, startp, t - 1,
(char)0, signp);
/* alternate format, adds 0's for precision, else trim 0's */
if (flags&ALT)
@@ -797,7 +797,7 @@ cvtl(long double number, int prec, int f
}
static char *
-roundl(long double fract, int *expv, char *start, char *end, char ch,
+__roundl(long double fract, int *expv, char *start, char *end, char ch,
char *signp)
{
long double tmp;
--part1_185.2489dbc9.2d2885a2_boundary
Content-Type: text/html; charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
<HTML><FONT FACE=3Darial,helvetica><HTML><FONT SIZE=3D3 PTSIZE=3D12 FAMILY=
=3D"SERIF" FACE=3D"Georgia" LANG=3D"0">There continues to be a conflict with=
symbol 'roundl' in doprnt.c and the C99 function roundl(). A suggeste=
d fix that works is:<BR>
<BR>
--- src/libc/ansi/stdio/doprnt.c 2003-11-08 07:19:40.000000000 -0500<BR>
+++ c:/gputil/doprnt.c 2004-01-03 15:36:26.000000000 -0500<BR>
@@ -69,7 +69,7 @@ static __inline__ char tochar(int n)<BR>
<BR>
static int cvtl(long double number, int prec, int flags, char *signp,<BR>
unsigned char fmtch, char *st=
artp, char *endp);<BR>
-static char *roundl(long double fract, int *expv, char *start, char *end,<B=
R>
+static char *__roundl(long double fract, int *expv, char *start, char *end,=
<BR>
char ch, char *signp);<BR>
static char *exponentl(char *p, int expv, unsigned char fmtch);<BR>
#ifdef __GO32__<BR>
@@ -615,7 +615,7 @@ cvtl(long double number, int prec, int f<BR>
*t++ =3D tochar((int)tmp);<BR>
} while (--prec && fract);<BR>
if (fract)<BR>
- startp =3D roundl(fract, (int *)NULL, startp,<BR>
+ startp =3D __roundl(fract, (int *)NULL, startp,<BR>
t - 1, (char)0, signp);<BR>
}<BR>
for (; prec--; *t++ =3D '0');<BR>
@@ -639,7 +639,7 @@ cvtl(long double number, int prec, int f<BR>
if (!prec && ++p < endp)<BR>
{<BR>
fract =3D 0;<BR>
- startp =3D roundl((long double)0.0L, &expcnt,<BR>
+ startp =3D __roundl((long double)0.0L, &expcnt,<BR>
startp, t - 1, *p, signp);<BR>
}<BR>
/* adjust expcnt for digit in front of=20=
decimal */<BR>
@@ -701,7 +701,7 @@ cvtl(long double number, int prec, int f<BR>
*t++ =3D tochar((int)tmp);<BR>
} while (--prec && fract);<BR>
if (fract)<BR>
- startp =3D roundl(fract, &expcnt, startp,<BR>
+ startp =3D __roundl(fract, &expcnt, startp,<BR>
t - 1, (char)0, signp);<BR>
}<BR>
/* if requires more precision */<BR>
@@ -781,7 +781,7 @@ cvtl(long double number, int prec, int f<BR>
}<BR>
}<BR>
if (fract)<BR>
- startp =3D roundl(fract, (int *)NULL, startp=
, t - 1,<BR>
+ startp =3D __roundl(fract, (int *)NULL, star=
tp, t - 1,<BR>
(char)0, signp);<BR>
/* alternate format, adds 0's for precision, else t=
rim 0's */<BR>
if (flags&ALT)<BR>
@@ -797,7 +797,7 @@ cvtl(long double number, int prec, int f<BR>
}<BR>
<BR>
static char *<BR>
-roundl(long double fract, int *expv, char *start, char *end, char ch,<BR>
+__roundl(long double fract, int *expv, char *start, char *end, char ch,<BR>
char *signp)<BR>
{<BR>
long double tmp;<BR>
</FONT></HTML>
--part1_185.2489dbc9.2d2885a2_boundary--
- Raw text -