summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2009-08-21 20:25:28 +0000
committerJeff Johnston <jjohnstn@redhat.com>2009-08-21 20:25:28 +0000
commitc11ba63d52f86470878b8ab9c22bfc6676f1dd12 (patch)
tree65a668d161c5874cb4006459269576bd3daeeedb
parenta2c5f4b4e47813022a63a68dcbcdb3964d5839a9 (diff)
downloadcygnal-c11ba63d52f86470878b8ab9c22bfc6676f1dd12.tar.gz
cygnal-c11ba63d52f86470878b8ab9c22bfc6676f1dd12.tar.bz2
cygnal-c11ba63d52f86470878b8ab9c22bfc6676f1dd12.zip
2009-08-21 Craig Howland <howland@LGSInnovations.com>
* libm/common/s_remquo.c (remquo): Fix sign of quotient when |x|==|y|. * libc/stdio/mktemp.c: Add #include <stdlib.h> for function prototypes.
-rw-r--r--newlib/ChangeLog5
-rw-r--r--newlib/libc/stdio/mktemp.c17
-rw-r--r--newlib/libm/common/s_remquo.c4
3 files changed, 8 insertions, 18 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 1078ebf0d..415be6aa3 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-21 Craig Howland <howland@LGSInnovations.com>
+
+ * libm/common/s_remquo.c (remquo): Fix sign of quotient when |x|==|y|.
+ * libc/stdio/mktemp.c: Add #include <stdlib.h> for function prototypes.
+
2009-08-19 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* iconvdata/Makefile.am (all): Remove.
diff --git a/newlib/libc/stdio/mktemp.c b/newlib/libc/stdio/mktemp.c
index 25e8a012b..cfd74ad39 100644
--- a/newlib/libc/stdio/mktemp.c
+++ b/newlib/libc/stdio/mktemp.c
@@ -55,22 +55,6 @@ ANSI_SYNOPSIS
int *_mkstemp_r(struct _reent *<[reent]>, char *<[path]>);
int *_mkstemps_r(struct _reent *<[reent]>, char *<[path]>, int <[len]>);
-TRAD_SYNOPSIS
- #include <stdlib.h>
- char *mktemp(<[path]>)
- char *<[path]>;
-
- int mkstemp(<[path]>)
- char *<[path]>;
-
- char *_mktemp_r(<[reent]>, <[path]>)
- struct _reent *<[reent]>;
- char *<[path]>;
-
- int _mkstemp_r(<[reent]>, <[path]>)
- struct _reent *<[reent]>;
- char *<[path]>;
-
DESCRIPTION
<<mktemp>>, <<mkstemp>>, and <<mkstemps>> attempt to generate a file name
that is not yet in use for any existing file. <<mkstemp>> and <<mkstemps>>
@@ -122,6 +106,7 @@ Supporting OS subroutines required: <<getpid>>, <<mkdir>>, <<open>>, <<stat>>.
*/
#include <_ansi.h>
+#include <stdlib.h>
#include <reent.h>
#include <sys/types.h>
#include <fcntl.h>
diff --git a/newlib/libm/common/s_remquo.c b/newlib/libm/common/s_remquo.c
index 9e18ab132..8ae287575 100644
--- a/newlib/libm/common/s_remquo.c
+++ b/newlib/libm/common/s_remquo.c
@@ -104,8 +104,8 @@ remquo(double x, double y, int *quo)
goto fixup; /* |x|<|y| return x or x-y */
}
if(lx==ly) {
- *quo = 1;
- return Zero[(__uint32_t)sx>>31]; /* |x|=|y| return x*0*/
+ *quo = (sxy ? -1 : 1);
+ return Zero[(__uint32_t)sx>>31]; /* |x|=|y| return x*0 */
}
}