]> git.pld-linux.org Git - packages/libsidplay2.git/blobdiff - gcc4-fixes.patch
- update debian patches (from sid 2.1.1-12)
[packages/libsidplay2.git] / gcc4-fixes.patch
diff --git a/gcc4-fixes.patch b/gcc4-fixes.patch
new file mode 100644 (file)
index 0000000..89d2b99
--- /dev/null
@@ -0,0 +1,174 @@
+--- sidplay-libs-2.1.1.orig/libsidplay/unix/my_macros.m4
++++ sidplay-libs-2.1.1/libsidplay/unix/my_macros.m4
+@@ -105,8 +105,9 @@ AC_DEFUN([MY_CHECK_IOS_OPENMODE],
+     AC_CACHE_VAL(test_cv_have_ios_openmode,
+     [
+         AC_TRY_COMPILE(
+-            [#include <fstream.h>
+-             #include <iomanip.h>],
++            [#include <fstream>
++             #include <iomanip>
++           using namespace std;],
+             [ios::openmode myTest = ios::in;],
+             [test_cv_have_ios_openmode=yes],
+             [test_cv_have_ios_openmode=no]
+--- sidplay-libs-2.1.1.orig/libsidplay/include/sidplay/SmartPtr.h
++++ sidplay-libs-2.1.1/libsidplay/include/sidplay/SmartPtr.h
+@@ -17,16 +17,16 @@ class SmartPtrBase_sidtt
+               doFree = bufOwner;
+               if ( bufferLen >= 1 )
+               {
+-                      pBufCurrent = ( bufBegin = buffer );
+-                      bufEnd = bufBegin + bufferLen;
+-                      bufLen = bufferLen;
+-                      status = true;
++                      this->pBufCurrent = ( this->bufBegin = buffer );
++                      this->bufEnd = this->bufBegin + bufferLen;
++                      this->bufLen = bufferLen;
++                      this->status = true;
+               }
+               else
+               {
+-                      pBufCurrent = ( bufBegin = ( bufEnd = 0 ));
+-                      bufLen = 0;
+-                      status = false;
++                      this->pBufCurrent = ( this->bufBegin = ( this->bufEnd = 0 ));
++                      this->bufLen = 0;
++                      this->status = false;
+               }
+       }
+       
+@@ -211,16 +211,16 @@ class SmartPtr_sidtt : public SmartPtrBa
+       {
+               if ( bufferLen >= 1 )
+               {
+-                      pBufCurrent = ( bufBegin = buffer );
+-                      bufEnd = bufBegin + bufferLen;
+-                      bufLen = bufferLen;
+-                      status = true;
++                      this->pBufCurrent = ( this->bufBegin = buffer );
++                      this->bufEnd = this->bufBegin + bufferLen;
++                      this->bufLen = bufferLen;
++                      this->status = true;
+               }
+               else
+               {
+-                      pBufCurrent = bufBegin = bufEnd = 0;
+-                      bufLen = 0;
+-                      status = false;
++                      this->pBufCurrent = this->bufBegin = this->bufEnd = 0;
++                      this->bufLen = 0;
++                      this->status = false;
+               }
+       }
+ };
+--- sidplay-libs-2.1.1.orig/libsidplay/include/sidplay/sidendian.h
++++ sidplay-libs-2.1.1/libsidplay/include/sidplay/sidendian.h
+@@ -16,6 +16,10 @@
+  ***************************************************************************/
+ /***************************************************************************
+  *  $Log$
++ *  Revision 1.6  2005/11/20 11:02:06  s_a_white
++ *  Work around for bug in gcc 4 (optimiser breaks if variable never has a
++ *  direct assignment).
++ *
+  *  Revision 1.5  2001/07/03 22:44:13  s_a_white
+  *  Added endian_16 to convert a 16 bit value to an array of 8s.
+  *
+@@ -141,7 +145,7 @@ inline void endian_16swap8 (uint_least16
+ // Convert high-byte and low-byte to 16-bit word.
+ inline uint_least16_t endian_16 (uint8_t hi, uint8_t lo)
+ {
+-    uint_least16_t word;
++    uint_least16_t word = 0;
+     endian_16lo8 (word, lo);
+     endian_16hi8 (word, hi);
+     return word;
+@@ -165,7 +169,7 @@ inline void endian_16 (uint8_t ptr[2], u
+ inline void endian_16 (char ptr[2], uint_least16_t word)
+ {
+-      endian_16 ((uint8_t *) ptr, word);
++    endian_16 ((uint8_t *) ptr, word);
+ }
+ // Convert high-byte and low-byte to 16-bit little endian word.
+@@ -334,7 +338,7 @@ inline void endian_32swap16 (uint_least3
+ // Swap word endian.
+ inline void endian_32swap8 (uint_least32_t &dword)
+ {
+-    uint_least16_t lo, hi;
++    uint_least16_t lo = 0, hi = 0;
+     lo = endian_32lo16 (dword);
+     hi = endian_32hi16 (dword);
+     endian_16swap8 (lo);
+@@ -346,8 +350,8 @@ inline void endian_32swap8 (uint_least32
+ // Convert high-byte and low-byte to 32-bit word.
+ inline uint_least32_t endian_32 (uint8_t hihi, uint8_t hilo, uint8_t hi, uint8_t lo)
+ {
+-    uint_least32_t dword;
+-    uint_least16_t word;
++    uint_least32_t dword = 0;
++    uint_least16_t word  = 0;
+     endian_32lo8  (dword, lo);
+     endian_32hi8  (dword, hi);
+     endian_16lo8  (word,  hilo);
+@@ -374,7 +378,7 @@ inline void endian_little32 (uint8_t ptr
+     defined(SID_WORDS_LITTLEENDIAN)
+     *((uint_least32_t *) ptr) = dword;
+ #else
+-    uint_least16_t word;
++    uint_least16_t word = 0;
+     ptr[0] = endian_32lo8  (dword);
+     ptr[1] = endian_32hi8  (dword);
+     word   = endian_32hi16 (dword);
+@@ -401,7 +405,7 @@ inline void endian_big32 (uint8_t ptr[4]
+     defined(SID_WORDS_BIGENDIAN)
+     *((uint_least32_t *) ptr) = dword;
+ #else
+-    uint_least16_t word;
++    uint_least16_t word = 0;
+     word   = endian_32hi16 (dword);
+     ptr[1] = endian_16lo8  (word);
+     ptr[0] = endian_16hi8  (word);
+--- sidplay-libs-2.1.1.orig/libsidutils/include/sidplay/utils/SidUsage.h
++++ sidplay-libs-2.1.1/libsidutils/include/sidplay/utils/SidUsage.h
+@@ -33,7 +33,7 @@ struct sid2_usage_t: public sid_usage_t
+     uint_least16_t length;  // usage scan length
+     // Copy common parts of basic usage to extended usage.
+-    sid2_usage_t &sid2_usage_t::operator= (const sid_usage_t &usage)
++    sid2_usage_t &operator= (const sid_usage_t &usage)
+     {
+         *((sid_usage_t *) this) = usage;
+         return *this;
+--- sidplay-libs-2.1.1.orig/builders/resid-builder/src/resid-builder.cpp
++++ sidplay-libs-2.1.1/builders/resid-builder/src/resid-builder.cpp
+@@ -37,6 +37,7 @@
+  ***************************************************************************/
+ #include <stdio.h>
++#include <cstring>
+ #include "config.h"
+ #ifdef HAVE_EXCEPTIONS
+--- sidplay-libs-2.1.1.orig/builders/resid-builder/src/resid.cpp
++++ sidplay-libs-2.1.1/builders/resid-builder/src/resid.cpp
+@@ -16,6 +16,7 @@
+  *                                                                         *
+  ***************************************************************************/
++#include <cstring>
+ #include "config.h"
+ #ifdef HAVE_EXCEPTIONS
+--- sidplay-libs-2.1.1.orig/builders/hardsid-builder/src/hardsid-builder.cpp
++++ sidplay-libs-2.1.1/builders/hardsid-builder/src/hardsid-builder.cpp
+@@ -47,6 +47,7 @@
+  ***************************************************************************/
+ #include <stdio.h>
++#include <cstring>
+ #include "config.h"
+ #ifdef HAVE_EXCEPTIONS
This page took 0.040564 seconds and 4 git commands to generate.