Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2002-04-04 13:24:41 +0400
committerDanny Smith <dannysmith@users.sourceforge.net>2002-04-04 13:24:41 +0400
commit0c684d4d1b19803fd41e4d66020efdca1a5c2512 (patch)
tree40eccefbc9cff115605ec5ce95d3bb4d896d18f3
parent5593b6482d9019262ca30c1a960ad512ec2fc368 (diff)
* include/math.h (DOMAIN, SING, OVERFLOW, UNDERFLOW,
TLOSS, PLOSS): Move oldname defines back, following the underscored names. (_controlfp, _control87, _clearfp, _statusfp, _fpreset, _fpecode): Remove prototypes copied from float.h. (nan, nanf): Move into block protected against RC_INVOKED and __cplusplus. * include/stdlib.h (_Exit): Change from static inline to extern inline. * mingwex/_Exit.c : New file. * mingwex/Makefile.in: Add _Exit.o to libmingwex.a.
-rw-r--r--winsup/mingw/ChangeLog14
-rw-r--r--winsup/mingw/include/math.h63
-rw-r--r--winsup/mingw/include/stdlib.h6
-rw-r--r--winsup/mingw/mingwex/Makefile.in4
-rw-r--r--winsup/mingw/mingwex/_Exit.c3
5 files changed, 46 insertions, 44 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
index b24f42479..a27d89b52 100644
--- a/winsup/mingw/ChangeLog
+++ b/winsup/mingw/ChangeLog
@@ -1,5 +1,19 @@
2002-04-04 Danny Smith <dannysmith@sourceforge.users.net>
+ * include/math.h (DOMAIN, SING, OVERFLOW, UNDERFLOW,
+ TLOSS, PLOSS): Move oldname defines back, following
+ the underscored names.
+ (_controlfp, _control87, _clearfp, _statusfp, _fpreset,
+ _fpecode): Remove prototypes copied from float.h.
+ (nan, nanf): Move into block protected against RC_INVOKED
+ and __cplusplus.
+ * include/stdlib.h (_Exit): Change from static inline to
+ extern inline.
+ * mingwex/_Exit.c : New file.
+ * mingwex/Makefile.in: Add _Exit.o to libmingwex.a.
+
+2002-04-04 Danny Smith <dannysmith@sourceforge.users.net>
+
Add libgmon.a and libmingwex.a for cygwin -mno-cygwin.
* configure.in (SUBDIRS): Add profile and mingwex to cygwin target.
(configdirs): Likewise.
diff --git a/winsup/mingw/include/math.h b/winsup/mingw/include/math.h
index 82f9173ee..e8341c3f8 100644
--- a/winsup/mingw/include/math.h
+++ b/winsup/mingw/include/math.h
@@ -46,9 +46,22 @@
*/
#ifndef __STRICT_ANSI__
+#ifndef _NO_OLDNAMES
+
+#define DOMAIN _DOMAIN
+#define SING _SING
+#define OVERFLOW _OVERFLOW
+#define UNDERFLOW _UNDERFLOW
+#define TLOSS _TLOSS
+#define PLOSS _PLOSS
+
+#endif /* Not _NO_OLDNAMES */
+#endif /* Not __STRICT_ANSI__ */
+
/* These are also defined in Mingw float.h; needed here as well to work
around GCC build issues. */
+#ifndef __STRICT_ANSI__
#ifndef __MINGW_FPCLASS_DEFINED
#define __MINGW_FPCLASS_DEFINED 1
/* IEEE 754 classication */
@@ -63,20 +76,8 @@
#define _FPCLASS_PN 0x0100 /* Positive Normal */
#define _FPCLASS_PINF 0x0200 /* Positive Infinity */
#endif /* __MINGW_FPCLASS_DEFINED */
-
-#ifndef _NO_OLDNAMES
-
-#define DOMAIN _DOMAIN
-#define SING _SING
-#define OVERFLOW _OVERFLOW
-#define UNDERFLOW _UNDERFLOW
-#define TLOSS _TLOSS
-#define PLOSS _PLOSS
-
-#endif /* Not _NO_OLDNAMES */
#endif /* Not __STRICT_ANSI__ */
-
#ifndef RC_INVOKED
#ifdef __cplusplus
@@ -174,26 +175,6 @@ int _matherr (struct _exception *);
/* These are also declared in Mingw float.h; needed here as well to work
around GCC build issues. */
/* BEGIN FLOAT.H COPY */
-
-/* Set the FPU control word as cw = (cw & ~unMask) | (unNew & unMask),
- * i.e. change the bits in unMask to have the values they have in unNew,
- * leaving other bits unchanged. */
-unsigned int _controlfp (unsigned int unNew, unsigned int unMask);
-unsigned int _control87 (unsigned int unNew, unsigned int unMask);
-
-
-unsigned int _clearfp (); /* Clear the FPU status word */
-unsigned int _statusfp (); /* Report the FPU status word */
-#define _clear87 _clearfp
-#define _status87 _statusfp
-
-void _fpreset (); /* Reset the FPU */
-void fpreset ();
-
-/* Global 'variable' for the current floating point error code. */
-int * __fpecode();
-#define _fpecode (*(__fpecode()))
-
/*
* IEEE recommended functions
*/
@@ -241,15 +222,6 @@ double yn (int, double);
#ifndef __NO_ISOCEXT
#define INFINITY HUGE_VAL
-
-double nan(const char *tagp);
-float nanf(const char *tagp);
-
-#ifndef __STRICT_ANSI__
-#define nan() nan("")
-#define nanf() nanf("")
-#endif
-
#define NAN (0.0F/0.0F)
/*
@@ -270,6 +242,15 @@ float nanf(const char *tagp);
extern "C" {
#endif
+double nan(const char *tagp);
+float nanf(const char *tagp);
+
+#ifndef __STRICT_ANSI__
+#define nan() nan("")
+#define nanf() nanf("")
+#endif
+
+
/*
We can't inline float, because we want to ensure truncation
to semantic type before classification. If we extend to long
diff --git a/winsup/mingw/include/stdlib.h b/winsup/mingw/include/stdlib.h
index 8774e4095..c7c5c92e4 100644
--- a/winsup/mingw/include/stdlib.h
+++ b/winsup/mingw/include/stdlib.h
@@ -361,10 +361,12 @@ void _seterrormode (int);
void _sleep (unsigned long);
void _exit (int) _ATTRIB_NORETURN;
+#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
/* C99 function name */
-static __inline__ void _Exit(int status)
+void _Exit(int) _ATTRIB_NORETURN; /* Declare to get noreturn attribute. */
+extern __inline__ void _Exit(int status)
{ _exit(status); }
-
+#endif
/* _onexit is MS extension. Use atexit for portability. */
typedef int (* _onexit_t)(void);
_onexit_t _onexit( _onexit_t );
diff --git a/winsup/mingw/mingwex/Makefile.in b/winsup/mingw/mingwex/Makefile.in
index cef4d85d7..9166c1c58 100644
--- a/winsup/mingw/mingwex/Makefile.in
+++ b/winsup/mingw/mingwex/Makefile.in
@@ -26,6 +26,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
mkinstalldirs = $(SHELL) $(srcdir)/../mkinstalldirs
DISTFILES = Makefile.in configure configure.in \
+ _Exit.c \
atoll.c \
dirent.c \
feclearexcept.c \
@@ -120,7 +121,8 @@ STDLIB_STUB_OBJS = \
lltoa.o ulltoa.o \
lltow.o ulltow.o \
atoll.o wtoll.o \
- strtof.o wcstof.o
+ strtof.o wcstof.o \
+ _Exit.o
STDIO_STUB_OBJS = \
snprintf.o snwprintf.o
MATH_OBJS = \
diff --git a/winsup/mingw/mingwex/_Exit.c b/winsup/mingw/mingwex/_Exit.c
new file mode 100644
index 000000000..38f7e182e
--- /dev/null
+++ b/winsup/mingw/mingwex/_Exit.c
@@ -0,0 +1,3 @@
+#include <stdlib.h>
+void _Exit(int status)
+ { _exit(status); }