summaryrefslogtreecommitdiff
path: root/Graphics.c
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics.c')
-rw-r--r--Graphics.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/Graphics.c b/Graphics.c
index b3ec1bc..43c48b9 100644
--- a/Graphics.c
+++ b/Graphics.c
@@ -30,6 +30,10 @@ from The Open Group.
* Author: Davor Matic, MIT X Consortium
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <X11/IntrinsicP.h>
#include <X11/StringDefs.h>
#include <X11/Xfuncs.h>
@@ -46,7 +50,11 @@ from The Open Group.
#define min(x, y) (((int)(x) < (int)(y)) ? (x) : (y))
#define max(x, y) (((int)(x) > (int)(y)) ? (x) : (y))
#ifndef rint
-#define rint(x) floor(x + 0.5)
+# if HAVE_LRINT
+# define rint(x) lrint(x)
+# else
+# define rint(x) floor(x + 0.5)
+# endif
#endif
/*****************************************************************************\