summaryrefslogtreecommitdiff
path: root/audio/csound
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--audio/csound/files/patch-InOut-rtalsa.c12
-rw-r--r--audio/csound/files/patch-InOut_rtalsa.c12
-rw-r--r--audio/csound/files/patch-Opcodes-urandom.c10
-rw-r--r--audio/csound/files/patch-Opcodes_urandom.c10
-rw-r--r--audio/csound/files/patch-SConstruct6
-rw-r--r--audio/csound/files/patch-Top-csound.c64
-rw-r--r--audio/csound/files/patch-Top_csound.c64
-rw-r--r--audio/csound/files/patch-frontends_fltk__gui_CsoundPerformanceSettingsPanel.cpp14
-rw-r--r--audio/csound/files/patch-frontends_fltk_gui_CsoundPerformanceSettingsPanel.cpp14
-rw-r--r--audio/csound6/files/patch-H__remote.h14
-rw-r--r--audio/csound6/files/patch-H_remote.h14
-rw-r--r--audio/csound6/files/patch-InOut-rtalsa.c27
-rw-r--r--audio/csound6/files/patch-InOut_rtalsa.c27
-rw-r--r--audio/csound6/files/patch-Top-csound.c55
-rw-r--r--audio/csound6/files/patch-Top_csound.c55
-rw-r--r--audio/csound6/files/patch-frontends_CsoundAC_ChordSpace.hpp19
-rw-r--r--audio/csound6/files/patch-frontends_CsoundAC_Composition.cpp37
-rw-r--r--audio/csound6/files/patch-frontends_CsoundAC_Counterpoint.cpp89
-rw-r--r--audio/csound6/files/patch-frontends_CsoundAC_Counterpoint.hpp13
-rw-r--r--audio/csound6/files/patch-frontends__CsoundAC__ChordSpace.hpp19
-rw-r--r--audio/csound6/files/patch-frontends__CsoundAC__Composition.cpp37
-rw-r--r--audio/csound6/files/patch-frontends__CsoundAC__Counterpoint.cpp89
-rw-r--r--audio/csound6/files/patch-frontends__CsoundAC__Counterpoint.hpp13
23 files changed, 357 insertions, 357 deletions
diff --git a/audio/csound/files/patch-InOut-rtalsa.c b/audio/csound/files/patch-InOut-rtalsa.c
deleted file mode 100644
index cc4c4635a1e0..000000000000
--- a/audio/csound/files/patch-InOut-rtalsa.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- InOut/rtalsa.c.orig 2011-12-22 19:41:53.000000000 +0900
-+++ InOut/rtalsa.c 2011-12-27 23:53:00.000000000 +0900
-@@ -35,9 +35,6 @@
- /* #ifndef _BSD_SOURCE */
- /* #define _BSD_SOURCE 1 */
- /* #endif */
--#include <alloca.h>
--#include <termios.h>
--#include <unistd.h>
-
- #include "csdl.h"
-
diff --git a/audio/csound/files/patch-InOut_rtalsa.c b/audio/csound/files/patch-InOut_rtalsa.c
new file mode 100644
index 000000000000..df863ed7a06a
--- /dev/null
+++ b/audio/csound/files/patch-InOut_rtalsa.c
@@ -0,0 +1,12 @@
+--- InOut/rtalsa.c.orig 2013-01-07 12:49:34 UTC
++++ InOut/rtalsa.c
+@@ -35,9 +35,6 @@
+ /* #ifndef _BSD_SOURCE */
+ /* #define _BSD_SOURCE 1 */
+ /* #endif */
+-#include <alloca.h>
+-#include <termios.h>
+-#include <unistd.h>
+
+ #include "csdl.h"
+
diff --git a/audio/csound/files/patch-Opcodes-urandom.c b/audio/csound/files/patch-Opcodes-urandom.c
deleted file mode 100644
index 7d19cb045fdd..000000000000
--- a/audio/csound/files/patch-Opcodes-urandom.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- Opcodes/urandom.c.old 2011-01-30 02:14:59.000000000 -0600
-+++ Opcodes/urandom.c 2011-01-30 02:15:08.000000000 -0600
-@@ -22,7 +22,6 @@
- */
-
- #include "csdl.h"
--#include <ieee754.h>
-
- typedef struct {
- OPDS h;
diff --git a/audio/csound/files/patch-Opcodes_urandom.c b/audio/csound/files/patch-Opcodes_urandom.c
new file mode 100644
index 000000000000..3cf8554709da
--- /dev/null
+++ b/audio/csound/files/patch-Opcodes_urandom.c
@@ -0,0 +1,10 @@
+--- Opcodes/urandom.c.orig 2013-01-07 12:49:34 UTC
++++ Opcodes/urandom.c
+@@ -22,7 +22,6 @@
+ */
+
+ #include "csdl.h"
+-#include <ieee754.h>
+
+ typedef struct {
+ OPDS h;
diff --git a/audio/csound/files/patch-SConstruct b/audio/csound/files/patch-SConstruct
index da73267d75e3..c7ee4b0b96b2 100644
--- a/audio/csound/files/patch-SConstruct
+++ b/audio/csound/files/patch-SConstruct
@@ -1,6 +1,6 @@
---- SConstruct.orig 2013-01-07 16:49:34.000000000 +0400
-+++ SConstruct 2014-08-22 15:37:51.000000000 +0400
-@@ -2057,7 +2057,7 @@
+--- SConstruct.orig 2013-01-07 12:49:34 UTC
++++ SConstruct
+@@ -2057,7 +2057,7 @@ else:
# DSSI HOST OPCODES
diff --git a/audio/csound/files/patch-Top-csound.c b/audio/csound/files/patch-Top-csound.c
deleted file mode 100644
index fdeab7833a8f..000000000000
--- a/audio/csound/files/patch-Top-csound.c
+++ /dev/null
@@ -1,64 +0,0 @@
---- Top/csound.c.orig 2011-10-16 22:59:03.000000000 +0900
-+++ Top/csound.c 2011-12-07 01:15:33.000000000 +0900
-@@ -70,11 +70,14 @@
- **** MAJOR PROBLEM: PTHREAD_SPINLOCK_INITIALIZER is not defined in
- Linux or Haiku */
-
--#if defined(linux) || defined(__HAIKU__)
-+#if defined(linux) || defined(__HAIKU__) || defined(__FreeBSD__)
- #define PTHREAD_SPINLOCK_INITIALIZER 0
- #endif
- #endif /* PARCS */
-
-+#if defined(__FreeBSD__)
-+#include <sys/sysctl.h>
-+#endif
- #if defined(USE_OPENMP)
- #include <omp.h>
- #endif /* USE_OPENMP */
-@@ -430,7 +433,7 @@
- NULL, /* csRandState */
- 0, /* randSeed1 */
- 0, /* randSeed2 */
--#if defined(HAVE_PTHREAD_SPIN_LOCK) && (defined(PARCS))
-+#if defined(__GNUC__) && defined(HAVE_PTHREAD_SPIN_LOCK) && (defined(PARCS))
- PTHREAD_SPINLOCK_INITIALIZER, /* memlock */
- #else
- 0, /* memlock */
-@@ -2914,7 +2917,7 @@
- /* ------------------------------------ */
-
- #if defined(HAVE_RDTSC)
--#if !(defined(LINUX) && defined(__GNUC__) && defined(__i386__))
-+#if !(defined(LINUX) && defined(__GNUC__) && defined(__i386__)) || !(defined(LINUX) && defined(__i386__))
- #undef HAVE_RDTSC
- #endif
- #endif
-@@ -2927,6 +2930,12 @@
- static int getTimeResolution(void)
- {
- #if defined(HAVE_RDTSC)
-+#if defined(__FreeBSD__)
-+ size_t size;
-+ int timeResolutionSeconds;
-+ size = sizeof timeResolutionSeconds;
-+ sysctlbyname("hw.clockrate", &timeResolutionSeconds, &size, NULL, 0);
-+#else
- FILE *f;
- char buf[256];
-
-@@ -2967,9 +2976,14 @@
- }
- }
- fclose(f);
-+#endif /* __FreeBSD__ */
- if (UNLIKELY(timeResolutionSeconds <= 0.0)) {
- fprintf(stderr, Str("No valid CPU frequency entry "
-+#if defined(__FreeBSD__)
-+ "was found.\n"));
-+#else
- "was found in /proc/cpuinfo.\n"));
-+#endif /* __FreeBSD__ */
- return -1;
- }
- /* MHz -> seconds */
diff --git a/audio/csound/files/patch-Top_csound.c b/audio/csound/files/patch-Top_csound.c
new file mode 100644
index 000000000000..2c612f114dfb
--- /dev/null
+++ b/audio/csound/files/patch-Top_csound.c
@@ -0,0 +1,64 @@
+--- Top/csound.c.orig 2013-01-07 12:49:34 UTC
++++ Top/csound.c
+@@ -70,11 +70,14 @@ extern "C" {
+ **** MAJOR PROBLEM: PTHREAD_SPINLOCK_INITIALIZER is not defined in
+ Linux or Haiku */
+
+-#if defined(linux) || defined(__HAIKU__)
++#if defined(linux) || defined(__HAIKU__) || defined(__FreeBSD__)
+ #define PTHREAD_SPINLOCK_INITIALIZER 0
+ #endif
+ #endif /* PARCS */
+
++#if defined(__FreeBSD__)
++#include <sys/sysctl.h>
++#endif
+ #if defined(USE_OPENMP)
+ #include <omp.h>
+ #endif /* USE_OPENMP */
+@@ -430,7 +433,7 @@ extern "C" {
+ NULL, /* csRandState */
+ 0, /* randSeed1 */
+ 0, /* randSeed2 */
+-#if defined(HAVE_PTHREAD_SPIN_LOCK) && (defined(PARCS))
++#if defined(__GNUC__) && defined(HAVE_PTHREAD_SPIN_LOCK) && (defined(PARCS))
+ PTHREAD_SPINLOCK_INITIALIZER, /* memlock */
+ #else
+ 0, /* memlock */
+@@ -2914,7 +2917,7 @@ void csoundNotifyFileOpened(CSOUND *csou
+ /* ------------------------------------ */
+
+ #if defined(HAVE_RDTSC)
+-#if !(defined(LINUX) && defined(__GNUC__) && defined(__i386__))
++#if !(defined(LINUX) && defined(__GNUC__) && defined(__i386__)) || !(defined(LINUX) && defined(__i386__))
+ #undef HAVE_RDTSC
+ #endif
+ #endif
+@@ -2927,6 +2930,12 @@ static double timeResolutionSeconds = -1
+ static int getTimeResolution(void)
+ {
+ #if defined(HAVE_RDTSC)
++#if defined(__FreeBSD__)
++ size_t size;
++ int timeResolutionSeconds;
++ size = sizeof timeResolutionSeconds;
++ sysctlbyname("hw.clockrate", &timeResolutionSeconds, &size, NULL, 0);
++#else
+ FILE *f;
+ char buf[256];
+
+@@ -2967,9 +2976,14 @@ static int getTimeResolution(void)
+ }
+ }
+ fclose(f);
++#endif /* __FreeBSD__ */
+ if (UNLIKELY(timeResolutionSeconds <= 0.0)) {
+ fprintf(stderr, Str("No valid CPU frequency entry "
++#if defined(__FreeBSD__)
++ "was found.\n"));
++#else
+ "was found in /proc/cpuinfo.\n"));
++#endif /* __FreeBSD__ */
+ return -1;
+ }
+ /* MHz -> seconds */
diff --git a/audio/csound/files/patch-frontends_fltk__gui_CsoundPerformanceSettingsPanel.cpp b/audio/csound/files/patch-frontends_fltk__gui_CsoundPerformanceSettingsPanel.cpp
new file mode 100644
index 000000000000..865c2c9898f9
--- /dev/null
+++ b/audio/csound/files/patch-frontends_fltk__gui_CsoundPerformanceSettingsPanel.cpp
@@ -0,0 +1,14 @@
+--- frontends/fltk_gui/CsoundPerformanceSettingsPanel.cpp.orig 2013-01-07 12:49:35 UTC
++++ frontends/fltk_gui/CsoundPerformanceSettingsPanel.cpp
+@@ -4,9 +4,11 @@
+ #endif
+
+ //CS5GUI_EXPERIMENTAL device query section left out for Windows and Mac while the problem is found
++#ifndef __FreeBSD__
+ #ifdef LINUX
+ #define CS5GUI_EXPERIMENTAL
+ #endif
++#endif
+
+
+ #include "csound.hpp"
diff --git a/audio/csound/files/patch-frontends_fltk_gui_CsoundPerformanceSettingsPanel.cpp b/audio/csound/files/patch-frontends_fltk_gui_CsoundPerformanceSettingsPanel.cpp
deleted file mode 100644
index fea6dd48a2f4..000000000000
--- a/audio/csound/files/patch-frontends_fltk_gui_CsoundPerformanceSettingsPanel.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
---- frontends/fltk_gui/CsoundPerformanceSettingsPanel.cpp.orig 2012-08-31 15:40:35.000000000 +0200
-+++ frontends/fltk_gui/CsoundPerformanceSettingsPanel.cpp 2012-10-01 23:21:42.734591150 +0200
-@@ -4,9 +4,11 @@
- #endif
-
- //CS5GUI_EXPERIMENTAL device query section left out for Windows and Mac while the problem is found
-+#ifndef __FreeBSD__
- #ifdef LINUX
- #define CS5GUI_EXPERIMENTAL
- #endif
-+#endif
-
-
- #include "csound.hpp"
diff --git a/audio/csound6/files/patch-H__remote.h b/audio/csound6/files/patch-H__remote.h
deleted file mode 100644
index 300d735180c6..000000000000
--- a/audio/csound6/files/patch-H__remote.h
+++ /dev/null
@@ -1,14 +0,0 @@
---- H/remote.h.orig 2015-04-25 19:06:22 UTC
-+++ H/remote.h
-@@ -42,7 +42,10 @@
- #ifdef MACOSX
- #include <net/if.h>
- #endif
-- #ifdef LINUX
-+ #ifdef __FreeBSD__
-+ #include <net/if.h>
-+ #endif
-+ #ifdef linux
- #include <linux/if.h>
- #endif
- #include <arpa/inet.h>
diff --git a/audio/csound6/files/patch-H_remote.h b/audio/csound6/files/patch-H_remote.h
new file mode 100644
index 000000000000..d83fa52cd1f1
--- /dev/null
+++ b/audio/csound6/files/patch-H_remote.h
@@ -0,0 +1,14 @@
+--- H/remote.h.orig 2015-09-29 11:13:27 UTC
++++ H/remote.h
+@@ -42,7 +42,10 @@
+ #ifdef MACOSX
+ #include <net/if.h>
+ #endif
+- #ifdef LINUX
++ #ifdef __FreeBSD__
++ #include <net/if.h>
++ #endif
++ #ifdef linux
+ #include <linux/if.h>
+ #endif
+ #include <arpa/inet.h>
diff --git a/audio/csound6/files/patch-InOut-rtalsa.c b/audio/csound6/files/patch-InOut-rtalsa.c
deleted file mode 100644
index 933b53e5f83f..000000000000
--- a/audio/csound6/files/patch-InOut-rtalsa.c
+++ /dev/null
@@ -1,27 +0,0 @@
---- InOut/rtalsa.c.orig 2015-04-25 19:06:22 UTC
-+++ InOut/rtalsa.c
-@@ -23,6 +23,7 @@
- 02111-1307 USA
- */
-
-+/*
- #ifndef _ISOC99_SOURCE
- #define _ISOC99_SOURCE 1
- #endif
-@@ -32,6 +33,7 @@
- #ifndef _BSD_SOURCE
- #define _BSD_SOURCE 1
- #endif
-+*/
-
- #include "csdl.h"
-
-@@ -50,6 +52,8 @@
- #include <signal.h>
- #include <sys/mman.h>
- #include <sys/resource.h>
-+#include <stdlib.h>
-+#include <sys/fcntl.h>
-
-
- #include "soundio.h"
diff --git a/audio/csound6/files/patch-InOut_rtalsa.c b/audio/csound6/files/patch-InOut_rtalsa.c
new file mode 100644
index 000000000000..7b13e67f0a43
--- /dev/null
+++ b/audio/csound6/files/patch-InOut_rtalsa.c
@@ -0,0 +1,27 @@
+--- InOut/rtalsa.c.orig 2015-09-29 11:13:27 UTC
++++ InOut/rtalsa.c
+@@ -23,6 +23,7 @@
+ 02111-1307 USA
+ */
+
++/*
+ #ifndef _ISOC99_SOURCE
+ #define _ISOC99_SOURCE 1
+ #endif
+@@ -32,6 +33,7 @@
+ #ifndef _BSD_SOURCE
+ #define _BSD_SOURCE 1
+ #endif
++*/
+
+ #include "csdl.h"
+
+@@ -50,6 +52,8 @@
+ #include <signal.h>
+ #include <sys/mman.h>
+ #include <sys/resource.h>
++#include <stdlib.h>
++#include <sys/fcntl.h>
+
+
+ #include "soundio.h"
diff --git a/audio/csound6/files/patch-Top-csound.c b/audio/csound6/files/patch-Top-csound.c
deleted file mode 100644
index 25e11ee4875a..000000000000
--- a/audio/csound6/files/patch-Top-csound.c
+++ /dev/null
@@ -1,55 +0,0 @@
---- Top/csound.c.orig 2015-04-25 19:06:23 UTC
-+++ Top/csound.c
-@@ -60,10 +60,13 @@
- #include "cs_par_dispatch.h"
- #include "csound_orc_semantics.h"
-
--#if defined(linux) || defined(__HAIKU__) || defined(__EMSCRIPTEN__)
-+#if defined(linux) || defined(__HAIKU__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__)
- #define PTHREAD_SPINLOCK_INITIALIZER 0
- #endif
-
-+#if defined(__FreeBSD__)
-+#include <sys/sysctl.h>
-+#endif
- #if defined(USE_OPENMP)
- #include <omp.h>
- #endif /* USE_OPENMP */
-@@ -3495,7 +3498,7 @@ void csoundNotifyFileOpened(CSOUND* csou
- /* ------------------------------------ */
-
- #if defined(HAVE_RDTSC)
--#if !(defined(LINUX) && defined(__GNUC__) && defined(__i386__))
-+#if !(defined(LINUX) && defined(__GNUC__) && defined(__i386__)) || !(defined(__FreeBSD__) && defined(__i386__))
- #undef HAVE_RDTSC
- #endif
- #endif
-@@ -3508,6 +3511,13 @@ static double timeResolutionSeconds = -1
- static int getTimeResolution(void)
- {
- #if defined(HAVE_RDTSC)
-+#if defined(__FreeBSD__)
-+ size_t size;
-+ int timeResolutionSeconds;
-+ size = sizeof timeResolutionSeconds;
-+ sysctlbyname("hw.clockrate", &timeResolutionSeconds, &size, NULL, 0);
-+
-+#else
- FILE *f;
- char buf[256];
-
-@@ -3543,9 +3553,14 @@ static int getTimeResolution(void)
- }
- }
- fclose(f);
-+#endif /* __FreeBSD__ */
- if (UNLIKELY(timeResolutionSeconds <= 0.0)) {
- fprintf(stderr, Str("No valid CPU frequency entry "
-+#if defined(__FreeBSD__)
-+ "was found.\n"));
-+#else
- "was found in /proc/cpuinfo.\n"));
-+#endif /* __FreeBSD__ */
- return -1;
- }
- /* MHz -> seconds */
diff --git a/audio/csound6/files/patch-Top_csound.c b/audio/csound6/files/patch-Top_csound.c
new file mode 100644
index 000000000000..3d417d6ace46
--- /dev/null
+++ b/audio/csound6/files/patch-Top_csound.c
@@ -0,0 +1,55 @@
+--- Top/csound.c.orig 2015-09-29 11:13:27 UTC
++++ Top/csound.c
+@@ -60,10 +60,13 @@
+ #include "cs_par_dispatch.h"
+ #include "csound_orc_semantics.h"
+
+-#if defined(linux) || defined(__HAIKU__) || defined(__EMSCRIPTEN__)
++#if defined(linux) || defined(__HAIKU__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__)
+ #define PTHREAD_SPINLOCK_INITIALIZER 0
+ #endif
+
++#if defined(__FreeBSD__)
++#include <sys/sysctl.h>
++#endif
+ #if defined(USE_OPENMP)
+ #include <omp.h>
+ #endif /* USE_OPENMP */
+@@ -3510,7 +3513,7 @@ void csoundNotifyFileOpened(CSOUND* csou
+ /* ------------------------------------ */
+
+ #if defined(HAVE_RDTSC)
+-#if !(defined(LINUX) && defined(__GNUC__) && defined(__i386__))
++#if !(defined(LINUX) && defined(__GNUC__) && defined(__i386__)) || !(defined(__FreeBSD__) && defined(__i386__))
+ #undef HAVE_RDTSC
+ #endif
+ #endif
+@@ -3523,6 +3526,13 @@ static double timeResolutionSeconds = -1
+ static int getTimeResolution(void)
+ {
+ #if defined(HAVE_RDTSC)
++#if defined(__FreeBSD__)
++ size_t size;
++ int timeResolutionSeconds;
++ size = sizeof timeResolutionSeconds;
++ sysctlbyname("hw.clockrate", &timeResolutionSeconds, &size, NULL, 0);
++
++#else
+ FILE *f;
+ char buf[256];
+
+@@ -3558,9 +3568,14 @@ static int getTimeResolution(void)
+ }
+ }
+ fclose(f);
++#endif /* __FreeBSD__ */
+ if (UNLIKELY(timeResolutionSeconds <= 0.0)) {
+ fprintf(stderr, Str("No valid CPU frequency entry "
++#if defined(__FreeBSD__)
++ "was found.\n"));
++#else
+ "was found in /proc/cpuinfo.\n"));
++#endif /* __FreeBSD__ */
+ return -1;
+ }
+ /* MHz -> seconds */
diff --git a/audio/csound6/files/patch-frontends_CsoundAC_ChordSpace.hpp b/audio/csound6/files/patch-frontends_CsoundAC_ChordSpace.hpp
new file mode 100644
index 000000000000..0471a156f344
--- /dev/null
+++ b/audio/csound6/files/patch-frontends_CsoundAC_ChordSpace.hpp
@@ -0,0 +1,19 @@
+--- frontends/CsoundAC/ChordSpace.hpp.orig 2015-09-29 11:13:28 UTC
++++ frontends/CsoundAC/ChordSpace.hpp
+@@ -29,6 +29,7 @@
+ #include <climits>
+ #include <cmath>
+ #include <cstdarg>
++#include <cstdio>
+ #include <eigen3/Eigen/Dense>
+ #include "Event.hpp"
+ #include <iostream>
+@@ -554,7 +555,7 @@ public:
+ char buffer[0x1000];
+ std::stringstream stream;
+ for (size_t voice = 0; voice < voices(); ++voice) {
+- std::snprintf(buffer, 0x100, "%12.7f", getPitch(voice));
++ snprintf(buffer, 0x100, "%12.7f", getPitch(voice));
+ if (voice > 0) {
+ stream << " ";
+ }
diff --git a/audio/csound6/files/patch-frontends_CsoundAC_Composition.cpp b/audio/csound6/files/patch-frontends_CsoundAC_Composition.cpp
new file mode 100644
index 000000000000..fa72c72c0d05
--- /dev/null
+++ b/audio/csound6/files/patch-frontends_CsoundAC_Composition.cpp
@@ -0,0 +1,37 @@
+--- frontends/CsoundAC/Composition.cpp.orig 2015-09-29 11:13:28 UTC
++++ frontends/CsoundAC/Composition.cpp
+@@ -22,6 +22,7 @@
+ #endif
+ #include "Composition.hpp"
+ #include "System.hpp"
++#include <cstdio>
+ #include <cstdlib>
+ #include <map>
+
+@@ -289,7 +290,7 @@ namespace csound
+ int Composition::normalizeOutputSoundfile(double levelDb)
+ {
+ char buffer[0x100];
+- std::snprintf(buffer,
++ snprintf(buffer,
+ 0x100,
+ "sox %s -V3 -b 32 -e floating-point %s gain -n %f\n",
+ getOutputSoundfileName().c_str(),
+@@ -307,7 +308,7 @@ namespace csound
+ int Composition::translateToCdAudio(double levelDb)
+ {
+ char buffer[0x100];
+- std::snprintf(buffer, 0x100, "sox %s -V3 -b 16 %s gain -n %f rate 44100\n",
++ snprintf(buffer, 0x100, "sox %s -V3 -b 16 %s gain -n %f rate 44100\n",
+ getOutputSoundfileName().c_str(),
+ getCdSoundfileName().c_str(),
+ levelDb);
+@@ -323,7 +324,7 @@ namespace csound
+ int Composition::translateToMp3(double bitrate, double levelDb)
+ {
+ char buffer[0x100];
+- std::snprintf(buffer,
++ snprintf(buffer,
+ 0x100,
+ "lame --verbose --disptime 2 --nohist --preset cd --tt %s --ta %s --tl %s --tc %s %s %s\n",
+ getTitle().c_str(),
diff --git a/audio/csound6/files/patch-frontends_CsoundAC_Counterpoint.cpp b/audio/csound6/files/patch-frontends_CsoundAC_Counterpoint.cpp
new file mode 100644
index 000000000000..46802038c0f3
--- /dev/null
+++ b/audio/csound6/files/patch-frontends_CsoundAC_Counterpoint.cpp
@@ -0,0 +1,89 @@
+--- frontends/CsoundAC/Counterpoint.cpp.orig 2015-09-29 11:13:28 UTC
++++ frontends/CsoundAC/Counterpoint.cpp
+@@ -217,8 +217,8 @@ void Counterpoint::toCsoundScore(std::st
+ delete uniform_real_generator;
+ }
+ int Counterpoint::ABS(int i) {if (i < 0) return(-i); else return(i);}
+- int Counterpoint::MIN(int a, int b) {if (a < b) return(a); else return(b);}
+- int Counterpoint::MAX(int a, int b) {if (a > b) return(a); else return(b);}
++ int Counterpoint::IMIN(int a, int b) {if (a < b) return(a); else return(b);}
++ int Counterpoint::IMAX(int a, int b) {if (a > b) return(a); else return(b);}
+ void Counterpoint::ARRBLT(int *dest, int *source, int num) {int i; for (i=0;i<num;i++) dest[i]=source[i];} /* SAIL p51 */
+
+ int Counterpoint::InMode(int Pitch, int Mode)
+@@ -294,8 +294,8 @@ void Counterpoint::toCsoundScore(std::st
+ for (i=1;i<Cn;i++)
+ {
+ pit=Us(i,v);
+- Minp=MIN(Minp,pit);
+- Maxp=MAX(Maxp,pit);
++ Minp=IMIN(Minp,pit);
++ Maxp=IMAX(Maxp,pit);
+ }
+ return(Maxp-Minp);
+ }
+@@ -316,7 +316,7 @@ void Counterpoint::toCsoundScore(std::st
+ {
+ int j,LowestPitch;
+ LowestPitch=Cantus(Cn,v);
+- for (j=1;j<v;j++) LowestPitch=MIN(LowestPitch,Other(Cn,v,j));
++ for (j=1;j<v;j++) LowestPitch=IMIN(LowestPitch,Other(Cn,v,j));
+ return(LowestPitch);
+ }
+
+@@ -993,7 +993,7 @@ void Counterpoint::toCsoundScore(std::st
+ /* slightly frown upon leap back in the opposite direction */
+ if ((Cn>2) && ((ASkip(MelInt)) && ((ASkip(LastMelInt)) && (!(SameDir)))))
+ {
+- Val += (MAX(0,((ABS(MelInt)+ABS(LastMelInt))-8)));
++ Val += (IMAX(0,((ABS(MelInt)+ABS(LastMelInt))-8)));
+ if ((Cn>3) && (ASkip(LastCp2-LastCp3))) Val += ThreeSkipsPenalty;
+ }
+
+@@ -1009,7 +1009,7 @@ void Counterpoint::toCsoundScore(std::st
+ if ((Us(k,v)-Cantus(k,v))*(Us(k-1,v)-Cantus(k-1,v)) < 0) Cross++;
+ }
+ }
+- if (Cross > 0) Val += (MAX(0,((Cross-2)*3)));
++ if (Cross > 0) Val += (IMAX(0,((Cross-2)*3)));
+
+ /* don't repeat note on upbeat */
+ if (UpBeat(Cn,v) && (MelInt == Unison)) Val += RepetitionOnUpbeatPenalty;
+@@ -1107,7 +1107,7 @@ void Counterpoint::toCsoundScore(std::st
+ }
+ }
+ BestFitPenalty=CurrentPenalty+Penalty;
+- MaxPenalty=MIN(int(BestFitPenalty*PenaltyRatio),MaxPenalty);
++ MaxPenalty=IMIN(int(BestFitPenalty*PenaltyRatio),MaxPenalty);
+ /* AllDone=1; */
+ Fits[2]=Fits[1]; Fits[1]=Fits[0]; Fits[0]=BestFitPenalty;
+ for (v=1;v<=v1;v++)
+@@ -1164,7 +1164,7 @@ void Counterpoint::toCsoundScore(std::st
+ {
+ for (i=1;i<=NumParts;i++) Pens[x-i]=Is[i];
+ }
+- else NewLim=MIN(NewLim,penalty);
++ else NewLim=IMIN(NewLim,penalty);
+ }
+ }
+ }
+@@ -1196,7 +1196,7 @@ void Counterpoint::toCsoundScore(std::st
+ for (i=0;i<=NumParts;i++)
+ {
+ OurTime=Onset(VIndex(CurTime,i)+1,i);
+- if (OurTime != 0) NextTime=MIN(NextTime,OurTime);
++ if (OurTime != 0) NextTime=IMIN(NextTime,OurTime);
+ }
+ for (i=1;i<=NumParts;i++)
+ {
+@@ -1289,8 +1289,8 @@ void Counterpoint::toCsoundScore(std::st
+ {
+ int i;
+ i=(int)(RANDOM(10.0));
+- if (CurRhy(i) > CurRhy(MAX(1,(i-1)))) return(MAX(1,(i-1)));
+- if (CurRhy(i) <= CurRhy(MIN(9,(i+1)))) return(MIN(9,(i+1)));
++ if (CurRhy(i) > CurRhy(IMAX(1,(i-1)))) return(IMAX(1,(i-1)));
++ if (CurRhy(i) <= CurRhy(IMIN(9,(i+1)))) return(IMIN(9,(i+1)));
+ return(i);
+ }
+
diff --git a/audio/csound6/files/patch-frontends_CsoundAC_Counterpoint.hpp b/audio/csound6/files/patch-frontends_CsoundAC_Counterpoint.hpp
new file mode 100644
index 000000000000..6a4dda8f0477
--- /dev/null
+++ b/audio/csound6/files/patch-frontends_CsoundAC_Counterpoint.hpp
@@ -0,0 +1,13 @@
+--- frontends/CsoundAC/Counterpoint.hpp.orig 2015-09-29 11:13:28 UTC
++++ frontends/CsoundAC/Counterpoint.hpp
+@@ -102,8 +102,8 @@ public:
+ Counterpoint();
+ virtual ~Counterpoint();
+ int ABS(int i);
+- int MIN(int a, int b);
+- int MAX(int a, int b);
++ int IMIN(int a, int b);
++ int IMAX(int a, int b);
+ void ARRBLT(int *dest, int *source, int num);
+ enum
+ {
diff --git a/audio/csound6/files/patch-frontends__CsoundAC__ChordSpace.hpp b/audio/csound6/files/patch-frontends__CsoundAC__ChordSpace.hpp
deleted file mode 100644
index d67972d5fd85..000000000000
--- a/audio/csound6/files/patch-frontends__CsoundAC__ChordSpace.hpp
+++ /dev/null
@@ -1,19 +0,0 @@
---- frontends/CsoundAC/ChordSpace.hpp.orig 2015-04-25 19:06:23 UTC
-+++ frontends/CsoundAC/ChordSpace.hpp
-@@ -29,6 +29,7 @@
- #include <climits>
- #include <cmath>
- #include <cstdarg>
-+#include <cstdio>
- #include <eigen3/Eigen/Dense>
- #include "Event.hpp"
- #include <iostream>
-@@ -554,7 +555,7 @@ public:
- char buffer[0x1000];
- std::stringstream stream;
- for (size_t voice = 0; voice < voices(); ++voice) {
-- std::snprintf(buffer, 0x100, "%12.7f", getPitch(voice));
-+ snprintf(buffer, 0x100, "%12.7f", getPitch(voice));
- if (voice > 0) {
- stream << " ";
- }
diff --git a/audio/csound6/files/patch-frontends__CsoundAC__Composition.cpp b/audio/csound6/files/patch-frontends__CsoundAC__Composition.cpp
deleted file mode 100644
index f33a5e684d6a..000000000000
--- a/audio/csound6/files/patch-frontends__CsoundAC__Composition.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
---- frontends/CsoundAC/Composition.cpp.orig 2015-04-25 19:06:23 UTC
-+++ frontends/CsoundAC/Composition.cpp
-@@ -22,6 +22,7 @@
- #endif
- #include "Composition.hpp"
- #include "System.hpp"
-+#include <cstdio>
- #include <cstdlib>
- #include <map>
-
-@@ -289,7 +290,7 @@ namespace csound
- int Composition::normalizeOutputSoundfile(double levelDb)
- {
- char buffer[0x100];
-- std::snprintf(buffer,
-+ snprintf(buffer,
- 0x100,
- "sox %s -V3 -b 32 -e floating-point %s gain -n %f\n",
- getOutputSoundfileName().c_str(),
-@@ -307,7 +308,7 @@ namespace csound
- int Composition::translateToCdAudio(double levelDb)
- {
- char buffer[0x100];
-- std::snprintf(buffer, 0x100, "sox %s -V3 -b 16 %s gain -n %f rate 44100\n",
-+ snprintf(buffer, 0x100, "sox %s -V3 -b 16 %s gain -n %f rate 44100\n",
- getOutputSoundfileName().c_str(),
- getCdSoundfileName().c_str(),
- levelDb);
-@@ -323,7 +324,7 @@ namespace csound
- int Composition::translateToMp3(double bitrate, double levelDb)
- {
- char buffer[0x100];
-- std::snprintf(buffer,
-+ snprintf(buffer,
- 0x100,
- "lame --verbose --disptime 2 --nohist --preset cd --tt %s --ta %s --tl %s --tc %s %s %s\n",
- getTitle().c_str(),
diff --git a/audio/csound6/files/patch-frontends__CsoundAC__Counterpoint.cpp b/audio/csound6/files/patch-frontends__CsoundAC__Counterpoint.cpp
deleted file mode 100644
index abc845af7255..000000000000
--- a/audio/csound6/files/patch-frontends__CsoundAC__Counterpoint.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
---- frontends/CsoundAC/Counterpoint.cpp.orig 2015-04-25 19:06:23 UTC
-+++ frontends/CsoundAC/Counterpoint.cpp
-@@ -217,8 +217,8 @@ void Counterpoint::toCsoundScore(std::st
- delete uniform_real_generator;
- }
- int Counterpoint::ABS(int i) {if (i < 0) return(-i); else return(i);}
-- int Counterpoint::MIN(int a, int b) {if (a < b) return(a); else return(b);}
-- int Counterpoint::MAX(int a, int b) {if (a > b) return(a); else return(b);}
-+ int Counterpoint::IMIN(int a, int b) {if (a < b) return(a); else return(b);}
-+ int Counterpoint::IMAX(int a, int b) {if (a > b) return(a); else return(b);}
- void Counterpoint::ARRBLT(int *dest, int *source, int num) {int i; for (i=0;i<num;i++) dest[i]=source[i];} /* SAIL p51 */
-
- int Counterpoint::InMode(int Pitch, int Mode)
-@@ -294,8 +294,8 @@ void Counterpoint::toCsoundScore(std::st
- for (i=1;i<Cn;i++)
- {
- pit=Us(i,v);
-- Minp=MIN(Minp,pit);
-- Maxp=MAX(Maxp,pit);
-+ Minp=IMIN(Minp,pit);
-+ Maxp=IMAX(Maxp,pit);
- }
- return(Maxp-Minp);
- }
-@@ -316,7 +316,7 @@ void Counterpoint::toCsoundScore(std::st
- {
- int j,LowestPitch;
- LowestPitch=Cantus(Cn,v);
-- for (j=1;j<v;j++) LowestPitch=MIN(LowestPitch,Other(Cn,v,j));
-+ for (j=1;j<v;j++) LowestPitch=IMIN(LowestPitch,Other(Cn,v,j));
- return(LowestPitch);
- }
-
-@@ -993,7 +993,7 @@ void Counterpoint::toCsoundScore(std::st
- /* slightly frown upon leap back in the opposite direction */
- if ((Cn>2) && ((ASkip(MelInt)) && ((ASkip(LastMelInt)) && (!(SameDir)))))
- {
-- Val += (MAX(0,((ABS(MelInt)+ABS(LastMelInt))-8)));
-+ Val += (IMAX(0,((ABS(MelInt)+ABS(LastMelInt))-8)));
- if ((Cn>3) && (ASkip(LastCp2-LastCp3))) Val += ThreeSkipsPenalty;
- }
-
-@@ -1009,7 +1009,7 @@ void Counterpoint::toCsoundScore(std::st
- if ((Us(k,v)-Cantus(k,v))*(Us(k-1,v)-Cantus(k-1,v)) < 0) Cross++;
- }
- }
-- if (Cross > 0) Val += (MAX(0,((Cross-2)*3)));
-+ if (Cross > 0) Val += (IMAX(0,((Cross-2)*3)));
-
- /* don't repeat note on upbeat */
- if (UpBeat(Cn,v) && (MelInt == Unison)) Val += RepetitionOnUpbeatPenalty;
-@@ -1107,7 +1107,7 @@ void Counterpoint::toCsoundScore(std::st
- }
- }
- BestFitPenalty=CurrentPenalty+Penalty;
-- MaxPenalty=MIN(int(BestFitPenalty*PenaltyRatio),MaxPenalty);
-+ MaxPenalty=IMIN(int(BestFitPenalty*PenaltyRatio),MaxPenalty);
- /* AllDone=1; */
- Fits[2]=Fits[1]; Fits[1]=Fits[0]; Fits[0]=BestFitPenalty;
- for (v=1;v<=v1;v++)
-@@ -1164,7 +1164,7 @@ void Counterpoint::toCsoundScore(std::st
- {
- for (i=1;i<=NumParts;i++) Pens[x-i]=Is[i];
- }
-- else NewLim=MIN(NewLim,penalty);
-+ else NewLim=IMIN(NewLim,penalty);
- }
- }
- }
-@@ -1196,7 +1196,7 @@ void Counterpoint::toCsoundScore(std::st
- for (i=0;i<=NumParts;i++)
- {
- OurTime=Onset(VIndex(CurTime,i)+1,i);
-- if (OurTime != 0) NextTime=MIN(NextTime,OurTime);
-+ if (OurTime != 0) NextTime=IMIN(NextTime,OurTime);
- }
- for (i=1;i<=NumParts;i++)
- {
-@@ -1289,8 +1289,8 @@ void Counterpoint::toCsoundScore(std::st
- {
- int i;
- i=(int)(RANDOM(10.0));
-- if (CurRhy(i) > CurRhy(MAX(1,(i-1)))) return(MAX(1,(i-1)));
-- if (CurRhy(i) <= CurRhy(MIN(9,(i+1)))) return(MIN(9,(i+1)));
-+ if (CurRhy(i) > CurRhy(IMAX(1,(i-1)))) return(IMAX(1,(i-1)));
-+ if (CurRhy(i) <= CurRhy(IMIN(9,(i+1)))) return(IMIN(9,(i+1)));
- return(i);
- }
-
diff --git a/audio/csound6/files/patch-frontends__CsoundAC__Counterpoint.hpp b/audio/csound6/files/patch-frontends__CsoundAC__Counterpoint.hpp
deleted file mode 100644
index 196e5f670006..000000000000
--- a/audio/csound6/files/patch-frontends__CsoundAC__Counterpoint.hpp
+++ /dev/null
@@ -1,13 +0,0 @@
---- frontends/CsoundAC/Counterpoint.hpp.orig 2015-04-25 19:06:23 UTC
-+++ frontends/CsoundAC/Counterpoint.hpp
-@@ -102,8 +102,8 @@ public:
- Counterpoint();
- virtual ~Counterpoint();
- int ABS(int i);
-- int MIN(int a, int b);
-- int MAX(int a, int b);
-+ int IMIN(int a, int b);
-+ int IMAX(int a, int b);
- void ARRBLT(int *dest, int *source, int num);
- enum
- {