Remove round polyfill
Added in01dff1e
and19256bef
, this was targeted at older msvc versions that don't support C99 but now as we require C++11 we don't target places those envs thus removing this.
This commit is contained in:
parent
ff9b9b1c89
commit
c4cae81a26
|
@ -108,7 +108,7 @@ endmacro ()
|
|||
if (UNIX)
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES m)
|
||||
endif ()
|
||||
check_funcs(atexit mprotect sysconf getpagesize mmap isatty newlocale strtod_l round)
|
||||
check_funcs(atexit mprotect sysconf getpagesize mmap isatty newlocale strtod_l)
|
||||
check_include_file(unistd.h HAVE_UNISTD_H)
|
||||
if (${HAVE_UNISTD_H})
|
||||
add_definitions(-DHAVE_UNISTD_H)
|
||||
|
|
|
@ -78,12 +78,6 @@ GTK_DOC_CHECK([1.15],[--flavour no-tmpl])
|
|||
|
||||
# Functions and headers
|
||||
AC_CHECK_FUNCS(atexit mprotect sysconf getpagesize mmap isatty newlocale strtod_l posix_memalign)
|
||||
|
||||
save_libs="$LIBS"
|
||||
LIBS="$LIBS -lm"
|
||||
AC_CHECK_FUNCS([round], ,[AC_CHECK_DECLS([round], , ,[#include <math.h>])])
|
||||
LIBS="$save_libs"
|
||||
|
||||
AC_CHECK_HEADERS(unistd.h sys/mman.h xlocale.h stdbool.h)
|
||||
|
||||
# Compiler flags
|
||||
|
|
14
src/hb.hh
14
src/hb.hh
|
@ -515,20 +515,6 @@ typedef uint64_t hb_vector_size_impl_t;
|
|||
#define VAR 1
|
||||
|
||||
|
||||
/* fallback for round() */
|
||||
static inline double
|
||||
_hb_round (double x)
|
||||
{
|
||||
if (x >= 0)
|
||||
return floor (x + 0.5);
|
||||
else
|
||||
return ceil (x - 0.5);
|
||||
}
|
||||
#if !defined (HAVE_ROUND) && !defined (HAVE_DECL_ROUND)
|
||||
#define round(x) _hb_round(x)
|
||||
#endif
|
||||
|
||||
|
||||
/* fallback for posix_memalign() */
|
||||
static inline int
|
||||
_hb_memalign(void **memptr, size_t alignment, size_t size)
|
||||
|
|
Loading…
Reference in New Issue