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

Daniel Thor Kristjansson danielk at cuymedia.net
Wed Jul 4 16:22:30 UTC 2012


On 07/04/2012 10:50 AM, Matthew Parris wrote:
> 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?

As long as you explain why it is needed in the ticket and include the
proper header in the file it will be accepted.

I think "long long" isn't a C++98 type, though it in practice
is supported by all C++ compilers since it is a C99 type and
a C++11 type. I guess compilers also adding abs(long long) to
their libraries is not universal and hence the error.

-- Daniel


More information about the mythtv-dev mailing list