scanf and m modifier

Eric Blake eblake@redhat.com
Fri Jul 8 17:42:00 GMT 2016


On 07/08/2016 11:22 AM, Eliot Moss wrote:
> On 7/8/2016 1:16 PM, Owen Leibman wrote:
>> The m modifier is handled just fine by the compiler, but
>> the results of using it are different on Cygwin than on several other
>> systems
>> I've tried. Here is a sample program:
> 
> Dear Owen -- The first question I'd ask is: What versions of gcc
> and C libraries are we talking about?  IIRC, the m feature is
> relatively new (relative being, umm, relative), so which gcc you're
> using, and the libraries, too, may matter.

scanf("%ms") is a POSIX extension, not required by C99.  I suspect the
answer is that no one has implemented it in newlib yet; patches welcome.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20160708/27b4dcb4/attachment.sig>


More information about the Cygwin mailing list