From: Christopher Taylor <chtaylo3@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] C double type problem - at91sam9263
Date: Tue, 5 Aug 2008 12:37:43 -0400 [thread overview]
Message-ID: <2590773a0808050937u77a825d0od5801485e509a1ae@mail.gmail.com> (raw)
In-Reply-To: <223E6519BDCAC74695BEE9D163F8E6592306EE@oakleaf10.oakleafconsultancy.com>
Could this be related to how you are compiling the code, uclibc, and
the OS as far as endian-ness ? big vs middle vs little endian?
just a thought. I've been burned by the middle-endianness on the
arm9261. Last I looked there were some defects in how buildroot took
your parameters and implemented them in uClibc and the kernel (I seem
to remeber there was a bug in uClibc that buildroot incorrectly worked
around, but I wouldn't swear to it)
-Chris
On Tue, Aug 5, 2008 at 6:51 AM, Richard Hardy
<richardh@oakleafconsultancy.com> wrote:
>
>
>> -----Original Message-----
>> From: Ulf Samuelsson [mailto:ulf.samuelsson at atmel.com]
>> Sent: 05 August 2008 12:21
>> To: Richard Hardy; buildroot at uclibc.org
>> Subject: Re: [Buildroot] C double type problem - at91sam9263
>>
>> ----- Original Message -----
>>
>> From: Richard Hardy <mailto:richardh@oakleafconsultancy.com>
>> To: buildroot at uclibc.org
>> Sent: Monday, August 04, 2008 12:29 PM
>> Subject: [Buildroot] C double type problem - at91sam9263
>>
>>
>>
>> Hi Everyone,
>>
>> I am quite new to using buildroot and embedded linux systems in
>> general. However, I have managed to use buildroot to get a (nearly)
>> working system up and running for an at91sam9263 board. (kernel v
> 2.6.22,
>> uClibc v 0.9.29)
>>
>>
>>
>> I have one annoying problem though. One of the packages I am
>> compiling from source uses C's "double" type, and this does not seem
> to be
>> behaving as I need it to.
>>
>>
>>
>> I have created a simple example program:
>>
>>
>>
>> ...
>>
>> int main (int argc, char *argv[])
>>
>> {
>>
>> double test;
>>
>> test = 1;
>>
>> fprintf(stderr, "Test double = %f.\n", test);
>>
>> }
>>
>>
>>
>>
>>
>> Should you not be using "%lf" instead of "%f" ?
>>
>> fprintf(stderr, "Test double = %lf.\n", test);
>>
>> fprintf(stderr, "Test double = %f.\n", test);
>>
>> Best Regards
>> Ulf Samuelsson
>>
>
> Yes, you are right. But, it makes no difference to the output.
>
> Best regards,
> Richard.
>
> _______________________________________________
> buildroot mailing list
> buildroot at uclibc.org
> http://busybox.net/mailman/listinfo/buildroot
>
next prev parent reply other threads:[~2008-08-05 16:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-05 10:51 [Buildroot] C double type problem - at91sam9263 Richard Hardy
2008-08-05 16:37 ` Christopher Taylor [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-08-06 13:16 Richard Hardy
2008-08-06 13:36 ` Hinko Kocevar
2008-08-06 16:37 ` Ulf Samuelsson
2008-08-04 13:58 Richard Hardy
2008-08-04 14:16 ` Hinko Kocevar
2008-08-04 21:27 ` Matthew Dombroski
2008-08-05 8:31 ` Hinko Kocevar
2008-08-05 9:15 ` Hinko Kocevar
2008-08-04 13:52 Richard Hardy
2008-08-04 10:29 Richard Hardy
2008-08-04 12:41 ` John Voltz
2008-08-04 12:43 ` Hinko Kocevar
2008-08-05 10:20 ` Ulf Samuelsson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2590773a0808050937u77a825d0od5801485e509a1ae@mail.gmail.com \
--to=chtaylo3@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox