Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 147515 Details for
Bug 215156
media-video/mjpegtools-1.9.0_rc3 gcc 4.3 patches and patched ebuild
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
mjpegtools-1.9.0-gcc4.3.patch
mjpegtools-1.9.0-gcc4.3.patch (text/plain), 9.11 KB, created by
impulze
on 2008-03-28 09:38:33 UTC
(
hide
)
Description:
mjpegtools-1.9.0-gcc4.3.patch
Filename:
MIME Type:
Creator:
impulze
Created:
2008-03-28 09:38:33 UTC
Size:
9.11 KB
patch
obsolete
>diff -Naur mjpegtools-1.9.0rc3.orig/mpeg2enc/encodertypes.h mjpegtools-1.9.0rc3/mpeg2enc/encodertypes.h >--- mjpegtools-1.9.0rc3.orig/mpeg2enc/encodertypes.h 2006-07-01 06:46:12.000000000 +0200 >+++ mjpegtools-1.9.0rc3/mpeg2enc/encodertypes.h 2008-03-28 10:27:25.000000000 +0100 >@@ -25,6 +25,8 @@ > */ > > >+#include <cstdlib> // std::abs >+ > class Parity > { > public: >@@ -70,7 +72,7 @@ > inline const int &operator [] (int i) const { return val[i]; } > inline int CodingPenaltyForSAD() const > { >- return (abs(val[Dim::X]) + abs(val[Dim::Y]))<<3; >+ return (std::abs(val[Dim::X]) + std::abs(val[Dim::Y]))<<3; > } > > inline void Zero() { val[Dim::Y] = val[Dim::X] = 0; } >diff -Naur mjpegtools-1.9.0rc3.orig/mpeg2enc/macroblock.cc mjpegtools-1.9.0rc3/mpeg2enc/macroblock.cc >--- mjpegtools-1.9.0rc3.orig/mpeg2enc/macroblock.cc 2006-08-25 16:37:37.000000000 +0200 >+++ mjpegtools-1.9.0rc3/mpeg2enc/macroblock.cc 2008-03-28 10:29:33.000000000 +0100 >@@ -21,6 +21,7 @@ > > #include <stdio.h> > #include <cassert> >+#include <climits> // INT_MAX > > #include "macroblock.hh" > #include "mpeg2syntaxcodes.h" >diff -Naur mjpegtools-1.9.0rc3.orig/mpeg2enc/picturereader.cc mjpegtools-1.9.0rc3/mpeg2enc/picturereader.cc >--- mjpegtools-1.9.0rc3.orig/mpeg2enc/picturereader.cc 2007-02-26 18:05:48.000000000 +0100 >+++ mjpegtools-1.9.0rc3/mpeg2enc/picturereader.cc 2008-03-28 10:28:31.000000000 +0100 >@@ -20,6 +20,7 @@ > */ > > >+#include <climits> // INT_MAX > #include "picturereader.hh" > #include "mpeg2encoder.hh" > #include "imageplanes.hh" >diff -Naur mjpegtools-1.9.0rc3.orig/mplex/inputstrm.cpp mjpegtools-1.9.0rc3/mplex/inputstrm.cpp >--- mjpegtools-1.9.0rc3.orig/mplex/inputstrm.cpp 2006-08-25 16:37:37.000000000 +0200 >+++ mjpegtools-1.9.0rc3/mplex/inputstrm.cpp 2008-03-28 10:29:22.000000000 +0100 >@@ -23,6 +23,7 @@ > > #include <config.h> > #include <assert.h> >+#include <climits> // INT_MAX > > #include "mjpeg_types.h" > #include "inputstrm.hpp" >diff -Naur mjpegtools-1.9.0rc3.orig/mplex/main.cpp mjpegtools-1.9.0rc3/mplex/main.cpp >--- mjpegtools-1.9.0rc3.orig/mplex/main.cpp 2006-07-01 06:46:13.000000000 +0200 >+++ mjpegtools-1.9.0rc3/mplex/main.cpp 2008-03-28 10:31:31.000000000 +0100 >@@ -48,6 +48,7 @@ > #include "outputstrm.hpp" > #include "multiplexor.hpp" > >+#include <cstring> // std::strncpy,strlen,strcpy,strcmp,strncmp > > using std::auto_ptr; > >@@ -95,7 +96,7 @@ > > FileOutputStream::FileOutputStream( const char *name_pat ) > { >- strncpy( filename_pat, name_pat, MAXPATHLEN ); >+ std::strncpy( filename_pat, name_pat, MAXPATHLEN ); > snprintf( cur_filename, MAXPATHLEN, filename_pat, segment_num ); > } > >@@ -126,13 +127,13 @@ > void > FileOutputStream::NextSegment( ) > { >- auto_ptr<char> prev_filename_buf( new char[strlen(cur_filename)+1] ); >+ auto_ptr<char> prev_filename_buf( new char[std::strlen(cur_filename)+1] ); > char *prev_filename = prev_filename_buf.get(); > fclose(strm); > ++segment_num; >- strcpy( prev_filename, cur_filename ); >+ std::strcpy( prev_filename, cur_filename ); > snprintf( cur_filename, MAXPATHLEN, filename_pat, segment_num ); >- if( strcmp( prev_filename, cur_filename ) == 0 ) >+ if( std::strcmp( prev_filename, cur_filename ) == 0 ) > { > mjpeg_error_exit1( > "Need to split output but there appears to be no %%d in the filename pattern %s", filename_pat ); >@@ -200,7 +201,7 @@ > { > mjpeg_error_exit1( "Unable to open file %s for reading.", bs_filename); > } >- filename = strcpy( new char[strlen(bs_filename)+1], bs_filename ); >+ filename = std::strcpy( new char[std::strlen(bs_filename)+1], bs_filename ); > streamname = filename; > > SetBufSize(buf_size); >@@ -541,7 +542,7 @@ > while( flag_table[flag].longname != 0 ) > { > if( (len == 1 && *startptr == flag_table[flag].shortname ) || >- strncmp( startptr, flag_table[flag].longname, len ) == 0 ) >+ std::strncmp( startptr, flag_table[flag].longname, len ) == 0 ) > { > *flag_table[flag].flag = true; > break; >@@ -604,9 +605,9 @@ > f=strtod(optarg,&e); > if( *e ) { > while(isspace(*e)) e++; >- if(!strcmp(e,"ms")) persecond=1000.0; >- else if(!strcmp(e,"s")) persecond=1.0; >- else if(!strcmp(e,"mpt")) persecond=90000.0; >+ if(!std::strcmp(e,"ms")) persecond=1000.0; >+ else if(!std::strcmp(e,"s")) persecond=1.0; >+ else if(!std::strcmp(e,"mpt")) persecond=90000.0; > else > return false; > } >diff -Naur mjpegtools-1.9.0rc3.orig/mplex/multiplexor.cpp mjpegtools-1.9.0rc3/mplex/multiplexor.cpp >--- mjpegtools-1.9.0rc3.orig/mplex/multiplexor.cpp 2007-04-02 17:43:34.000000000 +0200 >+++ mjpegtools-1.9.0rc3/mplex/multiplexor.cpp 2008-03-28 10:32:07.000000000 +0100 >@@ -36,6 +36,7 @@ > #endif > #include "multiplexor.hpp" > >+#include <cstring> // std::memset > > /**************** > * >@@ -1596,7 +1597,7 @@ > packet_size_field, > index ); > tozero = sector_buf+1024-index; >- memset( index, 0, tozero); >+ std::memset( index, 0, tozero); > index += tozero; > PS_Stream::BufferPacketSize( packet_size_field, index ); > >@@ -1613,7 +1614,7 @@ > packet_size_field, > index ); > tozero = sector_buf+2048-index; >- memset( index, 0, tozero ); >+ std::memset( index, 0, tozero ); > index += tozero; > PS_Stream::BufferPacketSize( packet_size_field, index ); > >diff -Naur mjpegtools-1.9.0rc3.orig/mplex/padstrm.cpp mjpegtools-1.9.0rc3/mplex/padstrm.cpp >--- mjpegtools-1.9.0rc3.orig/mplex/padstrm.cpp 2004-03-15 19:47:43.000000000 +0100 >+++ mjpegtools-1.9.0rc3/mplex/padstrm.cpp 2008-03-28 10:32:36.000000000 +0100 >@@ -26,7 +26,7 @@ > > #include "padstrm.hpp" > >- >+#include <cstring> // std::memset > > // > // Generator for padding packets in a padding stream... >@@ -35,19 +35,19 @@ > > unsigned int PaddingStream::ReadPacketPayload(uint8_t *dst, unsigned int to_read) > { >- memset( dst, STUFFING_BYTE, to_read ); >+ std::memset( dst, STUFFING_BYTE, to_read ); > return to_read; > } > > unsigned int VCDAPadStream::ReadPacketPayload(uint8_t *dst, unsigned int to_read) > { >- memset( dst, STUFFING_BYTE, to_read ); >+ std::memset( dst, STUFFING_BYTE, to_read ); > return to_read; > } > > unsigned int DVDPriv2Stream::ReadPacketPayload(uint8_t *dst, unsigned int to_read) > { >- memset( dst, 0, to_read ); >+ std::memset( dst, 0, to_read ); > return to_read; > } > >diff -Naur mjpegtools-1.9.0rc3.orig/y4mdenoise/Set.hh mjpegtools-1.9.0rc3/y4mdenoise/Set.hh >--- mjpegtools-1.9.0rc3.orig/y4mdenoise/Set.hh 2004-04-27 22:45:56.000000000 +0200 >+++ mjpegtools-1.9.0rc3/y4mdenoise/Set.hh 2008-03-28 10:33:02.000000000 +0100 >@@ -23,7 +23,7 @@ > // How we implement ourselves. > > public: >- typedef typename Imp::Allocator Allocator; >+ typedef typename Imp::NodeAllocator Allocator; > // The type of allocator to use to allocate items in the set. > > Set (const PRED &a_rPred = PRED(), >diff -Naur mjpegtools-1.9.0rc3.orig/y4mdenoise/SkipList.hh mjpegtools-1.9.0rc3/y4mdenoise/SkipList.hh >--- mjpegtools-1.9.0rc3.orig/y4mdenoise/SkipList.hh 2004-07-18 08:43:01.000000000 +0200 >+++ mjpegtools-1.9.0rc3/y4mdenoise/SkipList.hh 2008-03-28 10:34:08.000000000 +0100 >@@ -57,19 +57,19 @@ > // Will give good sorting for up to e^10 items. > > public: >- typedef Allocator<Node,HEADERCHUNK> Allocator; >+ typedef Allocator<Node,HEADERCHUNK> NodeAllocator; > // The type of node allocator to use. > >- static Allocator sm_oNodeAllocator; >+ static NodeAllocator sm_oNodeAllocator; > // The default node allocator. > > SkipList (const PRED &a_rPred = PRED(), >- Allocator &a_rAlloc = sm_oNodeAllocator); >+ NodeAllocator &a_rAlloc = sm_oNodeAllocator); > // Default constructor. Must be followed by Init(). > > SkipList (Status_t &a_reStatus, bool a_bAllowDuplicates, > uint32_t a_nRandSeed, const PRED &a_rPred = PRED(), >- Allocator &a_rAlloc = sm_oNodeAllocator); >+ NodeAllocator &a_rAlloc = sm_oNodeAllocator); > // Constructor. Specify whether or not duplicates are allowed, > // and provide a random number seed. > >@@ -255,7 +255,7 @@ > > private: > >- Allocator &m_rNodeAllocator; >+ NodeAllocator &m_rNodeAllocator; > // Where we get memory to allocate nodes. > > bool m_bAllowDuplicates; >@@ -337,7 +337,7 @@ > > // The default node allocator. Allocates 64K at a time. > template <class KEY, class VALUE, class KEYFN, class PRED> >-typename SkipList<KEY,VALUE,KEYFN,PRED>::Allocator >+typename SkipList<KEY,VALUE,KEYFN,PRED>::NodeAllocator > SkipList<KEY,VALUE,KEYFN,PRED>::sm_oNodeAllocator (65536); > > >@@ -345,7 +345,7 @@ > // Default constructor. Must be followed by Init(). > template <class KEY, class VALUE, class KEYFN, class PRED> > SkipList<KEY,VALUE,KEYFN,PRED>::SkipList (const PRED &a_rPred, >- Allocator &a_rAlloc) >+ NodeAllocator &a_rAlloc) > : m_rNodeAllocator (a_rAlloc), m_oPred (a_rPred) > { > // Set up some defaults. >@@ -371,7 +371,7 @@ > template <class KEY, class VALUE, class KEYFN, class PRED> > SkipList<KEY,VALUE,KEYFN,PRED>::SkipList (Status_t &a_reStatus, > bool a_bAllowDuplicates, uint32_t a_nRandSeed, >- const PRED &a_rPred, Allocator &a_rAlloc) >+ const PRED &a_rPred, NodeAllocator &a_rAlloc) > : m_rNodeAllocator (a_rAlloc), m_oPred (a_rPred) > { > // Make sure they didn't start us off with an error.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 215156
: 147515 |
147517