Cygwin: don't export _feinitialise from newlib
Use the more official fesetenv(FE_DFL_ENV) from _dll_crt0, thus allowing to drop the _feinitialise declaration from fenv.h. Provide a no-op _feinitialise in Cygwin as exportable symbol for really old applications when _feinitialise was called from mainCRTStartup in crt0.o. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
3b22d72255
commit
cc19109af9
|
@ -170,11 +170,6 @@ int fegetprec (void);
|
|||
int fesetprec (int __prec);
|
||||
#endif
|
||||
|
||||
#ifdef __INSIDE_CYGWIN__
|
||||
/* Cygwin-internal ONLY. */
|
||||
extern void _feinitialise ();
|
||||
#endif
|
||||
|
||||
#endif /* __CYGWIN__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -63,10 +63,8 @@ static inline bool use_sse(void)
|
|||
return false;
|
||||
}
|
||||
|
||||
#ifndef __CYGWIN__
|
||||
/* forward declaration */
|
||||
static void _feinitialise (void);
|
||||
#endif
|
||||
|
||||
/* This function enables traps for each of the exceptions as indicated
|
||||
by the parameter except. The individual exceptions are described in
|
||||
|
@ -451,10 +449,7 @@ fesetprec (int prec)
|
|||
#endif
|
||||
|
||||
/* Set up the FPU and SSE environment at the start of execution. */
|
||||
#ifndef __CYGWIN__
|
||||
static
|
||||
#endif
|
||||
void
|
||||
static void
|
||||
_feinitialise (void)
|
||||
{
|
||||
extern fenv_t __fe_dfl_env;
|
||||
|
|
|
@ -288,6 +288,7 @@ DLL_OFILES:= \
|
|||
exec.o \
|
||||
external.o \
|
||||
fcntl.o \
|
||||
fenv.o \
|
||||
fhandler.o \
|
||||
fhandler_clipboard.o \
|
||||
fhandler_console.o \
|
||||
|
|
|
@ -1085,7 +1085,7 @@ _dll_crt0 ()
|
|||
fork_info->alloc_stack ();
|
||||
#endif
|
||||
|
||||
_feinitialise ();
|
||||
fesetenv (FE_DFL_ENV);
|
||||
_main_tls = &_my_tls;
|
||||
_main_tls->call ((DWORD (*) (void *, void *)) dll_crt0_1, NULL);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
/* no-op function as entry point for applications built between
|
||||
2010-09-11 and 2011-03-16. That's the timeframe of _feinitialise
|
||||
being called from mainCRTStartup in crt0.o. */
|
||||
void _feinitialise (void)
|
||||
{}
|
Loading…
Reference in New Issue