Date: Sat, 23 Apr 2011 01:21:30 GMT From: Kalten <kalten@gmx.at> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/156588: games/KnightCap: warning: "INFINITY" redefined Message-ID: <201104230121.p3N1LUR2006212@red.freebsd.org> Resent-Message-ID: <201104230130.p3N1UAHx039166@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 156588 >Category: ports >Synopsis: games/KnightCap: warning: "INFINITY" redefined >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Apr 23 01:30:10 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Kalten >Release: 8.2-RELEASE >Organization: >Environment: FreeBSD freeHugin.Walhalla.Leben 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: When compiling games/KnightCap, there is a warning: ---SCHNIPP--- In file included from knightcap.c:7: knightcap.h:219:1: warning: "INFINITY" redefined In file included from includes.h:8, from knightcap.c:5: /usr/include/math.h:58:1: warning: this is the location of the previous definition ---schnapp--- Using /usr/include/math.h version seems to be not a good idea (too big). Undefining it before defining it helps. >How-To-Repeat: cd /usr/ports/games/KnightCap make >Fix: Patch attached with submission follows: --- files/patch-knightcap.h.orig 2011-04-23 03:17:32.000000000 +0200 +++ files/patch-knightcap.h 2011-04-23 03:17:43.000000000 +0200 @@ -17,3 +17,15 @@ static inline etype emin(etype i1, etype i2) { return i1 > i2? i2 : i1; +--- knightcap.h.orig 2011-04-23 03:13:09.000000000 +0200 ++++ knightcap.h 2011-04-23 03:16:53.000000000 +0200 +@@ -216,6 +216,9 @@ + #define BMAJOR_MASK (BPIECE_MASK & ~BMINOR_MASK) + #define MAJOR_MASK (WMAJOR_MASK | BMAJOR_MASK) + ++#ifdef INFINITY ++#undef INFINITY ++#endif + #define INFINITY (40.50*STATIC_PAWN_VALUE) + #define ILLEGAL (-40*STATIC_PAWN_VALUE) + #define WIN (-(ILLEGAL+1)) >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104230121.p3N1LUR2006212>