Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 02 Nov 2018 03:53:49 +0100
From:      Jan Beich <jbeich@FreeBSD.org>
To:        Mark Linimon <linimon@FreeBSD.org>
Cc:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   Re: svn commit: r483761 - in head/games/blokish: . files
Message-ID:  <d0ro-gpfm-wny@FreeBSD.org>
In-Reply-To: <201811020146.wA21kPiS042920@repo.freebsd.org> (Mark Linimon's message of "Fri, 2 Nov 2018 01:46:25 %2B0000 (UTC)")
References:  <201811020146.wA21kPiS042920@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Mark Linimon <linimon@FreeBSD.org> writes:

> Author: linimon
> Date: Fri Nov  2 01:46:24 2018
> New Revision: 483761
> URL: https://svnweb.freebsd.org/changeset/ports/483761
>
> Log:
>   This port needs USES=compiler:c++11-lang to build on GCC architectures.
>   
>   To build with GCC, it also needs algorithm and sys/limits.h includes.

Documenting the error is more important than paraphrasing the patch.

src/ai.cpp: In member function 'void AI::Reset(AI::AIOptions, BlokishID, std::vector<std::vector<BlokishPiece*>*>&)':
src/ai.cpp:50:15: error: 'INT_MIN' was not declared in this scope
   maxRating = INT_MIN;
               ^~~~~~~
src/ai.cpp:50:15: note: 'INT_MIN' is defined in header '<climits>'; did you forget to '#include <climits>'?
src/ai.cpp:26:1:
+#include <climits>

src/ai.cpp:50:15:
   maxRating = INT_MIN;
               ^~~~~~~
src/ai.cpp: In member function 'AI::StepOutcome AI::Step(BlokishBoard::Move&)':
src/ai.cpp:99:8: error: 'sort' is not a member of 'std'
   std::sort(possible_moves.begin(), possible_moves.end());
        ^~~~
src/ai.cpp:99:8: note: suggested alternative: 'cout'
   std::sort(possible_moves.begin(), possible_moves.end());
        ^~~~
        cout
src/ai.cpp: In member function 'void AI::Try()':
src/ai.cpp:122:28: error: 'INT_MAX' was not declared in this scope
       int maxCenterScore = INT_MAX;
                            ^~~~~~~
src/ai.cpp:122:28: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?

> ++#include <algorithm>
> ++#include <sys/limits.h>
> + #include "ai.h"

- <sys/limits.h> is not in POSIX unlike <limits.h>
- "ai.h" doesn't need the fix unlike ai.cpp, so move both below



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d0ro-gpfm-wny>