public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Update signbit functions to work on targets where integers are only 16-bits.
@ 2015-05-13  8:35 Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2015-05-13  8:35 UTC (permalink / raw)
  To: newlib-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=d958183ba446d8c0bf55cdb5479b54a347b3439a

commit d958183ba446d8c0bf55cdb5479b54a347b3439a
Author: Nick Clifton <nickc@redhat.com>
Date:   Wed May 13 09:34:37 2015 +0100

    Update signbit functions to work on targets where integers are only 16-bits.
    
    	* libm/common/s_signbit.c (__signbitf): Fix for 16-bit targets.
    	(__signbitd): Likewise.

Diff:
---
 newlib/ChangeLog               | 5 +++++
 newlib/libm/common/s_signbit.c | 8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index e40d26b..d36decd 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-13  Nick Clifton  <nickc@redhat.com>
+
+	* libm/common/s_signbit.c (__signbitf): Fix for 16-bit targets.
+	(__signbitd): Likewise.
+
 2015-05-02  Corinna Vinschen  <vinschen@redhat.com>
 
 	* libc/include/sys/time.h: Include sys/select.h on Cygwin.  Explain why.
diff --git a/newlib/libm/common/s_signbit.c b/newlib/libm/common/s_signbit.c
index 746ab46..6ea714d 100644
--- a/newlib/libm/common/s_signbit.c
+++ b/newlib/libm/common/s_signbit.c
@@ -41,19 +41,19 @@ int __signbitd (double x);
 int
 __signbitf (float x)
 {
-  unsigned int w;
+  __uint32_t w;
 
   GET_FLOAT_WORD(w,x);
 
-  return (w & 0x80000000);
+  return (w & 0x80000000) != 0;
 }
 
 int
 __signbitd (double x)
 {
-  unsigned int msw;
+  __uint32_t msw;
 
   GET_HIGH_WORD(msw, x);
 
-  return (msw & 0x80000000);
+  return (msw & 0x80000000) != 0;
 }


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [newlib-cygwin] Update signbit functions to work on targets where integers are only 16-bits.
@ 2015-05-29 14:00 Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2015-05-29 14:00 UTC (permalink / raw)
  To: newlib-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=7b3c1cffceea4c5418cf708d09a5187ff235cfe2

commit 7b3c1cffceea4c5418cf708d09a5187ff235cfe2
Author: Nick Clifton <nickc@redhat.com>
Date:   Wed May 13 09:34:37 2015 +0100

    Update signbit functions to work on targets where integers are only 16-bits.
    
    	* libm/common/s_signbit.c (__signbitf): Fix for 16-bit targets.
    	(__signbitd): Likewise.

Diff:
---
 newlib/ChangeLog               | 5 +++++
 newlib/libm/common/s_signbit.c | 8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index e40d26b..d36decd 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-13  Nick Clifton  <nickc@redhat.com>
+
+	* libm/common/s_signbit.c (__signbitf): Fix for 16-bit targets.
+	(__signbitd): Likewise.
+
 2015-05-02  Corinna Vinschen  <vinschen@redhat.com>
 
 	* libc/include/sys/time.h: Include sys/select.h on Cygwin.  Explain why.
diff --git a/newlib/libm/common/s_signbit.c b/newlib/libm/common/s_signbit.c
index 746ab46..6ea714d 100644
--- a/newlib/libm/common/s_signbit.c
+++ b/newlib/libm/common/s_signbit.c
@@ -41,19 +41,19 @@ int __signbitd (double x);
 int
 __signbitf (float x)
 {
-  unsigned int w;
+  __uint32_t w;
 
   GET_FLOAT_WORD(w,x);
 
-  return (w & 0x80000000);
+  return (w & 0x80000000) != 0;
 }
 
 int
 __signbitd (double x)
 {
-  unsigned int msw;
+  __uint32_t msw;
 
   GET_HIGH_WORD(msw, x);
 
-  return (msw & 0x80000000);
+  return (msw & 0x80000000) != 0;
 }


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-29 14:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-13  8:35 [newlib-cygwin] Update signbit functions to work on targets where integers are only 16-bits Nick Clifton
2015-05-29 14:00 Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).