Bug 208843 - graphics/cuneiform: Fix build with libc++ 3.8.0
Summary: graphics/cuneiform: Fix build with libc++ 3.8.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: 208158
  Show dependency treegraph
 
Reported: 2016-04-16 20:38 UTC by Dimitry Andric
Modified: 2016-04-18 19:03 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (samm)


Attachments
Fix argument type for abs() in graphics/cuneiform (1.62 KB, patch)
2016-04-16 20:38 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2016-04-16 20:38:26 UTC
Created attachment 169380 [details]
Fix argument type for abs() in graphics/cuneiform

During the exp-run in bug 208158, it was found that graphics/cuneiform gives errors with libc++ 3.8.0 [1]:

/wrkdirs/usr/ports/graphics/cuneiform/work/cuneiform-linux-1.1.0/cuneiform_src/Kern/rimage/sources/main/cricontrol.cpp:597:32: error: call to 'abs' is ambiguous
        wNewHeight = (mbMarginsFlag ? abs(mrMargins.rmBottomMarg - mrMargins.rmTopMarg) : mpSourceDIB->GetLinesNumber());
                                      ^~~

This is because abs() is being called an unsigned argument.  Fix this by casting the argument to the appropriate signed type.

[1] http://package18.nyi.freebsd.org/data/headamd64PR208158-default/2016-03-22_18h30m05s/logs/errors/cuneiform-1.1.0_4.log
Comment 1 Oleksii Samorukov freebsd_committer freebsd_triage 2016-04-17 07:13:46 UTC
Thank you for the patch, approved
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-04-18 19:03:11 UTC
A commit references this bug:

Author: dim
Date: Mon Apr 18 19:02:56 UTC 2016
New revision: 413606
URL: https://svnweb.freebsd.org/changeset/ports/413606

Log:
  MFH: r413510

  During the exp-run in bug 208158, it was found that graphics/cuneiform
  gives errors with libc++ 3.8.0:

  cuneiform_src/Kern/rimage/sources/main/cricontrol.cpp:597:32: error: call to 'abs' is ambiguous
          wNewHeight = (mbMarginsFlag ? abs(mrMargins.rmBottomMarg - mrMargins.rmTopMarg) : mpSourceDIB->GetLinesNumber());
                                        ^~~

  This is because abs() is being called an unsigned argument.  Fix this by
  casting the argument to the appropriate signed type.

  Approved by:	portmgr (junovitch)
  PR:		208843

Changes:
_U  branches/2016Q2/
  branches/2016Q2/graphics/cuneiform/files/