From 5c6fe26324a0a4a1f95a9edecb151dcd682bad13 Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Mon, 8 Dec 2014 11:27:50 +0200 Subject: Add configure check and replacement for ffabs() --- configure.ac | 1 + lib/os_internal.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index a74681f00..067bae719 100644 --- a/configure.ac +++ b/configure.ac @@ -908,6 +908,7 @@ if test x"$enable_mmap" = x"yes"; then fi AC_CHECK_FUNCS([vsscanf sigaction sigset getpwuid_r nanosleep lstat memset readlink strchr va_copy]) +AC_CHECK_FUNCS([llabs]) AC_CHECK_FUNCS([snprintf _snprintf], [have_required_function="yes"]) test x"$have_required_function" != x"yes" && AC_MSG_ERROR([required function not found]) diff --git a/lib/os_internal.h b/lib/os_internal.h index b06b51112..157b03923 100644 --- a/lib/os_internal.h +++ b/lib/os_internal.h @@ -339,6 +339,11 @@ int xine_private_pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct ti # define lstat(FILENAME, BUF) stat((FILENAME), (BUF)) #endif +/* replace llabs */ +#ifndef HAVE_LLABS +# define llabs(a) (((a) < 0) ? (-a) : (a)) +#endif + /* replacements of dirent for MSVC platform */ #ifndef HAVE_OPENDIR #define HAVE_OPENDIR -- cgit v1.2.3