This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

float error


 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 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]