Bug 209612

Summary: games/trackballs: Fix build with libc++ 3.8.0
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: Ganael LAPLANCHE <martymac>
Status: Closed FIXED    
Severity: Affects Some People Flags: bugzilla: maintainer-feedback? (martymac)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 208158    
Attachments:
Description Flags
Remove hand-rolled abs functions from games/trackballs none

Description Dimitry Andric freebsd_committer freebsd_triage 2016-05-18 15:55:42 UTC
Created attachment 170451 [details]
Remove hand-rolled abs functions from games/trackballs

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

glHelp.cc:132:13: error: 'abs' is missing exception specification 'throw()'
inline Real abs(Real v) {return v>0.0?v:-v;}
            ^

This is because the program is attempting to define its own version of abs(), which conflicts with the one from <cmath>.  Fix it by removing the custom versions of abs().

[1] http://package18.nyi.freebsd.org/data/headamd64PR208158-default/2016-05-01_10h29m48s/logs/errors/trackballs-1.1.4_21.log
Comment 1 commit-hook freebsd_committer freebsd_triage 2016-05-20 20:28:42 UTC
A commit references this bug:

Author: martymac
Date: Fri May 20 20:28:30 UTC 2016
New revision: 415575
URL: https://svnweb.freebsd.org/changeset/ports/415575

Log:
  Fix build with libc++ 3.8.0 by removing conflicting re-definition of abs().

  PR:		209612
  Submitted by:	dim

Changes:
  head/games/trackballs/files/patch-src_glHelp.cc
  head/games/trackballs/files/patch-src_menuMode.cc
Comment 2 Ganael LAPLANCHE freebsd_committer freebsd_triage 2016-05-20 20:29:10 UTC
Committed, thanks!