libm: Control errno support with _IEEE_LIBM configuration parameter

This removes the run-time configuration of errno support present in
portions of the math library and unifies all of the compile-time errno
configuration under a single parameter so that the whole library
is consistent.

The run-time support provided by _LIB_VERSION is no longer present in
the public API, although it is still used internally to disable errno
setting in some functions. Now that it is a constant, the compiler should
remove that code when errno is not supported.

This removes s_lib_ver.c as _LIB_VERSION is no longer variable.

Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard via Newlib
2020-08-04 15:22:24 -07:00
committed by Corinna Vinschen
parent e108d04432
commit c3ce8405c1
6 changed files with 22 additions and 73 deletions

View File

@ -612,22 +612,6 @@ extern int *__signgam (void);
#define M_LOG2_E _M_LN2
#define M_INVLN2 1.4426950408889633870E0 /* 1 / log(2) */
/* Global control over fdlibm error handling. */
enum __fdlibm_version
{
__fdlibm_ieee = -1,
__fdlibm_posix
};
#define _LIB_VERSION_TYPE enum __fdlibm_version
#define _LIB_VERSION __fdlib_version
extern __IMPORT _LIB_VERSION_TYPE _LIB_VERSION;
#define _IEEE_ __fdlibm_ieee
#define _POSIX_ __fdlibm_posix
#endif /* __BSD_VISIBLE */
_END_STD_C