No License on math.h

Joel Sherrill joel@rtems.org
Mon Mar 22 13:30:43 GMT 2021


On Mon, Mar 22, 2021 at 7:36 AM Corinna Vinschen via Newlib <
newlib@sourceware.org> wrote:

> On Mar 19 19:19, Joel Sherrill wrote:
> > On Fri, Mar 19, 2021, 7:07 PM Brian Inglis <
> Brian.Inglis@systematicsw.ab.ca>
> > wrote:
> >
> > > On 2021-03-19 15:51, Joel Sherrill wrote:
> > > > We noticed there is no copyright or license in math.h. Unfortunately,
> > > this
> > > > file has this as the oldest commit:
> > > > 2000-02-17 Christopher Faylor import newlib-2000-02-17 snapshot
> > > > And at that time it didn't have a file header either.
> > > > Any ideas what header should be on it?
> > >
> > > The default first licence which applies if no explicit licence is
> > > specified:
> > >
> > >
> https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=COPYING.NEWLIB
> >
> >
> > We discussed on RTEMS chat that was likely the answer. Would you please
> add
> > that? There is no provenance in the git history that this is intended and
> > not a mistake.
> >
> > I can think of one case where it turned out to be a mistake by the
> > submitter.
>
> Not in this case.  The file is as old as the repo itself and the import
> was done from the internal Cygnus repo into the new public CVS repo.
> COPYING.NEWLIB is pretty explicit here.
>

OK.

The background is that for RTEMS, we have a pending patch to avoid
warnings in our tests that check if the POSIX and C Library headers
follow the standard for the minimum set of includes to use the method. For
long double methods, they are not present on some architectures and
this causes these compile only tests to have warnings. There is some
quite specific conditional logic in math.h to ensure long double prototypes
are only visible under certain conditions.

One thought was to duplicate this logic in our tests and we wanted to
cite it properly.

Another was to ask for newlib's math.h to define something to indicate
it has long double support for a target. This would be preferable long
term especially since adding long double math for some RTEMS targets
where double != long double is on the todo list.

Would a define like _NEWLIB_HAS_LONG_DOUBLE_MATH being set
when long double be possible? But looking at the math.h right now, I'm
not sure the precise line to add it.

--joel


>
> Corinna
>
>


More information about the Newlib mailing list