Bug 209372 - deskutils/easystroke: Fix build with libc++ 3.8.0
Summary: deskutils/easystroke: 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 mailing list
URL:
Keywords:
Depends on:
Blocks: 208158
  Show dependency treegraph
 
Reported: 2016-05-07 23:29 UTC by Dimitry Andric
Modified: 2016-05-09 19:02 UTC (History)
1 user (show)

See Also:
tobik: maintainer-feedback+


Attachments
Remove hand-rolled abs function from deskutils/easystroke (954 bytes, patch)
2016-05-07 23:29 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 2016-05-07 23:29:44 UTC
Created attachment 170106 [details]
Remove hand-rolled abs function from deskutils/easystroke

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

handler.cc:536:21: error: static declaration of 'abs' follows non-static declaration
static inline float abs(float x) { return x > 0 ? x : -x; }
                    ^
/usr/include/c++/v1/math.h:646:1: note: previous definition is here
abs(float __lcpp_x) _NOEXCEPT {return fabsf(__lcpp_x);}
^

This is because easystroke tries to roll its own version of abs(), which is already defined in math.h.  Fix this by removing the custom abs().

[1] http://package18.nyi.freebsd.org/data/headamd64PR208158-default/2016-05-01_10h29m48s/logs/errors/easystroke-0.6.0_2.log
Comment 1 commit-hook freebsd_committer 2016-05-08 12:06:53 UTC
A commit references this bug:

Author: dim
Date: Sun May  8 12:05:52 UTC 2016
New revision: 414807
URL: https://svnweb.freebsd.org/changeset/ports/414807

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

  handler.cc:536:21: error: static declaration of 'abs' follows non-static declaration
  static inline float abs(float x) { return x > 0 ? x : -x; }
                      ^
  /usr/include/c++/v1/math.h:646:1: note: previous definition is here
  abs(float __lcpp_x) _NOEXCEPT {return fabsf(__lcpp_x);}
  ^

  This is because easystroke tries to roll its own version of abs(), which
  is already defined in math.h.  Fix this by removing the custom abs().

  Approved by:	t@tobik.me (maintainer)
  PR:		209372
  MFH:		2016Q2

Changes:
  head/deskutils/easystroke/Makefile
  head/deskutils/easystroke/files/patch-handler.cc
Comment 2 commit-hook freebsd_committer 2016-05-09 19:02:47 UTC
A commit references this bug:

Author: dim
Date: Mon May  9 19:02:08 UTC 2016
New revision: 414882
URL: https://svnweb.freebsd.org/changeset/ports/414882

Log:
  MFH: r414807

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

  handler.cc:536:21: error: static declaration of 'abs' follows non-static declaration
  static inline float abs(float x) { return x > 0 ? x : -x; }
                      ^
  /usr/include/c++/v1/math.h:646:1: note: previous definition is here
  abs(float __lcpp_x) _NOEXCEPT {return fabsf(__lcpp_x);}
  ^

  This is because easystroke tries to roll its own version of abs(), which
  is already defined in math.h.  Fix this by removing the custom abs().

  Approved by:	portmgr (feld)
  PR:		209372

Changes:
_U  branches/2016Q2/
  branches/2016Q2/deskutils/easystroke/Makefile
  branches/2016Q2/deskutils/easystroke/files/patch-handler.cc