[mythtv] Should llabs() be used instead of abs() for long long int?
Gary Buhrmaster
gary.buhrmaster at gmail.com
Wed Jul 4 13:32:14 UTC 2012
On Wed, Jul 4, 2012 at 4:51 AM, Matthew Parris <parrisimo at gmail.com> wrote:
> I ran into a compile error on my QNAP NAS with Marvell 6282 1.6GHz (ARM) and
> kernel 2.6.33.2:
>
> transcode.cpp:541: error: call of overloaded 'abs(long long int)' is
> ambiguous
My recollection is that a long long abs was officially added to the
specification in c++11 (to go along with an int abs, and a long abs).
> When I edited the code and changed from abs to llabs, the compile was
> successful. Is this a particular for my system or would other systems
> benefit from this change?
Your (and when I say your, I mean any particular distro or cross
compiler) compiler/header/libraries will vary as to when they
supported a long long abs (various backports, various compiler
c++ standards defaults, etc.) I am not at all surprised that an ARM
port has some differences than the standard x86 variants.
Gary
More information about the mythtv-dev
mailing list