File tse3-0.3.1_gcc43_fixes.patch of Package tse3

Index: src/tse3/plt/OSS.cpp
===================================================================
--- src/tse3/plt/OSS.cpp.orig	2007-11-13 02:09:00.000000000 +0100
+++ src/tse3/plt/OSS.cpp	2007-11-13 02:29:57.728632000 +0100
@@ -25,6 +25,7 @@
 #include <fcntl.h>
 #include <stdarg.h>
 #include <sys/types.h>
+#include <cstring>
 
 // These #includes are linux specific and I need to do some autoconf
 // magic to work out how to conditionally include them
@@ -2082,7 +2083,7 @@ OSSMidiScheduler::OSSMidiScheduler()
            if (verbose)
                std::cout << "MIDI device: " << n << ": " << midiinfo[n].name
                          << "(" << midiinfo[n].dev_type << ")\n";
-           if (!std::strcmp(midiinfo[n].name, "AWE Midi Emu"))
+           if (!strcmp(midiinfo[n].name, "AWE Midi Emu"))
            {
                useRunning[n] = false;
                if (verbose)
Index: src/tse3/plt/Alsa-0.9.cpp
===================================================================
--- src/tse3/plt/Alsa-0.9.cpp.orig	2005-07-25 13:22:56.000000000 +0200
+++ src/tse3/plt/Alsa-0.9.cpp	2007-11-13 02:32:17.428965000 +0100
@@ -25,7 +25,9 @@
 #define HAVE_SYS_ASOUNDLIB_H
 #endif
 
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE
+#endif
 #include <sys/stat.h>
 #include <errno.h>
 #include <alloca.h>
Index: src/tse3/ins/Instrument.cpp
===================================================================
--- src/tse3/ins/Instrument.cpp.orig	2005-08-23 14:30:18.000000000 +0200
+++ src/tse3/ins/Instrument.cpp	2007-11-13 02:34:54.534335000 +0100
@@ -141,8 +141,8 @@ int Instrument::bankMSB(int index) const
 int Instrument::bank(const Voice &/*voice*/) const
 {
     return -2;
-    // XXX
-#warning This is not implemented
+// XXX
+// #warning This is not implemented
 }
 
 
Index: src/tse3/FileBlockParser.h
===================================================================
--- src/tse3/FileBlockParser.h.orig	2005-08-23 14:24:43.000000000 +0200
+++ src/tse3/FileBlockParser.h	2007-11-13 13:44:54.712557000 +0100
@@ -17,6 +17,7 @@
 #ifndef TSE3_FILEBLOCKPARSER_H
 #define TSE3_FILEBLOCKPARSER_H
 
+#include <iostream>
 #include "tse3/Serializable.h"
 
 #include <map>
Index: src/tse3/TSE2MDL.cpp
===================================================================
--- src/tse3/TSE2MDL.cpp.orig	2005-07-25 13:23:00.000000000 +0200
+++ src/tse3/TSE2MDL.cpp	2007-11-13 13:46:24.140046000 +0100
@@ -38,6 +38,7 @@
 #include "tse3/Progress.h"
 
 #include <fstream>
+#include <cstring>
 
 using namespace TSE3;
 
Index: src/tse3/MidiFile.cpp
===================================================================
--- src/tse3/MidiFile.cpp.orig	2005-07-25 13:23:00.000000000 +0200
+++ src/tse3/MidiFile.cpp	2007-11-13 13:48:42.575478000 +0100
@@ -32,6 +32,7 @@
 #include <string>
 #include <queue>
 #include <math.h>
+#include <cstring>
 
 using namespace TSE3;
 
Index: src/tse3/Serializable.cpp
===================================================================
--- src/tse3/Serializable.cpp.orig	2005-07-25 13:23:00.000000000 +0200
+++ src/tse3/Serializable.cpp	2007-11-13 13:49:28.154847000 +0100
@@ -13,7 +13,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
  */
-
+#include <iostream>
 #include "tse3/Serializable.h"
 
 #include "tse3/Midi.h"
Index: src/examples/recording/recording.cpp
===================================================================
--- src/examples/recording/recording.cpp.orig	2005-07-25 13:22:31.000000000 +0200
+++ src/examples/recording/recording.cpp	2007-11-13 13:54:19.334371000 +0100
@@ -41,7 +41,7 @@
 
 // Used in step 3
 #include "tse3/MidiFile.h"
-
+#include <cstdlib>
 
 int main(int argc, char *argv[])
 {
Index: src/tse3/TSE3MDL.cpp
===================================================================
--- src/tse3/TSE3MDL.cpp.orig	2005-08-23 14:35:24.000000000 +0200
+++ src/tse3/TSE3MDL.cpp	2007-11-13 13:52:33.805003000 +0100
@@ -13,7 +13,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
  */
-
+#include <iostream>
 #include "tse3/TSE3MDL.h"
 
 #include "tse3/FileBlockParser.h"
Index: src/tse3play/tse3play.cpp
===================================================================
--- src/tse3play/tse3play.cpp.orig	2005-08-23 14:58:35.000000000 +0200
+++ src/tse3play/tse3play.cpp	2007-11-13 14:03:34.607402000 +0100
@@ -51,6 +51,7 @@
 
 #include <unistd.h> // for usleep
 //#include <time.h> // for nanosleep
+#include <cstdlib>
 
 using namespace TSE3;
 using namespace TSE3_Utilities_Play;
@@ -1041,7 +1042,7 @@ void TSE3PlayVisual::updateBars()
             for (int n = bot; n <= top; n++)
             {
                 // work out colour
-                char *colcode = "37"; // white
+                const char *colcode = "37"; // white
                 if (n > max*2/3)
                     colcode = "31"; // red
                 else if (n > max/3)
Index: src/tse3/MidiMapper.cpp
===================================================================
--- src/tse3/MidiMapper.cpp.orig	2005-07-25 13:23:00.000000000 +0200
+++ src/tse3/MidiMapper.cpp	2007-11-13 14:02:35.951109000 +0100
@@ -53,7 +53,7 @@ MidiMapper::~MidiMapper()
 }
 
 
-const int MidiMapper::map(int fromPort) const
+int MidiMapper::map(int fromPort) const
 {
     if (fromPort >= (int)pimpl->map.size())
     {
Index: src/tse3/MidiMapper.h
===================================================================
--- src/tse3/MidiMapper.h.orig	2005-07-25 13:23:00.000000000 +0200
+++ src/tse3/MidiMapper.h	2007-11-13 14:02:42.395660000 +0100
@@ -62,7 +62,7 @@ namespace TSE3
              * @return Port number this maps to
              * @see    setMap
              */
-            const int map(int fromPort) const;
+            int map(int fromPort) const;
 
             /**
              * Set the mapping for a particular channel and port