This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: vfscanf in newlib
- To: "J. Johnston" <jjohnstn at cygnus dot com>, newlib at sources dot redhat dot com
- Subject: Re: vfscanf in newlib
- From: "Charles S. Wilson" <cwilson at ece dot gatech dot edu>
- Date: Fri, 20 Apr 2001 10:00:28 -0400
- CC: cygwin-developers at sources dot redhat dot com
- References: <3ADD0441.91F76FB6@ece.gatech.edu> <3ADE1FC1.F0A10A89@cygnus.com> <3ADE640A.34E88DCE@ece.gatech.edu>
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