devel/pire: add <unistd.h>, fix -fpermissive for modern compilers

Approved by:	portmgr (bapt, implicit)
This commit is contained in:
John Marino 2013-10-03 00:15:57 +00:00
parent 23082b3b3c
commit 8f0e69ca8b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=329131
4 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,11 @@
--- pire/glue.cpp.orig 2010-11-16 23:42:09.000000000 +0000
+++ pire/glue.cpp
@@ -60,7 +60,7 @@ public:
size_t finalTableSize = 0;
for (typename yvector<State>::const_iterator i = states.begin(), ie = states.end(); i != ie; ++i)
finalTableSize += RangeLen(Lhs().AcceptedRegexps(i->first)) + RangeLen(Rhs().AcceptedRegexps(i->second));
- SetSc(new Scanner);
+ this->SetSc(new Scanner);
Sc().Init(states.size(), Letters(), finalTableSize, size_t(0), Lhs().RegexpsCount() + Rhs().RegexpsCount());
for (size_t state = 0; state != states.size(); ++state) {

View file

@ -0,0 +1,20 @@
--- pire/stub/saveload.h.orig 2010-11-16 23:42:09.000000000 +0000
+++ pire/stub/saveload.h
@@ -52,7 +52,7 @@ namespace Pire {
if (!Traits::eq_int_type(ret, Traits::eof())) {
m_ch = (Char) ret;
m_read += sizeof(Char);
- setg(&m_ch, &m_ch, &m_ch+1);
+ this->setg(&m_ch, &m_ch, &m_ch+1);
}
return ret;
}
@@ -117,7 +117,7 @@ namespace Pire {
BasicAlignedOutput(std::basic_ostream<Char, Traits>* backend)
: m_streambuf(backend->rdbuf())
{
- rdbuf(&m_streambuf);
+ this->rdbuf(&m_streambuf);
}
void Align(size_t divisor = sizeof(void*))

View file

@ -0,0 +1,10 @@
--- samples/pigrep/pigrep.cpp.orig 2010-11-16 23:42:09.000000000 +0000
+++ samples/pigrep/pigrep.cpp
@@ -29,6 +29,7 @@
#include <string.h>
#include <stdlib.h>
+#include <unistd.h>
#include <string>
#include <stdexcept>
#include <iostream>

View file

@ -0,0 +1,10 @@
--- tools/bench/bench.cpp.orig 2010-11-16 23:42:09.000000000 +0000
+++ tools/bench/bench.cpp
@@ -23,6 +23,7 @@
#include <fcntl.h>
#include <errno.h>
+#include <unistd.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <sys/time.h>