[mythtv] Should llabs() be used instead of abs() for long long int?

Matthew Parris parrisimo at gmail.com
Wed Jul 4 14:50:37 UTC 2012


Thanks, Gary, for the reply.  Do you think the project would accept a patch
to change from abs to llabs?  Are there benefits of using abs that couldn't
be achieved with llabs?

On Wed, Jul 4, 2012 at 9:32 AM, Gary Buhrmaster
<gary.buhrmaster at gmail.com>wrote:

> 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
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-dev/attachments/20120704/f2799fc0/attachment.html>


More information about the mythtv-dev mailing list