This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib 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: patch to allow newlib to compile when winsup not present


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
well.
A simple solution is to have the header file in question for newlib (possibly
some
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
in.

-- Jeff J.


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