This is the mail archive of the cygwin-developers@cygwin.com 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]

Re: vfscanf in newlib


crossposted to cygwin-developers@sources.redhat.com (cygwin people: see
the rest of this thread in the newlib mailing list archives beginning
here: http://sources.redhat.com/ml/newlib/2001/msg00219.html )

Charles Wilson wrote:
> How's this? (see attached patch to libc/include/stdio.h,
> libc/stdio/Makefile.am, libc/stdio/Makefile.in, libc/stdio/vfscanf.c,
> plus new files libc/stdio/vscanf.c and libc/stdio/vsscanf.c)
> 
> Note: these modifications compile -- but I have not (can not) test
> them.  I'm using a cygwin system, which incorporates newlib.  So, to
> test changes to newlib, I have to build a new cygwin kernel -- but
> something seems to have broken *in cygwin* recently and I'm having
> trouble building cygwin, but libc.a(newlib) builds okay.  Thus, I can't
> test these additions to newlib since my runtime (cygwin) already
> includes (the old) newlib.  Perhaps someone on a different platform can
> test these additions to newlib?

Okay, it turns out the cygwin problem was actually a problem with the
latest cygwin release of gcc (specs bug).  After fixing that, I was able
to build a working cygwin kernel incorporating these newlib changes.  I
will attempt some tests of the new functions today. However...

> I followed the pattern I saw in the scanf family, including the
> _function_r reentrant versions -- however, I am not sure that the
> functions _vfscanf_r, vscanf_r, and _vsscanf_r are truly reentrant --
> again, perhaps someone more knowledgable give the code a look.

I'm still not sure about reentrancy.

> I'm providing the patches and new files in the hopes that they will save
> somebody (Jeff?) some time, when it comes to adding these six functions
> to newlib.

Since the cygwin folks are about to release a new official kernel (1.3.0
this weekend) I'd like to get these changes into newlib quickly.  Other
than the tests promised above, what else do I need to do to facilitate
that?

cygwin folks:  I also have some matching patches for winsup to enable
cygwin to export the new functions from the dll.  I will post those
separately (without crossposting to newlib@).

--Chuck


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