aboutsummaryrefslogtreecommitdiff
path: root/libXfont/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'libXfont/src/util')
-rw-r--r--libXfont/src/util/fontxlfd.c4
-rw-r--r--libXfont/src/util/makefile10
2 files changed, 12 insertions, 2 deletions
diff --git a/libXfont/src/util/fontxlfd.c b/libXfont/src/util/fontxlfd.c
index 7adf74f4c..f402aa9dd 100644
--- a/libXfont/src/util/fontxlfd.c
+++ b/libXfont/src/util/fontxlfd.c
@@ -36,6 +36,7 @@ from The Open Group.
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#include <float.h>
#include <X11/fonts/fontmisc.h>
#include <X11/fonts/fontstruct.h>
#include <X11/fonts/fontxlfd.h>
@@ -203,7 +204,6 @@ xlfd_round_double(double x)
defined(__amd64__) || defined(__amd64) || \
defined(sgi)
#if !defined(__UNIXOS2__)
-#include <float.h>
/* if we have IEEE 754 fp, we can round to binary digits... */
@@ -243,7 +243,7 @@ xlfd_round_double(double x)
j = 1 << ((DBL_MANT_DIG-XLFD_NDIGITS_2) & 0x07);
for (; i<7; i++) {
k = d.b[i] + j;
- d.b[i] = k;
+ d.b[i] = k&0xff;
if (k & 0x100) j = 1;
else break;
}
diff --git a/libXfont/src/util/makefile b/libXfont/src/util/makefile
new file mode 100644
index 000000000..69cbeac95
--- /dev/null
+++ b/libXfont/src/util/makefile
@@ -0,0 +1,10 @@
+LIBRARY = libutil
+
+INCLUDES += ../stubs
+
+CSRCS = atom.c fontaccel.c fontnames.c fontutil.c fontxlfd.c format.c miscutil.c \
+ patcache.c private.c utilbitmap.c
+
+INCLUDES := ../../../../build $(INCLUDES)
+
+