Looks good, but again please add a comment on this __fenv.h why it exists. -- Nadav Har'El [email protected]
On Sat, Aug 29, 2020 at 7:46 AM Waldemar Kozaczuk <[email protected]> wrote: > Signed-off-by: Waldemar Kozaczuk <[email protected]> > --- > arch/aarch64/feexcept.cc | 1 + > arch/x64/feexcept.cc | 1 + > include/api/__fenv.h | 15 +++++++++++++++ > include/api/fenv.h | 32 +------------------------------- > tests/tst-feexcept.cc | 1 + > 5 files changed, 19 insertions(+), 31 deletions(-) > create mode 100644 include/api/__fenv.h > mode change 100644 => 120000 include/api/fenv.h > > diff --git a/arch/aarch64/feexcept.cc b/arch/aarch64/feexcept.cc > index 647f0a52..0d296314 100644 > --- a/arch/aarch64/feexcept.cc > +++ b/arch/aarch64/feexcept.cc > @@ -8,6 +8,7 @@ > #include <osv/types.h> > #include <osv/stubbing.hh> > #include <fenv.h> > +#include <__fenv.h> > // Note that musl's fenv.h does not define feenableexcept and friends, so > // we need to 'extern "C"' them here, as no header file does this. > > diff --git a/arch/x64/feexcept.cc b/arch/x64/feexcept.cc > index acfa827c..fd07ad2a 100644 > --- a/arch/x64/feexcept.cc > +++ b/arch/x64/feexcept.cc > @@ -7,6 +7,7 @@ > > #include <osv/types.h> > #include <fenv.h> > +#include <__fenv.h> > > int feenableexcept(int mask) > { > diff --git a/include/api/__fenv.h b/include/api/__fenv.h > new file mode 100644 > index 00000000..b0b67fb6 > --- /dev/null > +++ b/include/api/__fenv.h > @@ -0,0 +1,15 @@ > +#ifndef ___FENV_H > +#define ___FENV_H > + > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +int feenableexcept(int); > +int fedisableexcept(int); > +int fegetexcept(void); > + > +#ifdef __cplusplus > +} > +#endif > +#endif > diff --git a/include/api/fenv.h b/include/api/fenv.h > deleted file mode 100644 > index 45415133..00000000 > --- a/include/api/fenv.h > +++ /dev/null > @@ -1,31 +0,0 @@ > -#ifndef _FENV_H > -#define _FENV_H > - > -#ifdef __cplusplus > -extern "C" { > -#endif > - > -#include <bits/fenv.h> > - > -int feclearexcept(int); > -int fegetexceptflag(fexcept_t *, int); > -int feraiseexcept(int); > -int fesetexceptflag(const fexcept_t *, int); > -int fetestexcept(int); > - > -int fegetround(void); > -int fesetround(int); > - > -int fegetenv(fenv_t *); > -int feholdexcept(fenv_t *); > -int fesetenv(const fenv_t *); > -int feupdateenv(const fenv_t *); > - > -int feenableexcept(int); > -int fedisableexcept(int); > -int fegetexcept(void); > - > -#ifdef __cplusplus > -} > -#endif > -#endif > diff --git a/include/api/fenv.h b/include/api/fenv.h > new file mode 120000 > index 00000000..a01a36fa > --- /dev/null > +++ b/include/api/fenv.h > @@ -0,0 +1 @@ > +../../../musl/include/fenv.h > \ No newline at end of file > diff --git a/tests/tst-feexcept.cc b/tests/tst-feexcept.cc > index f16c5f91..5d5ddc1f 100644 > --- a/tests/tst-feexcept.cc > +++ b/tests/tst-feexcept.cc > @@ -9,6 +9,7 @@ > // To compile on Linux, use: c++ -std=c++11 tests/tst-feexcept.cc > > #include <fenv.h> > +#include <__fenv.h> > #include <signal.h> > #include <assert.h> > #include <setjmp.h> > -- > 2.26.2 > > -- > You received this message because you are subscribed to the Google Groups > "OSv Development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/osv-dev/20200829044642.575295-1-jwkozaczuk%40gmail.com > . > -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/CANEVyjuKbvHTRaQ-tOEv091_Hjo8fuPn0641yOoA77JVEAOwuQ%40mail.gmail.com.
