Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 147527 Details for
Bug 213139
media-libs/vamp-plugin-sdk-1.2 fails building with sys-devel/gcc-4.3
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
vamp-plugin-sdk-1.2-gcc4.3.patch
vamp-plugin-sdk-1.2-gcc4.3.patch (text/plain), 10.56 KB, created by
impulze
on 2008-03-28 10:45:40 UTC
(
hide
)
Description:
vamp-plugin-sdk-1.2-gcc4.3.patch
Filename:
MIME Type:
Creator:
impulze
Created:
2008-03-28 10:45:40 UTC
Size:
10.56 KB
patch
obsolete
>diff -Naur vamp-plugin-sdk-1.2.orig/vamp-sdk/PluginHostAdapter.cpp vamp-plugin-sdk-1.2/vamp-sdk/PluginHostAdapter.cpp >--- vamp-plugin-sdk-1.2.orig/vamp-sdk/PluginHostAdapter.cpp 2008-03-28 11:23:09.000000000 +0100 >+++ vamp-plugin-sdk-1.2/vamp-sdk/PluginHostAdapter.cpp 2008-03-28 11:24:53.000000000 +0100 >@@ -36,6 +36,7 @@ > > #include "PluginHostAdapter.h" > >+#include <cstdlib> // std::getenv > namespace Vamp > { > >@@ -63,7 +64,7 @@ > std::vector<std::string> path; > std::string envPath; > >- char *cpath = getenv("VAMP_PATH"); >+ char *cpath = std::getenv("VAMP_PATH"); > if (cpath) envPath = cpath; > > #ifdef _WIN32 >diff -Naur vamp-plugin-sdk-1.2.orig/vamp-sdk/PluginAdapter.cpp vamp-plugin-sdk-1.2/vamp-sdk/PluginAdapter.cpp >--- vamp-plugin-sdk-1.2.orig/vamp-sdk/PluginAdapter.cpp 2008-02-28 15:07:44.000000000 +0100 >+++ vamp-plugin-sdk-1.2/vamp-sdk/PluginAdapter.cpp 2008-03-28 11:35:27.000000000 +0100 >@@ -35,6 +35,8 @@ > */ > > #include "PluginAdapter.h" >+#include <cstring> // strdup (evil) :P >+#include <cstdlib> // std::malloc,free > > //#define DEBUG_PLUGIN_ADAPTER 1 > >@@ -181,13 +183,13 @@ > > m_descriptor.parameterCount = m_parameters.size(); > m_descriptor.parameters = (const VampParameterDescriptor **) >- malloc(m_parameters.size() * sizeof(VampParameterDescriptor)); >+ std::malloc(m_parameters.size() * sizeof(VampParameterDescriptor)); > > unsigned int i; > > for (i = 0; i < m_parameters.size(); ++i) { > VampParameterDescriptor *desc = (VampParameterDescriptor *) >- malloc(sizeof(VampParameterDescriptor)); >+ std::malloc(sizeof(VampParameterDescriptor)); > desc->identifier = strdup(m_parameters[i].identifier.c_str()); > desc->name = strdup(m_parameters[i].name.c_str()); > desc->description = strdup(m_parameters[i].description.c_str()); >@@ -200,7 +202,7 @@ > desc->valueNames = 0; > if (desc->isQuantized && !m_parameters[i].valueNames.empty()) { > desc->valueNames = (const char **) >- malloc((m_parameters[i].valueNames.size()+1) * sizeof(char *)); >+ std::malloc((m_parameters[i].valueNames.size()+1) * sizeof(char *)); > for (unsigned int j = 0; j < m_parameters[i].valueNames.size(); ++j) { > desc->valueNames[j] = strdup(m_parameters[i].valueNames[j].c_str()); > } >@@ -211,7 +213,7 @@ > > m_descriptor.programCount = m_programs.size(); > m_descriptor.programs = (const char **) >- malloc(m_programs.size() * sizeof(const char *)); >+ std::malloc(m_programs.size() * sizeof(const char *)); > > for (i = 0; i < m_programs.size(); ++i) { > m_descriptor.programs[i] = strdup(m_programs[i].c_str()); >@@ -261,31 +263,31 @@ > > if (!m_populated) return; > >- free((void *)m_descriptor.identifier); >- free((void *)m_descriptor.name); >- free((void *)m_descriptor.description); >- free((void *)m_descriptor.maker); >- free((void *)m_descriptor.copyright); >+ std::free((void *)m_descriptor.identifier); >+ std::free((void *)m_descriptor.name); >+ std::free((void *)m_descriptor.description); >+ std::free((void *)m_descriptor.maker); >+ std::free((void *)m_descriptor.copyright); > > for (unsigned int i = 0; i < m_descriptor.parameterCount; ++i) { > const VampParameterDescriptor *desc = m_descriptor.parameters[i]; >- free((void *)desc->identifier); >- free((void *)desc->name); >- free((void *)desc->description); >- free((void *)desc->unit); >+ std::free((void *)desc->identifier); >+ std::free((void *)desc->name); >+ std::free((void *)desc->description); >+ std::free((void *)desc->unit); > if (desc->valueNames) { > for (unsigned int j = 0; desc->valueNames[j]; ++j) { >- free((void *)desc->valueNames[j]); >+ std::free((void *)desc->valueNames[j]); > } >- free((void *)desc->valueNames); >+ std::free((void *)desc->valueNames); > } > } >- free((void *)m_descriptor.parameters); >+ std::free((void *)m_descriptor.parameters); > > for (unsigned int i = 0; i < m_descriptor.programCount; ++i) { >- free((void *)m_descriptor.programs[i]); >+ std::free((void *)m_descriptor.programs[i]); > } >- free((void *)m_descriptor.programs); >+ std::free((void *)m_descriptor.programs); > > if (m_adapterMap) { > >@@ -520,19 +522,19 @@ > std::cerr << "PluginAdapterBase::Impl::vampReleaseOutputDescriptor(" << desc << ")" << std::endl; > #endif > >- if (desc->identifier) free((void *)desc->identifier); >- if (desc->name) free((void *)desc->name); >- if (desc->description) free((void *)desc->description); >- if (desc->unit) free((void *)desc->unit); >+ if (desc->identifier) std::free((void *)desc->identifier); >+ if (desc->name) std::free((void *)desc->name); >+ if (desc->description) std::free((void *)desc->description); >+ if (desc->unit) std::free((void *)desc->unit); > if (desc->hasFixedBinCount && desc->binNames) { > for (unsigned int i = 0; i < desc->binCount; ++i) { > if (desc->binNames[i]) { >- free((void *)desc->binNames[i]); >+ std::free((void *)desc->binNames[i]); > } > } > } >- if (desc->binNames) free((void *)desc->binNames); >- free((void *)desc); >+ if (desc->binNames) std::free((void *)desc->binNames); >+ std::free((void *)desc); > } > > VampFeatureList * >@@ -583,13 +585,13 @@ > for (unsigned int i = 0; i < outputCount; ++i) { > for (unsigned int j = 0; j < m_fsizes[plugin][i]; ++j) { > if (list[i].features[j].label) { >- free(list[i].features[j].label); >+ std::free(list[i].features[j].label); > } > if (list[i].features[j].values) { >- free(list[i].features[j].values); >+ std::free(list[i].features[j].values); > } > } >- if (list[i].features) free(list[i].features); >+ if (list[i].features) std::free(list[i].features); > } > m_fs.erase(plugin); > m_fsizes.erase(plugin); >@@ -640,7 +642,7 @@ > (*m_pluginOutputs[plugin])[i]; > > VampOutputDescriptor *desc = (VampOutputDescriptor *) >- malloc(sizeof(VampOutputDescriptor)); >+ std::malloc(sizeof(VampOutputDescriptor)); > > desc->identifier = strdup(od.identifier.c_str()); > desc->name = strdup(od.name.c_str()); >@@ -651,7 +653,7 @@ > > if (od.hasFixedBinCount && od.binCount > 0) { > desc->binNames = (const char **) >- malloc(od.binCount * sizeof(const char *)); >+ std::malloc(od.binCount * sizeof(const char *)); > > for (unsigned int i = 0; i < od.binCount; ++i) { > if (i < od.binNames.size()) { >@@ -750,7 +752,7 @@ > feature->nsec = fl[j].timestamp.nsec; > feature->valueCount = fl[j].values.size(); > >- if (feature->label) free(feature->label); >+ if (feature->label) std::free(feature->label); > > if (fl[j].label.empty()) { > feature->label = 0; >diff -Naur vamp-plugin-sdk-1.2.orig/vamp-sdk/hostext/PluginLoader.cpp vamp-plugin-sdk-1.2/vamp-sdk/hostext/PluginLoader.cpp >--- vamp-plugin-sdk-1.2.orig/vamp-sdk/hostext/PluginLoader.cpp 2008-02-28 15:07:44.000000000 +0100 >+++ vamp-plugin-sdk-1.2/vamp-sdk/hostext/PluginLoader.cpp 2008-03-28 11:38:54.000000000 +0100 >@@ -42,6 +42,7 @@ > > #include <fstream> > #include <cctype> // tolower >+#include <cstring> // std::strlen > > #ifdef _WIN32 > >@@ -587,7 +588,7 @@ > > if (!e->d_name) continue; > >- size_t len = strlen(e->d_name); >+ size_t len = std::strlen(e->d_name); > if (len < extlen + 2 || > e->d_name + len - extlen - 1 != "." + extension) { > continue; >diff -Naur vamp-plugin-sdk-1.2.orig/host/vamp-simple-host.cpp vamp-plugin-sdk-1.2/host/vamp-simple-host.cpp >--- vamp-plugin-sdk-1.2.orig/host/vamp-simple-host.cpp 2008-02-28 15:07:44.000000000 +0100 >+++ vamp-plugin-sdk-1.2/host/vamp-simple-host.cpp 2008-03-28 11:42:18.000000000 +0100 >@@ -49,6 +49,8 @@ > #include "system.h" > > #include <cmath> >+#include <cstring> // std::strcmp,memset >+#include <cstdlib> // std::exit,atoi > > using namespace std; > >@@ -112,7 +114,7 @@ > " " << name << " -v\n\n" > " -- Display version information only.\n" > << endl; >- exit(2); >+ std::exit(2); > } > > int main(int argc, char **argv) >@@ -129,35 +131,35 @@ > > if (argc == 2) { > >- if (!strcmp(argv[1], "-v")) { >+ if (!std::strcmp(argv[1], "-v")) { > > cout << "Simple Vamp plugin host version: " << HOST_VERSION << endl > << "Vamp API version: " << VAMP_API_VERSION << endl > << "Vamp SDK version: " << VAMP_SDK_VERSION << endl; > return 0; > >- } else if (!strcmp(argv[1], "-l")) { >+ } else if (!std::strcmp(argv[1], "-l")) { > > printPluginPath(true); > enumeratePlugins(PluginInformation); > return 0; > >- } else if (!strcmp(argv[1], "-p")) { >+ } else if (!std::strcmp(argv[1], "-p")) { > > printPluginPath(false); > return 0; > >- } else if (!strcmp(argv[1], "--list-ids")) { >+ } else if (!std::strcmp(argv[1], "--list-ids")) { > > enumeratePlugins(PluginIds); > return 0; > >- } else if (!strcmp(argv[1], "--list-outputs")) { >+ } else if (!std::strcmp(argv[1], "--list-outputs")) { > > enumeratePlugins(PluginOutputIds); > return 0; > >- } else if (!strcmp(argv[1], "--list-by-category")) { >+ } else if (!std::strcmp(argv[1], "--list-by-category")) { > > printPluginCategoryList(); > return 0; >@@ -170,7 +172,7 @@ > bool useFrames = false; > > int base = 1; >- if (!strcmp(argv[1], "-s")) { >+ if (!std::strcmp(argv[1], "-s")) { > useFrames = true; > base = 2; > } >@@ -187,11 +189,11 @@ > int idx = base+2; > > if (isdigit(*argv[idx])) { >- outputNo = atoi(argv[idx++]); >+ outputNo = std::atoi(argv[idx++]); > } > > if (argc == idx + 2) { >- if (!strcmp(argv[idx], "-o")) { >+ if (!std::strcmp(argv[idx], "-o")) { > outfilename = argv[idx+1]; > } else usage(name); > } else if (argc != idx) { >@@ -248,7 +250,7 @@ > > SNDFILE *sndfile; > SF_INFO sfinfo; >- memset(&sfinfo, 0, sizeof(SF_INFO)); >+ std::memset(&sfinfo, 0, sizeof(SF_INFO)); > > sndfile = sf_open(wavname.c_str(), SFM_READ, &sfinfo); > if (!sndfile) {
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 213139
:
145898
| 147527 |
147529