aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2021-03-24 11:06:58 +0100
committerCorinna Vinschen <corinna@vinschen.de>2021-04-13 12:55:34 +0200
commitcc19109af966331f76cc8b6fd7c92eec36dc2276 (patch)
treea5f4fb790620ea6546535e7e5914fafc3ee28549 /winsup
parent3b22d722555ab88ff4a9181220bbfc3fa59b94ee (diff)
downloadnewlib-cc19109af966331f76cc8b6fd7c92eec36dc2276.zip
newlib-cc19109af966331f76cc8b6fd7c92eec36dc2276.tar.gz
newlib-cc19109af966331f76cc8b6fd7c92eec36dc2276.tar.bz2
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>
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/Makefile.in1
-rw-r--r--winsup/cygwin/dcrt0.cc2
-rw-r--r--winsup/cygwin/fenv.c5
3 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in
index ff67988..73d9b37 100644
--- a/winsup/cygwin/Makefile.in
+++ b/winsup/cygwin/Makefile.in
@@ -288,6 +288,7 @@ DLL_OFILES:= \
exec.o \
external.o \
fcntl.o \
+ fenv.o \
fhandler.o \
fhandler_clipboard.o \
fhandler_console.o \
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 8100179..d4a08d1 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -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);
}
diff --git a/winsup/cygwin/fenv.c b/winsup/cygwin/fenv.c
new file mode 100644
index 0000000..80f7cc5
--- /dev/null
+++ b/winsup/cygwin/fenv.c
@@ -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)
+{}