1
0
Fork 0

Check for the precense of truncf rather than hard-wire it in

This commit is contained in:
ehofman 2004-01-27 09:31:27 +00:00
parent 72f2c5c4f4
commit d3865a9bf9
2 changed files with 7 additions and 3 deletions

View file

@ -458,11 +458,15 @@ AC_HEADER_TIME
AC_STRUCT_TM
dnl Checks for library functions.
old_LIBS=$LIBS
LIBS="$base_LIBS $network_LIBS $opengl_LIBS"
AC_TYPE_SIGNAL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS( \
AC_CHECK_FUNCS( [ \
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)

View file

@ -53,7 +53,7 @@
// my hardware/driver requires many more.
#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) {
return (d < 0) ? -floorf(-d) : floorf(d);
}