[gnome-screensaver] Define a trunc macro for systems that don't have one



commit 6283ea74ff42ba4a459fc16449078ddfe4ece82f
Author: William Jon McCann <jmccann redhat com>
Date:   Thu Jan 28 20:19:09 2010 -0500

    Define a trunc macro for systems that don't have one
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=583285

 savers/floaters.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/savers/floaters.c b/savers/floaters.c
index 532bbf4..2d26e27 100644
--- a/savers/floaters.c
+++ b/savers/floaters.c
@@ -41,6 +41,10 @@
 
 #include "gs-theme-window.h"
 
+#ifndef trunc
+#define trunc(x) ((x > 0.0) ? floor(x) : -floor(-x))
+#endif
+
 #ifndef OPTIMAL_FRAME_RATE
 #define OPTIMAL_FRAME_RATE (25.0)
 #endif



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