Deal with broken name lookup in GCC.

This commit is contained in:
joerg 2012-06-15 18:53:30 +00:00
parent 72972c3e32
commit 66049a300a
3 changed files with 43 additions and 1 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.12 2011/07/09 21:15:48 asau Exp $
$NetBSD: distinfo,v 1.13 2012/06/15 18:53:30 joerg Exp $
SHA1 (yap-6.2.1.tar.gz) = e6076a501aaee9e8a6a484a34308c32ca1193a95
RMD160 (yap-6.2.1.tar.gz) = 702a72a1e02e1a8e107f2b0888ae7c26132ae417
@ -9,3 +9,5 @@ SHA1 (patch-ae) = cf4a79ccd0c34e42ca3d8a108619a9974288cde6
SHA1 (patch-af) = a042950ee63fac0f5863c3caa3f7c07227c46b4b
SHA1 (patch-ah) = 572e29729d97d5e9942a3d2c22e121d4e756d648
SHA1 (patch-aj) = 61a53b4ef921270544edc79ddcb0f816824fd3ce
SHA1 (patch-packages_swi-minisat2_C_Solver.C) = 1f4ec1fa258d61906d59d8a236d40653d16f0cd3
SHA1 (patch-packages_swi-minisat2_C_SolverTypes.h) = 37b7ba75614340d09c9d82d5f29e66cbdfbded94

View file

@ -0,0 +1,21 @@
$NetBSD: patch-packages_swi-minisat2_C_Solver.C,v 1.1 2012/06/15 18:53:30 joerg Exp $
See SolverType.h.
--- packages/swi-minisat2/C/Solver.C.orig 2012-06-15 18:36:17.000000000 +0000
+++ packages/swi-minisat2/C/Solver.C
@@ -26,6 +26,14 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR
//=================================================================================================
// Constructor/Destructor:
+template<class V> Clause* Clause_new(const V& ps, bool learnt)
+{
+ assert(sizeof(Lit) == sizeof(uint32_t));
+ assert(sizeof(float) == sizeof(uint32_t));
+ void* mem = malloc(sizeof(Clause) + sizeof(uint32_t)*(ps.size()));
+ return new (mem) Clause(ps, learnt);
+}
+
Solver::Solver() :

View file

@ -0,0 +1,19 @@
$NetBSD: patch-packages_swi-minisat2_C_SolverTypes.h,v 1.1 2012/06/15 18:53:30 joerg Exp $
Templated friend must be declared outside class.
--- packages/swi-minisat2/C/SolverTypes.h.orig 2011-06-11 15:38:37.000000000 +0000
+++ packages/swi-minisat2/C/SolverTypes.h
@@ -119,11 +119,7 @@ public:
// -- use this function instead:
template<class V>
- friend Clause* Clause_new(const V& ps, bool learnt = false) {
- assert(sizeof(Lit) == sizeof(uint32_t));
- assert(sizeof(float) == sizeof(uint32_t));
- void* mem = malloc(sizeof(Clause) + sizeof(uint32_t)*(ps.size()));
- return new (mem) Clause(ps, learnt); }
+ friend Clause* Clause_new(const V& ps, bool learnt = false);
int size () const { return size_etc >> 3; }
void shrink (int i) { assert(i <= size()); size_etc = (((size_etc >> 3) - i) << 3) | (size_etc & 7); }