Always round up

Fixes https://github.com/harfbuzz/harfbuzz/issues/2496
This commit is contained in:
Behdad Esfahbod 2020-06-27 22:23:59 -07:00 committed by Ebrahim Byagowi
parent ca8202208a
commit a783840789
2 changed files with 3 additions and 8 deletions

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

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)