Always round up

Fixes https://github.com/harfbuzz/harfbuzz/issues/2496
This commit is contained in:
Behdad Esfahbod authored and Ebrahim Byagowi committed 2020-06-28 13:10:37 +04:30
1 parent ca8202208a
commit a783840789
2 files changed
+3 -8

No files matched your search

+1 -1
View File
@@ -68,7 +68,7 @@ GTK_DOC_CHECK([1.15],[--flavour no-tmpl])
])
# Functions and headers
AC_CHECK_FUNCS(atexit mprotect sysconf getpagesize mmap isatty roundf)
AC_CHECK_FUNCS(atexit mprotect sysconf getpagesize mmap isatty)
AC_CHECK_HEADERS(unistd.h sys/mman.h stdbool.h)
# Compiler flags
+2 -7
View File
@@ -499,14 +499,9 @@ static_assert ((sizeof (hb_var_int_t) == 4), "");
#define HB_VAR_ARRAY 1
#endif
static inline double
_hb_roundf (float x)
{
return x >= 0 ? floor ((double) x + .5) : ceil ((double) x - .5);
}
#ifndef HAVE_ROUNDF
static inline float
_hb_roundf (float x) { return floorf (x + .5f); }
#define roundf(x) _hb_roundf(x)
#endif
/* Endian swap, used in Windows related backends */
static inline uint16_t hb_uint16_swap (const uint16_t v)