This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Bug/missing feature in sscanf
- From: Bart Veer <bartv at ecoscentric dot com>
- To: Ãyvind Harboe <oyvind dot harboe at zylin dot com>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Tue, 22 Sep 2009 16:12:03 +0100
- Subject: Re: [ECOS] Bug/missing feature in sscanf
- References: <c09652430909210750k1781bfdfq38def7d6bc3af66f@mail.gmail.com>
>>>>> "Oyvind" == =?UTF-8?Q?=C3=98yvind Harboe?= <oyvind.harboe@zylin.com> writes:
Oyvind> %llu is not supported and gives no warning...
Oyvind> unsigned long long cval;
Oyvind> sscanf ("401", "%llu", &cval);
Oyvind> if (cval == 401)
Oyvind> {
Oyvind> diag_printf("sscanf OK\n");
Oyvind> } else
Oyvind> {
Oyvind> diag_printf("sscanf FAIL\n");
Oyvind> }
>>>>> "Oyvind" == =?UTF-8?Q?=C3=98yvind Harboe?= <oyvind.harboe@zylin.com> writes:
Oyvind> Turns out there was a patch on this that was never followed up on
Oyvind> from 2004(!!):
Oyvind> http://sourceware.org/ml/ecos-patches/2004-02/msg00044.html
Looking at the ChangeLog in language/c/libc/stdio, I see:
2004-08-18 Fredrik Hederstierna <fredrik@wespot.com>
2004-08-18 Jonathan Larmour <jifl@eCosCentric.com>
* src/input/vfscanf.cxx (vfscanf): Add long long and long double
support.
* cdl/stdio.cdl (CYGFUN_LIBC_STDIO_LONGLONG): Make it a new option.
And looking at the sources I see code related to long longs in
vfscanf(). So at first glance the patch was incorporated, and jifl did
additional work on it to allow the long long support to be suppressed
via a CDL option to reduce code size. I assume you have not disabled
CYGFUN_LIBC_STDIO_LONGLONG in your configuration.
What I don't see, unfortunately, is an addition to tests/sscanf.c
(conditional on CYGFUN_LIBC_STDIO_LONGLONG, obviously) to verify that
the code actually works. Hence the relevant code may have been broken
at some point, or there may be a toolchain issue with long longs on
whatever architecture you are using.
Bart
--
Bart Veer eCos Configuration Architect
eCosCentric Limited The eCos experts http://www.ecoscentric.com/
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
>>>> Visit us at ESC-Boston http://www.embedded.com/esc/boston <<<<
>>>> Sep 22-23 on Stand 226 at Hynes Convention Center, Boston <<<<
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss