projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
re-do previous commit
[ardour.git]
/
libs
/
fst
/
scanner.cc
diff --git
a/libs/fst/scanner.cc
b/libs/fst/scanner.cc
index b2041d60310f3eea3132c6ee288807a85e323f23..d56bdb168c5ce1b5b403392ef0ce43818078dfdb 100644
(file)
--- a/
libs/fst/scanner.cc
+++ b/
libs/fst/scanner.cc
@@
-3,10
+3,16
@@
#include <string.h>
#include <vector>
#include <string.h>
#include <vector>
+#include <glib.h>
+
#include "pbd/pbd.h"
#include "pbd/transmitter.h"
#include "pbd/receiver.h"
#include "pbd/pbd.h"
#include "pbd/transmitter.h"
#include "pbd/receiver.h"
+#ifdef __MINGW64__
+#define NO_OLDNAMES // no backwards compat _pid_t, conflict with w64 pthread/sched
+#endif
+
#include "ardour/filesystem_paths.h"
#ifdef LXVST_SUPPORT
#include "ardour/linux_vst_support.h"
#include "ardour/filesystem_paths.h"
#ifdef LXVST_SUPPORT
#include "ardour/linux_vst_support.h"
@@
-71,7
+77,12
@@
int main (int argc, char **argv) {
char *dllpath = NULL;
if (argc == 3 && !strcmp("-f", argv[1])) {
dllpath = argv[2];
char *dllpath = NULL;
if (argc == 3 && !strcmp("-f", argv[1])) {
dllpath = argv[2];
- if (strstr (dllpath, ".so" ) || strstr(dllpath, ".dll")) {
+ const size_t slen = strlen (dllpath);
+ if (
+ (slen > 3 && 0 == g_ascii_strcasecmp (&dllpath[slen-3], ".so"))
+ ||
+ (slen > 4 && 0 == g_ascii_strcasecmp (&dllpath[slen-4], ".dll"))
+ ) {
vstfx_remove_infofile(dllpath);
vstfx_un_blacklist(dllpath);
}
vstfx_remove_infofile(dllpath);
vstfx_un_blacklist(dllpath);
}
@@
-93,15
+104,16
@@
int main (int argc, char **argv) {
std::vector<VSTInfo *> *infos = 0;
std::vector<VSTInfo *> *infos = 0;
+ const size_t slen = strlen (dllpath);
if (0) { }
#ifdef LXVST_SUPPORT
if (0) { }
#ifdef LXVST_SUPPORT
- else if (s
trstr (dllpath
, ".so")) {
+ else if (s
len > 3 && 0 == g_ascii_strcasecmp (&dllpath[slen-3]
, ".so")) {
infos = vstfx_get_info_lx(dllpath);
}
#endif
#ifdef WINDOWS_VST_SUPPORT
infos = vstfx_get_info_lx(dllpath);
}
#endif
#ifdef WINDOWS_VST_SUPPORT
- else if (s
trstr (dllpath
, ".dll")) {
+ else if (s
len > 4 && 0 == g_ascii_strcasecmp (&dllpath[slen-4]
, ".dll")) {
infos = vstfx_get_info_fst(dllpath);
}
#endif
infos = vstfx_get_info_fst(dllpath);
}
#endif