float error
wjyasd
wjy21cn@21cn.com
Wed Feb 27 17:37:00 GMT 2002
Hi,
I have been trying to get newlib to compile a share library for m68k-elf target under cygwin on win98.
When I used printf("%f",x) it couldn't run.
frist,I change the printf.c
// _stdout_r (_REENT)->_data = _REENT;
// ret = vfprintf (_stdout_r (_REENT), fmt, ap);
into
FILE f;
f._data = _REENT;
ret = vfprintf ( &f, fmt, ap);
If I don't change it ,program will stop at " _stdout_r (_REENT)->_data = _REENT;"
I debug it into [static char *cvt _PARAMS((struct _reent *, double, int, int, char *, int *, int, int *));] and dtoa.c file
And at dtoa.c file
234 _Bigint *b, *b1, *delta, *mlo, *mhi, *S;
235 double ds;
- 236 char *s, *s0;
237
- 238 d.d = _d;
239
- 240 if (ptr->_result) <<--------error!@
- 241 {
- 242 ptr->_result->_k = ptr->_result_k;
- 243 ptr->_result->_maxwds = 1 << ptr->_result_k;
244 Bfree (ptr, ptr->_result);
245 ptr->_result = 0;
- 246 }
When program run to 240 lines It stop again ,I don't know how to work out .
Can float part running under m68k if not can someone point me at the right line
to use.
thanks
JinYU Wu
More information about the Newlib
mailing list