aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--newlib/libc/machine/shared_x86/sys/fenv.h5
-rw-r--r--newlib/libm/machine/shared_x86/fenv.c7
-rw-r--r--winsup/cygwin/Makefile.in1
-rw-r--r--winsup/cygwin/dcrt0.cc2
-rw-r--r--winsup/cygwin/fenv.c5
5 files changed, 8 insertions, 12 deletions
diff --git a/newlib/libc/machine/shared_x86/sys/fenv.h b/newlib/libc/machine/shared_x86/sys/fenv.h
index e0408fe..243cac2 100644
--- a/newlib/libc/machine/shared_x86/sys/fenv.h
+++ b/newlib/libc/machine/shared_x86/sys/fenv.h
@@ -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
diff --git a/newlib/libm/machine/shared_x86/fenv.c b/newlib/libm/machine/shared_x86/fenv.c
index 8d1f1ad..ccc08e2 100644
--- a/newlib/libm/machine/shared_x86/fenv.c
+++ b/newlib/libm/machine/shared_x86/fenv.c
@@ -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;
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)
+{}