Fix build under clang and gcc 4.8.
Submitted by: dim
This commit is contained in:
parent
b48180eb8b
commit
25eef83f62
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=357832
14 changed files with 158 additions and 1 deletions
|
@ -18,7 +18,6 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-src
|
|||
MAKE_JOBS_UNSAFE= yes
|
||||
USES= gmake tar:bzip2
|
||||
GNU_CONFIGURE= yes
|
||||
USE_GCC= 4.6
|
||||
MAKE_ARGS= SYSPRE=${ARCH}-unknown-freebsd \
|
||||
DESTDIR=${STAGEDIR}
|
||||
IS_INTERACTIVE= yes
|
||||
|
|
13
security/tripwire/files/patch-src-core-archive.cpp
Normal file
13
security/tripwire/files/patch-src-core-archive.cpp
Normal file
|
@ -0,0 +1,13 @@
|
|||
--- src/core/archive.cpp.orig 2011-11-21 17:06:56.000000000 +0100
|
||||
+++ src/core/archive.cpp 2014-06-15 01:45:01.000000000 +0200
|
||||
@@ -886,8 +886,8 @@ void cLockedTemporaryFileArchive::OpenRe
|
||||
catch( eFSServices& e)
|
||||
{
|
||||
TSTRING errStr = TSS_GetString( cCore, core::STR_BAD_TEMPDIRECTORY );
|
||||
- eArchiveOpen e(strTempFile, errStr);
|
||||
- throw e;
|
||||
+ eArchiveOpen e2(strTempFile, errStr);
|
||||
+ throw e2;
|
||||
}
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////
|
11
security/tripwire/files/patch-src-core-archive.h
Normal file
11
security/tripwire/files/patch-src-core-archive.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- src/core/archive.h.orig 2011-11-21 17:06:56.000000000 +0100
|
||||
+++ src/core/archive.h 2014-06-15 01:51:40.000000000 +0200
|
||||
@@ -85,6 +85,8 @@ TSS_EXCEPTION( eArchiveStringTooLong, eA
|
||||
class cArchive
|
||||
{
|
||||
public:
|
||||
+ virtual ~cArchive() {}
|
||||
+
|
||||
// convenience methods
|
||||
//
|
||||
// Specific Read functions throw(eArchive) if EOF is reached because
|
16
security/tripwire/files/patch-src-core-displayencoder.cpp
Normal file
16
security/tripwire/files/patch-src-core-displayencoder.cpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
--- src/core/displayencoder.cpp.orig 2011-11-21 17:06:56.000000000 +0100
|
||||
+++ src/core/displayencoder.cpp 2014-06-15 01:46:55.000000000 +0200
|
||||
@@ -825,11 +825,10 @@ bool cEncoder::OnlyOneCatagoryPerChar()
|
||||
{
|
||||
bool fFailedATest = false;
|
||||
|
||||
- ach[0] = ch;
|
||||
+ TSTRING ach(1, ch);
|
||||
for( sack_type::const_iterator atE = m_encodings.begin(); atE != m_encodings.end(); atE++ )
|
||||
{
|
||||
- TSTRING::const_iterator first(&ach[0]), last(&ach[1]);
|
||||
- if( (*atE)->NeedsEncoding( first, last ) )
|
||||
+ if( (*atE)->NeedsEncoding( ach.begin(), ach.end() ) )
|
||||
{
|
||||
if( fFailedATest )
|
||||
return false; // each char can only fail one test
|
19
security/tripwire/files/patch-src-core-fsservices.h
Normal file
19
security/tripwire/files/patch-src-core-fsservices.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
--- src/core/fsservices.h.orig 2011-11-21 17:06:56.000000000 +0100
|
||||
+++ src/core/fsservices.h 2014-06-15 01:54:49.000000000 +0200
|
||||
@@ -177,6 +177,7 @@ TSS_FILE_EXCEPTION( eFSServicesGeneric,
|
||||
class iFSServices
|
||||
{
|
||||
public:
|
||||
+ virtual ~iFSServices() {}
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// ENUMS
|
||||
@@ -219,7 +220,7 @@ class iFSServices
|
||||
// returns true if the file system is case sensitive
|
||||
virtual TCHAR GetPathSeperator() const = 0;
|
||||
// returns "/" for unix and "\\" for win32
|
||||
- virtual TCHAR* GetStandardBackupExtension() const = 0;
|
||||
+ virtual const TCHAR* GetStandardBackupExtension() const = 0;
|
||||
// returns normal string to append to backup files for this os.
|
||||
|
||||
////////////////////////////////////////
|
11
security/tripwire/files/patch-src-core-tw_signal.cpp
Normal file
11
security/tripwire/files/patch-src-core-tw_signal.cpp
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- src/core/tw_signal.cpp.orig 2011-11-21 17:06:56.000000000 +0100
|
||||
+++ src/core/tw_signal.cpp 2014-06-15 01:48:28.000000000 +0200
|
||||
@@ -79,7 +79,7 @@ void util_SignalHandler( int sig )
|
||||
#if IS_UNIX
|
||||
void tw_psignal(int sig, const TCHAR *str)
|
||||
{
|
||||
- TCHAR *siglist[NSIG] = {
|
||||
+ const TCHAR *siglist[NSIG] = {
|
||||
_T("Unknown Signal"),
|
||||
_T("Hangup"),
|
||||
_T("Interrupt"),
|
11
security/tripwire/files/patch-src-core-twlocale.h
Normal file
11
security/tripwire/files/patch-src-core-twlocale.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- src/core/twlocale.h.orig 2011-11-21 17:06:56.000000000 +0100
|
||||
+++ src/core/twlocale.h 2014-06-15 01:48:46.000000000 +0200
|
||||
@@ -110,7 +110,7 @@ namespace tss
|
||||
#if USE_STD_CPP_LOCALE_WORKAROUND
|
||||
return std::use_facet( l, pf );
|
||||
#else
|
||||
- return std::use_facet< FacetT >( l ); pf; // This is C++ standard
|
||||
+ return std::use_facet< FacetT >( l ); (void)pf; // This is C++ standard
|
||||
#endif
|
||||
}
|
||||
}
|
11
security/tripwire/files/patch-src-core-unixfsservices.cpp
Normal file
11
security/tripwire/files/patch-src-core-unixfsservices.cpp
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- src/core/unixfsservices.cpp.orig 2011-11-21 17:06:56.000000000 +0100
|
||||
+++ src/core/unixfsservices.cpp 2014-06-15 01:44:45.000000000 +0200
|
||||
@@ -792,7 +792,7 @@ bool cUnixFSServices::FullPath( TSTRING&
|
||||
// Returns normal string to append to backup files for this os.
|
||||
// (e.g. "~" for unix and ".bak" for winos)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
-TCHAR* cUnixFSServices::GetStandardBackupExtension() const
|
||||
+const TCHAR* cUnixFSServices::GetStandardBackupExtension() const
|
||||
{
|
||||
return _T(".bak");
|
||||
}
|
11
security/tripwire/files/patch-src-core-unixfsservices.h
Normal file
11
security/tripwire/files/patch-src-core-unixfsservices.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- src/core/unixfsservices.h.orig 2011-11-21 17:06:56.000000000 +0100
|
||||
+++ src/core/unixfsservices.h 2014-06-15 01:44:45.000000000 +0200
|
||||
@@ -99,7 +99,7 @@ class cUnixFSServices : public iFSServic
|
||||
////////////////////////////////////////
|
||||
virtual bool IsCaseSensitive() const;
|
||||
// returns true if the file system is case sensitive
|
||||
- virtual TCHAR* GetStandardBackupExtension() const;
|
||||
+ virtual const TCHAR* GetStandardBackupExtension() const;
|
||||
// returns normal string to append to backup files for this os.
|
||||
// (e.g. "~" for unix and ".bak" for winos)
|
||||
virtual TCHAR GetPathSeperator() const;
|
11
security/tripwire/files/patch-src-cryptlib-algebra.h
Normal file
11
security/tripwire/files/patch-src-cryptlib-algebra.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- src/cryptlib/algebra.h.orig 2011-11-21 17:06:56.000000000 +0100
|
||||
+++ src/cryptlib/algebra.h 2014-06-15 01:42:42.000000000 +0200
|
||||
@@ -273,7 +273,7 @@ template <class T> T AbstractEuclideanDo
|
||||
Element g[3]={b, a};
|
||||
unsigned int i0=0, i1=1, i2=2;
|
||||
|
||||
- while (!Equal(g[i1], this->Zero()))
|
||||
+ while (!this->Equal(g[i1], this->Zero()))
|
||||
{
|
||||
g[i2] = Mod(g[i0], g[i1]);
|
||||
unsigned int t = i0; i0 = i1; i1 = i2; i2 = t;
|
13
security/tripwire/files/patch-src-cryptlib-cryptlib.cpp
Normal file
13
security/tripwire/files/patch-src-cryptlib-cryptlib.cpp
Normal file
|
@ -0,0 +1,13 @@
|
|||
--- src/cryptlib/cryptlib.cpp.orig 2011-11-21 17:06:56.000000000 +0100
|
||||
+++ src/cryptlib/cryptlib.cpp 2014-06-15 01:42:35.000000000 +0200
|
||||
@@ -43,8 +43,8 @@ void StreamCipher::ProcessString(byte *o
|
||||
|
||||
void StreamCipher::ProcessString(byte *inoutString, unsigned int length)
|
||||
{
|
||||
- while(length--)
|
||||
- *inoutString++ = ProcessByte(*inoutString);
|
||||
+ for(;length--; inoutString++)
|
||||
+ *inoutString = ProcessByte(*inoutString);
|
||||
}
|
||||
|
||||
bool MessageAuthenticationCode::Verify(const byte *macIn)
|
10
security/tripwire/files/patch-src-fco-fcospec.cpp
Normal file
10
security/tripwire/files/patch-src-fco-fcospec.cpp
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- src/fco/fcospec.cpp.orig 2011-11-21 17:06:56.000000000 +0100
|
||||
+++ src/fco/fcospec.cpp 2014-06-15 01:50:46.000000000 +0200
|
||||
@@ -51,6 +51,7 @@
|
||||
class cDefaultSpecMask : public iFCOSpecMask
|
||||
{
|
||||
public:
|
||||
+ cDefaultSpecMask() {}
|
||||
virtual const TSTRING& GetName() const;
|
||||
virtual bool Accept(const iFCO* pFCO) const;
|
||||
private:
|
10
security/tripwire/files/patch-src-fco-parsergenreutil.h
Normal file
10
security/tripwire/files/patch-src-fco-parsergenreutil.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- src/fco/parsergenreutil.h.orig 2011-11-21 17:06:56.000000000 +0100
|
||||
+++ src/fco/parsergenreutil.h 2014-06-15 01:55:46.000000000 +0200
|
||||
@@ -53,6 +53,7 @@ class cFCOName;
|
||||
class iParserGenreUtil
|
||||
{
|
||||
public:
|
||||
+ virtual ~iParserGenreUtil() {}
|
||||
virtual bool MapStringToProperty( const TSTRING& str, int& propIndex ) const = 0;
|
||||
// maps the given string to an index into a property vector for the genre
|
||||
virtual void AddSubTypeProps( cFCOPropVector& v ) const = 0;
|
11
security/tripwire/files/patch-src-tripwire-mailmessage.cpp
Normal file
11
security/tripwire/files/patch-src-tripwire-mailmessage.cpp
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- src/tripwire/mailmessage.cpp.orig 2011-11-21 17:06:56.000000000 +0100
|
||||
+++ src/tripwire/mailmessage.cpp 2014-06-15 01:56:20.000000000 +0200
|
||||
@@ -258,7 +258,7 @@ bool cMailMessageUtil::ReadDate( TSTRING
|
||||
}
|
||||
|
||||
|
||||
-static char* util_Get_IANA_CharSet()
|
||||
+static const char* util_Get_IANA_CharSet()
|
||||
{
|
||||
const char* pCP = setlocale( LC_CTYPE, NULL );
|
||||
|
Loading…
Reference in a new issue