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

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

 



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

[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