1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-22 04:17:44 +00:00
freebsd-ports/net/opal
Don Lewis b049eba905 Fix type for abs() calls in net/opal
During the exp-run in bug 208158, it was found that net/opal gives
errors with libc++ 3.8.0 [1]:

../common/mpi.cxx:135:18: error: call to 'abs' is ambiguous
    distance = ( abs(MPIs[i].width  - desiredWidth ) *
                 ^~~

This is because abs() is being called with unsigned arguments.  Fix
this by casting the arguments to the appropriate signed type.  This
mimics what happens with older libraries where the only version of
abs() was the one in <stdlib.h>, which is prototyped:
	int abs(int)
Correct functioning of this expression relies on how integer overflow
actually behaves, which is actually undefined in the C++ standard.

PR:		209077
Submitted by:	dim
2016-06-06 23:55:08 +00:00
..
files Fix type for abs() calls in net/opal 2016-06-06 23:55:08 +00:00
distinfo
Makefile
pkg-descr
pkg-plist