float error
J. Johnston
jjohnstn@redhat.com
Thu Feb 28 12:50:00 GMT 2002
wjyasd wrote:
>
> Hi,
> I have been trying to get newlib to compile a share library for m68k-elf target under cygwin on win98.
>
JinYu,
You are going to have to give some details. How did you configure?
Have you made alterations to the library or are you attempting to use
a piece of the library? What error are you getting for _stdout_r
(_REENT)->_data? Is _REENT (aka _impure_ptr) 0?
The reentrancy scheme uses a reentrant structure which should be
instantiated by libc/reent/impure.c. The _REENT is just a macro
which defines to _impure_ptr. You should check the value of this
when you fail. You should also check to see that the impure_data structure
has properly been initialized.
-- Jeff J.
> 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