This is an automated email from the git hooks/post-receive script. ecsv-guest pushed a commit to branch armhf_test in repository mupen64plus-video-rice.
commit 4a039f33ca0958e8783de030bbae5d6fe6eea508 Author: Sven Eckelmann <[email protected]> Date: Sun Jul 24 10:52:22 2011 +0200 Add header for undefined min/max/memcpy --- debian/changelog | 1 + debian/patches/series | 1 + debian/patches/undefined_functions.patch | 117 +++++++++++++++++++++++++++++++ 3 files changed, 119 insertions(+) diff --git a/debian/changelog b/debian/changelog index 63c90d0..836b7a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ mupen64plus-video-rice (1.99.4-3) UNRELEASED; urgency=low - Add png_truecolor_conversation.patch, Convert 8-bit png to truecolor when needed - Add divide_by_zero.patch, Fix random crash due to divide-by-zero error + - Add undefined_functions.patch, Add header for undefined min/max/memcpy * Depend on pkg-config in debian/control for new Makefile -- Sven Eckelmann <[email protected]> Sat, 23 Jul 2011 16:42:59 +0200 diff --git a/debian/patches/series b/debian/patches/series index 5726ac0..14700a3 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ rewrite_makefile.patch highres_memcorruption.patch png_truecolor_conversation.patch divide_by_zero.patch +undefined_functions.patch diff --git a/debian/patches/undefined_functions.patch b/debian/patches/undefined_functions.patch new file mode 100644 index 0000000..bd4c5cc --- /dev/null +++ b/debian/patches/undefined_functions.patch @@ -0,0 +1,117 @@ +Description: Add header for undefined min/max/memcpy +Origin: upstream, Add header for undefined min/max/memcpy +Author: Sven Eckelmann <[email protected]> + +--- +diff --git a/src/CSortedList.h b/src/CSortedList.h +index 25d97e20bab075d6598b1a6c5bb6f560da12d9e7..91fa9fa3a99835c4658f123f8a3f60159969588b 100644 +--- a/src/CSortedList.h ++++ b/src/CSortedList.h +@@ -19,6 +19,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + #ifndef _SORTED_LIST_H_ + #define _SORTED_LIST_H_ + ++#include <cstring> ++ + template<class Key, class Element> + class CSortedList + { +@@ -72,8 +74,8 @@ public: + + keys = new Key[maxSize]; + elements = new Element[maxSize]; +- memcpy(keys,oldkeys,oldmaxsize*sizeof(Key)); +- memcpy(elements,oldelements,oldmaxsize*sizeof(Element)); ++ std::memcpy(keys,oldkeys,oldmaxsize*sizeof(Key)); ++ std::memcpy(elements,oldelements,oldmaxsize*sizeof(Element)); + } + + for( i=0; i<curSize; i++ ) +diff --git a/src/DirectXDecodedMux.cpp b/src/DirectXDecodedMux.cpp +index a320a6005443092f0bd9717736969606a8acf8d3..7ba0d29ac0a37c26f1cce42fb44dd40e4227e663 100644 +--- a/src/DirectXDecodedMux.cpp ++++ b/src/DirectXDecodedMux.cpp +@@ -18,6 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + #include "Combiner.h" + #include "DirectXDecodedMux.h" ++#include <algorithm> + + //This function is called after Reformat to handel two texels in 1 cycle, D3D can not handle + //two texels in a single stage, the texels must be splited into multiple stages +@@ -158,7 +159,7 @@ void CDirectXDecodedMux::Reformat(bool do_complement) + { + DecodedMux::Reformat(do_complement); + ReformatAgainWithTwoTexels(); +- mType = max(max(max(splitType[0], splitType[1]),splitType[2]),splitType[3]); ++ mType = std::max(std::max(std::max(splitType[0], splitType[1]),splitType[2]),splitType[3]); + } + + +diff --git a/src/Render.cpp b/src/Render.cpp +index 07164aab58c88907cffaf1228c6b411a768b3bac..f044ec950e29bfbad79d729ea438537de7ad4127 100644 +--- a/src/Render.cpp ++++ b/src/Render.cpp +@@ -27,6 +27,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + #include "liblinux/BMGLibPNG.h" + ++#include <algorithm> ++ + extern FiddledVtx * g_pVtxBase; + CRender * CRender::g_pRender=NULL; + int CRender::gRenderReferenceCount=0; +@@ -1841,15 +1843,15 @@ void CRender::UpdateClipRectangle() + + void CRender::UpdateScissorWithClipRatio() + { +- gRSP.real_clip_scissor_left = max(gRDP.scissor.left, gRSP.clip_ratio_left); +- gRSP.real_clip_scissor_top = max(gRDP.scissor.top, gRSP.clip_ratio_top); +- gRSP.real_clip_scissor_right = min(gRDP.scissor.right,gRSP.clip_ratio_right); +- gRSP.real_clip_scissor_bottom = min(gRDP.scissor.bottom, gRSP.clip_ratio_bottom); ++ gRSP.real_clip_scissor_left = std::max(gRDP.scissor.left, gRSP.clip_ratio_left); ++ gRSP.real_clip_scissor_top = std::max(gRDP.scissor.top, gRSP.clip_ratio_top); ++ gRSP.real_clip_scissor_right = std::min(gRDP.scissor.right,gRSP.clip_ratio_right); ++ gRSP.real_clip_scissor_bottom = std::min(gRDP.scissor.bottom, gRSP.clip_ratio_bottom); + +- gRSP.real_clip_scissor_left = max(gRSP.real_clip_scissor_left, 0); +- gRSP.real_clip_scissor_top = max(gRSP.real_clip_scissor_top, 0); +- gRSP.real_clip_scissor_right = min(gRSP.real_clip_scissor_right,windowSetting.uViWidth-1); +- gRSP.real_clip_scissor_bottom = min(gRSP.real_clip_scissor_bottom, windowSetting.uViHeight-1); ++ gRSP.real_clip_scissor_left = std::max(gRSP.real_clip_scissor_left, 0); ++ gRSP.real_clip_scissor_top = std::max(gRSP.real_clip_scissor_top, 0); ++ gRSP.real_clip_scissor_right = std::min(gRSP.real_clip_scissor_right,windowSetting.uViWidth-1); ++ gRSP.real_clip_scissor_bottom = std::min(gRSP.real_clip_scissor_bottom, windowSetting.uViHeight-1); + + WindowSettingStruct &w = windowSetting; + w.clipping.left = (uint32)(gRSP.real_clip_scissor_left*windowSetting.fMultX); +diff --git a/src/TextureFilters.cpp b/src/TextureFilters.cpp +index a8ac0d422b99e8c16e67d5bf6e9f8d87f535bd90..37c46d95bb0fe246f80bba609161374d0efb0885 100644 +--- a/src/TextureFilters.cpp ++++ b/src/TextureFilters.cpp +@@ -30,6 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + #include "liblinux/BMGLibPNG.h" + #include "liblinux/BMGDLL.h" + #include <sys/types.h> ++#include <algorithm> + + /************************************************************************/ + /* 2X filters */ +@@ -308,7 +309,7 @@ void SharpenFilter_32(uint32 *pdata, uint32 width, uint32 height, uint32 pitch, + val[z]=t5; + if( (t5*mul2) > (t1+t3+t7+t9+t2+t4+t6+t8)*mul1 ) + { +- val[z]= min((((t5*mul3) - (t1+t3+t7+t9+t2+t4+t6+t8)*mul1)>>shift4),0xFF); ++ val[z]= std::min((((t5*mul3) - (t1+t3+t7+t9+t2+t4+t6+t8)*mul1)>>shift4),0xFFU); + } + } + dest[x] = val[0]|(val[1]<<8)|(val[2]<<16)|(val[3]<<24); +@@ -375,7 +376,7 @@ void SharpenFilter_16(uint16 *pdata, uint32 width, uint32 height, uint32 pitch, + if( (t5*mul2) > (t1+t3+t7+t9+t2+t4+t6+t8)*mul1 ) + { + val[z] = (((t5*mul3) - (t1+t3+t7+t9+t2+t4+t6+t8)*mul1)>>shift4); +- val[z]= min(val[z],0xF); ++ val[z]= std::min(val[z],(unsigned short)0xFU); + } + } + dest[x] = val[0]|(val[1]<<4)|(val[2]<<8)|(val[3]<<12); -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-video-rice.git _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

