cvs commit: patches/tripwire tripwire-2.3.1-2-gcc33-1.patch

jim at linuxfromscratch.org jim at linuxfromscratch.org
Tue Oct 7 15:09:14 PDT 2003


jim         03/10/07 16:09:14

  Added:       tripwire tripwire-2.3.1-2-gcc33-1.patch
  Log:
  Added: tripwire-2.3.1-2-gcc33-1.patch
  
  Revision  Changes    Path
  1.1                  patches/tripwire/tripwire-2.3.1-2-gcc33-1.patch
  
  Index: tripwire-2.3.1-2-gcc33-1.patch
  ===================================================================
  Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
  Date: 2003-10-06
  Initial Package Version: 2.3.1-2
  Origin: Mandrake CVS
  Description: Fixes Compile Issues with GCC 3.3
  
   
  diff -Naur tripwire-2.3.1-2.orig/src/Makefile tripwire-2.3.1-2/src/Makefile
  --- tripwire-2.3.1-2.orig/src/Makefile	2001-03-04 04:03:52.000000000 +0000
  +++ tripwire-2.3.1-2/src/Makefile	2003-10-07 04:44:19.000000000 +0000
  @@ -93,7 +93,7 @@
   # file to Makefile.linux_intel or something similar.
   
   MAKEFILE = Makefile
  -GMAKE = gmake
  +GMAKE = $(MAKE)
   
   #-----------------------------------------------------------------------------
   # STLPORT
  @@ -145,7 +145,7 @@
   
   # It's handy for clean, .PHONY, etc. to have one big list
   #
  -targets  = $(debugbinaries) $(debuglibraries) $(releasebinaries) $(releaselibraries) STLport_d STLport_r
  +targets  = $(debugbinaries) $(debuglibraries) $(releasebinaries) $(releaselibraries) 
   
   
   # Let make know these aren't real file names...
  diff -Naur tripwire-2.3.1-2.orig/src/core/charutil.cpp tripwire-2.3.1-2/src/core/charutil.cpp
  --- tripwire-2.3.1-2.orig/src/core/charutil.cpp	2000-10-28 19:22:55.000000000 +0000
  +++ tripwire-2.3.1-2/src/core/charutil.cpp	2003-10-07 04:44:19.000000000 +0000
  @@ -105,7 +105,7 @@
       }
   
       first = cur;
  -    last = tss::strinc( cur );
  +    last = TSTRING::const_iterator(tss::strinc( cur.base() ));
       return true;
   }
   
  diff -Naur tripwire-2.3.1-2.orig/src/core/debug.h tripwire-2.3.1-2/src/core/debug.h
  --- tripwire-2.3.1-2.orig/src/core/debug.h	2000-10-28 01:15:19.000000000 +0000
  +++ tripwire-2.3.1-2/src/core/debug.h	2003-10-07 04:43:10.000000000 +0000
  @@ -43,7 +43,7 @@
   
   
   #include <iostream>
  -#include <varargs.h>
  +#include <stdarg.h>
   #include "types.h"
   
   //
  diff -Naur tripwire-2.3.1-2.orig/src/core/displayencoder.cpp tripwire-2.3.1-2/src/core/displayencoder.cpp
  --- tripwire-2.3.1-2.orig/src/core/displayencoder.cpp	2000-10-28 01:15:20.000000000 +0000
  +++ tripwire-2.3.1-2/src/core/displayencoder.cpp	2003-10-07 04:44:19.000000000 +0000
  @@ -828,7 +828,8 @@
               ach[0] = ch;
               for( sack_type::const_iterator atE = m_encodings.begin(); atE != m_encodings.end(); atE++ )
               {
  -                if( (*atE)->NeedsEncoding( &ach[0], &ach[1] ) )
  +                if( (*atE)->NeedsEncoding( std::string::const_iterator(&ach[0]),
  +					   std::string::const_iterator(&ach[1]) ) )
                   {
                       if( fFailedATest )
                           return false; // each char can only fail one test
  diff -Naur tripwire-2.3.1-2.orig/src/core/displayutil.cpp tripwire-2.3.1-2/src/core/displayutil.cpp
  --- tripwire-2.3.1-2.orig/src/core/displayutil.cpp	2000-10-28 19:22:55.000000000 +0000
  +++ tripwire-2.3.1-2/src/core/displayutil.cpp	2003-10-07 04:44:19.000000000 +0000
  @@ -45,7 +45,7 @@
       TOSTRINGSTREAM sstr;
       TSTRING strT;
       bool fFirstLine = true;
  -    for( TSTRING::const_iterator i = str.begin(); i != str.end(); i = tss::strinc( i ) )
  +    for( TSTRING::const_iterator i = str.begin(); i != str.end(); i = TSTRING::const_iterator(tss::strinc( i.base() )) )
       {
           // return found -- add line to output string
           if( _T('\n') == *i )
  @@ -74,7 +74,7 @@
           else
           {
               // add char to string   
  -            strT.append( i, (TSTRING::const_iterator)tss::strinc( i ) );
  +            strT.append( i, TSTRING::const_iterator(tss::strinc( i.base() )) );
           }
       }    
                   
  diff -Naur tripwire-2.3.1-2.orig/src/core/stringutil.h tripwire-2.3.1-2/src/core/stringutil.h
  --- tripwire-2.3.1-2.orig/src/core/stringutil.h	2001-02-04 05:38:27.000000000 +0000
  +++ tripwire-2.3.1-2/src/core/stringutil.h	2003-10-07 04:44:19.000000000 +0000
  @@ -64,7 +64,7 @@
       Convert( std::string& lhs, const std::string& rhs )
       {
         lhs = rhs;
  -      return lhs.c_str();
  +      return std::string::const_iterator(lhs.c_str());
       }
   
     /// Specialize Everything Else
  diff -Naur tripwire-2.3.1-2.orig/src/cryptlib/i686-pc-linux.mak tripwire-2.3.1-2/src/cryptlib/i686-pc-linux.mak
  --- tripwire-2.3.1-2.orig/src/cryptlib/i686-pc-linux.mak	2000-10-28 00:26:21.000000000 +0000
  +++ tripwire-2.3.1-2/src/cryptlib/i686-pc-linux.mak	2003-10-07 04:44:19.000000000 +0000
  @@ -71,12 +71,12 @@
   # Recusively call make defining the appropriate $(D_FLAGS) var
   
   debug:
  -	gmake -f $(MAKEFILE) cryptlib_d.a "D_FLAGS=$(DEBUG_FLAGS)" "LDFLAGS=DEBUG_LDFLAGS"
  -#	gmake -f $(MAKEFILE) cryptest_d "D_FLAGS=$(DEBUG_FLAGS)" "LDFLAGS=DEBUG_LDFLAGS"
  +	$(MAKE) -f $(MAKEFILE) cryptlib_d.a "D_FLAGS=$(DEBUG_FLAGS)" "LDFLAGS=DEBUG_LDFLAGS"
  +#	$(MAKE) -f $(MAKEFILE) cryptest_d "D_FLAGS=$(DEBUG_FLAGS)" "LDFLAGS=DEBUG_LDFLAGS"
   
   release: 
  -	gmake -f $(MAKEFILE) cryptlib.a "D_FLAGS=$(NDEBUG_FLAGS)" "LDFLAGS=NDEBUG_LDFLAGS"
  -#	gmake -f $(MAKEFILE) cryptest "D_FLAGS=$(NDEBUG_FLAGS)" "LDFLAGS=NDEBUG_LDFLAGS"
  +	$(MAKE) -f $(MAKEFILE) cryptlib.a "D_FLAGS=$(NDEBUG_FLAGS)" "LDFLAGS=NDEBUG_LDFLAGS"
  +#	$(MAKE) -f $(MAKEFILE) cryptest "D_FLAGS=$(NDEBUG_FLAGS)" "LDFLAGS=NDEBUG_LDFLAGS"
   
    
   ###############################################################################
  diff -Naur tripwire-2.3.1-2.orig/src/cryptlib/misc.h tripwire-2.3.1-2/src/cryptlib/misc.h
  --- tripwire-2.3.1-2.orig/src/cryptlib/misc.h	2000-10-28 00:26:21.000000000 +0000
  +++ tripwire-2.3.1-2/src/cryptlib/misc.h	2003-10-07 04:44:19.000000000 +0000
  @@ -150,7 +150,7 @@
   	operator T *()
   		{return ptr;}
   
  -#if !defined(_MSC_VER) && !defined(_KCC)
  +#if !defined(_MSC_VER) && !defined(_KCC) && 0
       T *operator +(unsigned int offset)
   		{return ptr+offset;}
   	const T *operator +(unsigned int offset) const
  diff -Naur tripwire-2.3.1-2.orig/src/db/hierdatabase.cpp tripwire-2.3.1-2/src/db/hierdatabase.cpp
  --- tripwire-2.3.1-2.orig/src/db/hierdatabase.cpp	2001-02-25 05:41:13.000000000 +0000
  +++ tripwire-2.3.1-2/src/db/hierdatabase.cpp	2003-10-07 04:44:19.000000000 +0000
  @@ -255,7 +255,8 @@
   	}
   	else
   	{
  -		int offset	= rhs.mIter - rhs.mEntries.begin();
  +	        int offset;
  +		offset = -(rhs.mEntries.begin() - rhs.mIter);
   		mIter		= mEntries.begin() + offset;
   	}
   
  diff -Naur tripwire-2.3.1-2.orig/src/fco/fconame.cpp tripwire-2.3.1-2/src/fco/fconame.cpp
  --- tripwire-2.3.1-2.orig/src/fco/fconame.cpp	2000-10-28 00:25:41.000000000 +0000
  +++ tripwire-2.3.1-2/src/fco/fconame.cpp	2003-10-07 04:44:19.000000000 +0000
  @@ -269,7 +269,7 @@
   	
       mpPathName->ClearList();
   	
  -	TSTRING::const_iterator at  = ( pszin + 0 );
  +	TSTRING::const_iterator at  = TSTRING::const_iterator( pszin + 0 );
       TSTRING::const_iterator end = at;
       while ( *end ) ++end;               // NOTE: Find end
   
  @@ -277,9 +277,9 @@
   	while ( at < end )
   	{
   		while ( !(*at == mDelimiter) && at < end )
  -            at = tss::strinc( at );
  +            at = TSTRING::const_iterator(tss::strinc( at.base() ));
   
  -        if ( at == beg && tss::strinc(at) >= end && at != pszin )
  +        if ( at == beg && TSTRING::const_iterator(tss::strinc(at.base())) >= end && at.base() != pszin )
               break;
   
   		cFCONameTblNode* pNode = 
  @@ -287,7 +287,7 @@
   
           mpPathName->mNames.push_back( pNode );
   		
  -        beg = ( at = tss::strinc( at ) );
  +        beg = ( at = TSTRING::const_iterator(tss::strinc( at.base() )) );
   	}
   }
   
  diff -Naur tripwire-2.3.1-2.orig/src/make_include/i686-pc-linux.inc tripwire-2.3.1-2/src/make_include/i686-pc-linux.inc
  --- tripwire-2.3.1-2.orig/src/make_include/i686-pc-linux.inc	2000-10-28 00:26:25.000000000 +0000
  +++ tripwire-2.3.1-2/src/make_include/i686-pc-linux.inc	2003-10-07 04:44:19.000000000 +0000
  @@ -19,11 +19,11 @@
   # General variable definitions
   #
   
  -GMAKE = /usr/bin/gmake
  +GMAKE = $(MAKE)
   CC = g++
   CXX = $(CC)
   AR = ar
  -SYSDEF=-D_REDHAT -D_IX86 -D_GCC
  +SYSDEF=-D_REDHAT -D_IX86 -D_GCC $(RPM_OPT_FLAGS)
   STLPORT=../STLport-4.0
   
   #
  @@ -33,7 +33,7 @@
   CXXFLAGS_R = -I.. -I$(STLPORT)/stlport -ftemplate-depth-32
   DEFINES_R = -DNDEBUG $(SYSDEF)
   LINKFLAGS_R = -static
  -LIBRARYFLAGS_R = -L../../lib/$(SYSPRE)_r -lm -lstlport_gcc
  +LIBRARYFLAGS_R = -L../../lib/$(SYSPRE)_r -lm
   ARFLAGS_R = crv
   
   #
  diff -Naur tripwire-2.3.1-2.orig/src/siggen/siggenmain.cpp tripwire-2.3.1-2/src/siggen/siggenmain.cpp
  --- tripwire-2.3.1-2.orig/src/siggen/siggenmain.cpp	2000-10-28 00:26:25.000000000 +0000
  +++ tripwire-2.3.1-2/src/siggen/siggenmain.cpp	2003-10-07 04:44:19.000000000 +0000
  @@ -118,11 +118,7 @@
           // set unexpected and terminate handlers
           // Note: we do this before Init() in case it attempts to call these handlers
           // TODO: move this into the Init() routine
  -#if IS_GCC
  -            #define EXCEPTION_NAMESPACE 
  -        #else
  -            #define EXCEPTION_NAMESPACE std::
  -        #endif
  +#define EXCEPTION_NAMESPACE std::
           EXCEPTION_NAMESPACE set_terminate(tw_terminate_handler);
           EXCEPTION_NAMESPACE set_unexpected(tw_unexpected_handler);
   
  diff -Naur tripwire-2.3.1-2.orig/src/tripwire/mailmessage.cpp tripwire-2.3.1-2/src/tripwire/mailmessage.cpp
  --- tripwire-2.3.1-2.orig/src/tripwire/mailmessage.cpp	2000-10-28 00:26:18.000000000 +0000
  +++ tripwire-2.3.1-2/src/tripwire/mailmessage.cpp	2003-10-07 04:44:19.000000000 +0000
  @@ -509,9 +509,9 @@
       std::string::size_type stringSize = 0;
       std::string::const_iterator at;
       std::string::difference_type charSize;
  -    for( at = sIn.begin(), charSize = ( tss::strinc( at ) - at );
  +    for( at = sIn.begin(), charSize = ( std::string::const_iterator(tss::strinc( at.base() )) - at );
            at != sIn.end();
  -         at += charSize, charSize = ( tss::strinc( at ) - at ) )
  +         at += charSize, charSize = ( std::string::const_iterator(tss::strinc( at.base() )) - at ) )
       {
           ASSERT( charSize > 0 );
   
  diff -Naur tripwire-2.3.1-2.orig/src/tripwire/tripwiremain.cpp tripwire-2.3.1-2/src/tripwire/tripwiremain.cpp
  --- tripwire-2.3.1-2.orig/src/tripwire/tripwiremain.cpp	2001-02-24 19:02:12.000000000 +0000
  +++ tripwire-2.3.1-2/src/tripwire/tripwiremain.cpp	2003-10-07 04:44:19.000000000 +0000
  @@ -122,11 +122,7 @@
           // set unexpected and terminate handlers
           // Note: we do this before Init() in case it attempts to call these handlers
           // TODO: move this into the Init() routine
  -#if IS_GCC
  -            #define EXCEPTION_NAMESPACE 
  -        #else
  -            #define EXCEPTION_NAMESPACE std::
  -        #endif
  +#define EXCEPTION_NAMESPACE std::
           EXCEPTION_NAMESPACE set_terminate(tw_terminate_handler);
           EXCEPTION_NAMESPACE set_unexpected(tw_unexpected_handler);
   
  diff -Naur tripwire-2.3.1-2.orig/src/twadmin/twadminmain.cpp tripwire-2.3.1-2/src/twadmin/twadminmain.cpp
  --- tripwire-2.3.1-2.orig/src/twadmin/twadminmain.cpp	2000-10-28 00:26:22.000000000 +0000
  +++ tripwire-2.3.1-2/src/twadmin/twadminmain.cpp	2003-10-07 04:44:19.000000000 +0000
  @@ -86,11 +86,7 @@
           // set unexpected and terminate handlers
           // Note: we do this before Init() in case it attempts to call these handlers
           // TODO: move this into the Init() routine
  -#if IS_GCC
  -            #define EXCEPTION_NAMESPACE 
  -        #else
  -            #define EXCEPTION_NAMESPACE std::
  -        #endif
  +#define EXCEPTION_NAMESPACE std::
           EXCEPTION_NAMESPACE set_terminate(tw_terminate_handler);
           EXCEPTION_NAMESPACE set_unexpected(tw_unexpected_handler);
   
  diff -Naur tripwire-2.3.1-2.orig/src/twparser/policyparser.cpp tripwire-2.3.1-2/src/twparser/policyparser.cpp
  --- tripwire-2.3.1-2.orig/src/twparser/policyparser.cpp	2001-02-24 19:02:12.000000000 +0000
  +++ tripwire-2.3.1-2/src/twparser/policyparser.cpp	2003-10-07 04:44:19.000000000 +0000
  @@ -228,7 +228,7 @@
            // at gets incremented when used....
          )
       {
  -        int nBytes = ::mblen( (char*)at, MB_CUR_MAX );
  +        int nBytes = ::mblen( at.base(), MB_CUR_MAX );
           if ( nBytes == -1 )
           {
               d.TraceDebug( "Unrecognized Character: %c\n", *at );
  diff -Naur tripwire-2.3.1-2.orig/src/twprint/twprintmain.cpp tripwire-2.3.1-2/src/twprint/twprintmain.cpp
  --- tripwire-2.3.1-2.orig/src/twprint/twprintmain.cpp	2000-10-28 00:26:19.000000000 +0000
  +++ tripwire-2.3.1-2/src/twprint/twprintmain.cpp	2003-10-07 04:44:19.000000000 +0000
  @@ -98,8 +98,8 @@
   #if IS_GCC
             #define EXCEPTION_NAMESPACE 
           #else
  -          #define EXCEPTION_NAMESPACE std::
           #endif
  +#define EXCEPTION_NAMESPACE std::
   	  EXCEPTION_NAMESPACE set_terminate(tw_terminate_handler);
   	  EXCEPTION_NAMESPACE set_unexpected(tw_unexpected_handler);
   
  
  
  



More information about the patches mailing list