Fix FTBFS on fmin redefinition

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit e199b0f778)
r14.0.x
Slávek Banko 8 years ago
parent 1a82170e1e
commit ec9ef61440

@ -39,6 +39,7 @@
#define HAS_MBSTATE 1
#endif
#endif
#cmakedefine HAVE_FMIN 1
// kmrml
#cmakedefine HAVE_STDLIB_H 1

@ -10,6 +10,7 @@
#################################################
include( CheckFunctionExists )
include( CheckCXXSourceCompiles )
check_type_size( wchar_t WCHAR_T )
@ -23,3 +24,14 @@ if( HAVE_WCHAR_T )
check_function_exists( wcrtomb HAVE_WCRTOMB )
endif( )
endif( )
check_cxx_source_compiles(
"
#include <cmath>
int main(int, char*[]) {
float res = fmin(0, 1);
return 0;
}
"
HAVE_FMIN
)

@ -97,10 +97,11 @@ inline unsigned char
umin(unsigned char a, unsigned char b)
{ return (a>b) ? b : a; }
#if !defined(HAVE_FMIN)
inline float
fmin(float a, float b)
{ return (a>b) ? b : a; }
#endif
// ------- DJVUPALETTE

Loading…
Cancel
Save