> > > [...] > > > > > > Sorry, I had simply forgotten that. However, if you use strtol, > > > errno > > > will be set properly. > > > > ok ... that works with strtol, but what is if I want to scan floats? > > Here, strtod, strtof, atof do NOT set errno or return an error when > > the > > number is too small or too big. > > hmm, you are right. In libc/stdlib/strtod.c, there is a #define that > sets _STRTOD_ERRNO. You should check if this is set to "1". For older > uClibc's, it is 0.
Although _STRTOD_ERRNO is set to 1 in libc/stdlib/strtod.c, errno is NOT set if i do the following: char input[] = "999999999999999999999999999999999999999999999999999999999999.9"; errno = 0; double output = strtod(input, NULL); printf(errno: %d\n", errno); printf(output: %f\n", output); the output is: errno: 0 output: 0.00000 or (-8.63617e-25 which is really near zero) Regards Mathias
_______________________________________________ uClinux-dev mailing list [email protected] http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by [email protected] To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
