This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: scanf and m modifier

On Jul  8 11:42, Eric Blake wrote:
> 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.

Indeed, the 'm' modifier isn't implemented in newlib yet.  However, the
vfscanf code, while being a bot more convoluted than FreeBSD/NetBSD to
support small targets, is still based on FreeBSD and NetBSD.  It might
be possible to port the 'm' handling from one of them with moderate

Anybody here who'd like to do that?

Just send your patch to the newlib AT sourceware DOT org mailing list 
and we're looking it over for inclusion.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: signature.asc
Description: PGP signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]