Check for the precense of truncf rather than hard-wire it in
This commit is contained in:
parent
72f2c5c4f4
commit
d3865a9bf9
2 changed files with 7 additions and 3 deletions
|
@ -458,11 +458,15 @@ AC_HEADER_TIME
|
||||||
AC_STRUCT_TM
|
AC_STRUCT_TM
|
||||||
|
|
||||||
dnl Checks for library functions.
|
dnl Checks for library functions.
|
||||||
|
old_LIBS=$LIBS
|
||||||
|
LIBS="$base_LIBS $network_LIBS $opengl_LIBS"
|
||||||
AC_TYPE_SIGNAL
|
AC_TYPE_SIGNAL
|
||||||
AC_FUNC_VPRINTF
|
AC_FUNC_VPRINTF
|
||||||
AC_CHECK_FUNCS( \
|
AC_CHECK_FUNCS( [ \
|
||||||
ftime gettimeofday timegm memcpy bcopy mktime strstr rand mkfifo \
|
ftime gettimeofday timegm memcpy bcopy mktime strstr rand mkfifo \
|
||||||
random drand48 setitimer getitimer signal GetLocalTime rint getrusage )
|
random drand48 setitimer getitimer signal GetLocalTime rint getrusage \
|
||||||
|
truncf ] )
|
||||||
|
LIBS=$old_LIBS
|
||||||
|
|
||||||
AM_CONFIG_HEADER(src/Include/config.h)
|
AM_CONFIG_HEADER(src/Include/config.h)
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
// my hardware/driver requires many more.
|
// my hardware/driver requires many more.
|
||||||
#define POFF_UNITS 4
|
#define POFF_UNITS 4
|
||||||
|
|
||||||
#if defined( __FreeBSD__ ) || defined( _MSC_VER ) // no truncf on FreeBSD nor in MSVC
|
#ifndef HAVE_TRUNCF
|
||||||
inline float truncf (float d) {
|
inline float truncf (float d) {
|
||||||
return (d < 0) ? -floorf(-d) : floorf(d);
|
return (d < 0) ? -floorf(-d) : floorf(d);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue