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

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



And just a öast nail in coffin: I tried with -D_GNU_SOURCE and it
worked like you told.

On Mon, Aug 31, 2009 at 5:26 PM, Maz The
Northener<mazziesaccount gmail com> wrote:
> 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 redhat com> 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 redhat com
>> 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.
>



-- 

-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.


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