Closed apptaro closed 9 years ago
-lm is also needed for LIBS so floor can be used.
I don't think that macro really produces same results as real round() if x < 0. For example if x=-0.5 , round will return -1.0 but floor(0.5+(-0.5)) will return 0.0....
I updated code [see 87640bcbc9bad0c1c83e9141fab900b5ec76bf00] to use floor() instead of round(), so now it should compile fine on old Solaris?
Thank you! Now it compiles on Solaris 9!
jpegoptim 1.4.2 does not compile on Solaris 9 with the following error:
Undefined first referenced symbol in file round jpegoptim.o
See: https://community.oracle.com/thread/1923824
Probably the code below should fix the issue:
ifndef HAVE_LIBM
define round(x) floor(0.5+x)
endif