bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Fix Savannah bug #26868: compilation error on Solaris x86_64.


From: James Youngman
Subject: [PATCH] Fix Savannah bug #26868: compilation error on Solaris x86_64.
Date: Fri, 4 Dec 2009 18:36:16 +0000

* find/pred.c (file_sparseness): Use -1.0*HUGE_VAL rather than
-HUGE_VAL to avoid compilation error on Solaris x86_64.  This
avoids a "wrong type argument to unary minus" compiler error.
* NEWS: Mention this change.

Signed-off-by: James Youngman <address@hidden>
---
 ChangeLog   |    8 ++++++++
 NEWS        |    2 ++
 find/pred.c |    4 +++-
 3 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3deeb07..7f79155 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-12-04  James Youngman  <address@hidden>
+
+       Fix Savannah bug #26868: compilation error on Solaris x86_64.
+       * find/pred.c (file_sparseness): Use -1.0*HUGE_VAL rather than
+       -HUGE_VAL to avoid compilation error on Solaris x86_64.  This
+       avoids a "wrong type argument to unary minus" compiler error.
+       * NEWS: Mention this change.
+
 2009-11-29  James Youngman  <address@hidden>
 
        * find/testsuite/find.posix/exec-nogaps.exp: New test for find
diff --git a/NEWS b/NEWS
index c99faa6..d372005 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,8 @@ GNU findutils NEWS - User visible changes.    -*- outline -*- 
(allout)
 
 #27017: find -D opt / -fstype ext3 -print , -quit coredumps.
 
+#26868: compilation Error on Solaris x86_64: wrong type argument to unary minus
+
 #24873: Duplicate fprint option corrupts output
 
 #23920: warn about un-matchable -path arguments ending in /.
diff --git a/find/pred.c b/find/pred.c
index 4e59642..4a3daca 100644
--- a/find/pred.c
+++ b/find/pred.c
@@ -668,8 +668,10 @@ file_sparseness(const struct stat *p)
     {
       if (0 == p->st_blocks)
        return 1.0;
+      else if (p->st_blocks < 0)
+       return -1.0*HUGE_VAL;
       else
-       return p->st_blocks < 0 ? -HUGE_VAL : HUGE_VAL;
+       return HUGE_VAL;
     }
   else
     {
-- 
1.5.6.5





reply via email to

[Prev in Thread] Current Thread [Next in Thread]