patch to allow newlib to compile when winsup not present

J. Johnston
Thu Jan 24 16:36:00 GMT 2002

Robert Collins wrote:
> On Fri, 2002-01-25 at 06:48, Thomas Fitzsimmons wrote:
> > On Thu, 2002-01-24 at 12:49, Christopher Faylor wrote:
> > > What's wrong with saying that you need the winsup directory or a cygwin
> > > installation to compile the cygwin versions of newlib?
> > >
> >
> > That is a possibility, but even in that case, the build shouldn't fail
> > with an obscure undefined symbol error at compile time.  If we're going
> > to require either the winsup directory, or a cygwin installation, there
> > should be checks for these at configuration time. However, usually,
> > newlib doesn't handle header dependencies in this way.
> >
> > newlib typically includes system-specific headers (like types.h) in the
> > newlib distribution (like in newlib/libc/sys/cygwin/include).  Is there
> > any reason why this can't be done for the cygwin target?
> Why should a cygwin-specific header be in the _newlib_ distribution?

No overwhelming reason, however, historically there are already precedences for
this.  Newlib already contains system-specific and machine-specific header
files and a system for overriding the common ones.  It supposed to be the
C library.  It is not supposed to be 1/nth of a C library.  Look at glibc if
you want an example.  It has multiple directories for system-dependent code.
It is a very reasonable design.

That said, the line between newlib and winsup has not been drawn particularly
A simple solution is to have the header file in question for newlib (possibly
additional ones) have a #error message if Cygwin is being compiled and the
header file 
has not been overridden properly because winsup headers have not been brought

-- Jeff J.

More information about the Newlib mailing list