Re: fscanf problem in glibc shipped with latest F11 updates.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for quick answer :) I was just puzzled because this seemed to
work without extra defines with older glibc.

On Mon, Aug 31, 2009 at 5:10 PM, Jakub Jelinek<jakub@xxxxxxxxxx> wrote:
> On Mon, Aug 31, 2009 at 04:45:17PM +0300, Maz The Northener wrote:
>> I found out that after I updated my F11 a few days ago, fscanf started
>> missbehaving.
>>
>> I filed a bug report in bugzilla. (bug 520414)
>>
>> but since I have not heard anyone else yelling about this, I thought
>> that maybe this is my fault after all... Any suggestions how to verify
>> this?
>>
>> (I do not need any help overcoming it, workaround is quite
>> straightforward for me - remove GNU extension usage. I just would like
>> to know if the bug is on my side.)
>
> This is just a user error.  You are not using any feature test macros
> (see
> info libc 'Feature Test Macros'
> ), and with that glibc headers when not using strict ISO C modes (-ansi,
> -std=c89, -std=c99) default to _POSIX_C_SOURCE=200809L in recent glibcs,
> which among other things mean XPG6 compliant *scanf.  As %a is a POSIX
> floating point in hex specifier, it conflicts with the GNU extension
> where a if followed by s, S or [ is treated as allocatable modifier.
> So, to make your code work either compile with -D_GNU_SOURCE, or, better,
> just use POSIX 2008 way, %m[a-z].
>
>        Jakub
>
> --
> fedora-devel-list mailing list
> fedora-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/fedora-devel-list
>



-- 

-Matti "Maz" Vaittinen
CWF coding team leader
http://www.curlysworldoffreeware.com/

BrakesAreForCowards!!!
When you feel blue, no one sees your tears... When your down, no one
understands your struggle...
When you feel happy, no one notices your smile...
But fart just once...
I would love to create a freeware game with C - unless I was working at NSN.

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux