This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: option X_TLOSS error.
- From: Bart Veer <bartv at ecoscentric dot com>
- To: perbelli at sci dot univr dot it
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Tue, 4 Feb 2003 17:32:56 +0000 (GMT)
- Subject: Re: [ECOS] option X_TLOSS error.
- References: <32812.157.27.242.227.1043751730.squirrel@profs.sci.univr.it> <3E380755.6040703@eCosCentric.com> <33381.157.27.242.227.1044367602.squirrel@profs.sci.univr.it>
>>>>> "Giovanni" == Giovanni Perbellini <perbelli@sci.univr.it> writes:
Giovanni> Dear Jonathan,
Giovanni> I tried the following:
Giovanni> +downloaded a CVS image from scratch (at today)
Giovanni> +ran ecosconfig 2.11 on linux redhat 8.0. Once entered the repository
Giovanni> I get:
Giovanni> /opt/CROSSCOMPDIR/ecos/src/ecos-cvs-040203/ecos/packages/language/c/libm/current/cdl/libm.cdl,
Giovanni> option X_TLOSS, property default_value: error Invalid floating point constant `1.41484755040568800000E+16'.
Giovanni> <end of data>{.41484755040568800000e+16}
<snip>
That particular error message is coming from inside libcdl. It
currently has the string "1.41484755040568800000e+16" and is trying to
check that this is a valid double precision number. To do so it calls
the C library routine strtod(), and presumably that function is
behaving slightly differently with your specific setup. This is a bit
strange, since functions like strtod() don't change all that often.
Could you try to compile the following program on your Linux box?
------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#define VALUE "1.41484755040568800000e+16"
int
main(int argc, char** argv)
{
char* end_ptr;
double result;
errno = 0;
result = strtod(VALUE, &end_ptr);
if (errno != 0) {
printf("Conversion failed, errno %d\n", errno);
}
printf("Start_ptr %p, end_ptr %p, *end_ptr %x\n", VALUE, end_ptr, *end_ptr);
return EXIT_SUCCESS;
}
------------------------------------------------------------------------
On my machine the conversion succeeds and I get the following output:
Start_ptr 0x8048580, end_ptr 0x804859a, *end_ptr 0
which is what I would expect, with end_ptr pointing at the string's
terminating \0
Bart
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss