| @@ -23,10 +23,13 @@ | |||||
| *.dmg | *.dmg | ||||
| *.dylib | *.dylib | ||||
| *.exe | *.exe | ||||
| *.html | |||||
| *.js | |||||
| *.msi | *.msi | ||||
| *.so | *.so | ||||
| *.vst | *.vst | ||||
| *.vst3 | *.vst3 | ||||
| *.wasm | |||||
| # Binary dir | # Binary dir | ||||
| /bin/ansi-pedantic-test_* | /bin/ansi-pedantic-test_* | ||||
| @@ -51,6 +51,8 @@ | |||||
| # define CARLA_OS_BSD | # define CARLA_OS_BSD | ||||
| #elif defined(__GNU__) | #elif defined(__GNU__) | ||||
| # define CARLA_OS_GNU_HURD | # define CARLA_OS_GNU_HURD | ||||
| #elif defined(__EMSCRIPTEN__) | |||||
| # define CARLA_OS_WASM | |||||
| #else | #else | ||||
| # warning Unsupported platform! | # warning Unsupported platform! | ||||
| #endif | #endif | ||||
| @@ -110,6 +112,13 @@ | |||||
| # define P_UINTPTR "%x" | # define P_UINTPTR "%x" | ||||
| # define P_SIZE "%u" | # define P_SIZE "%u" | ||||
| # define P_SSIZE "%i" | # define P_SSIZE "%i" | ||||
| #elif defined(CARLA_OS_WASM) | |||||
| # define P_INT64 "%lli" | |||||
| # define P_UINT64 "%llu" | |||||
| # define P_INTPTR "%li" | |||||
| # define P_UINTPTR "%lx" | |||||
| # define P_SIZE "%lu" | |||||
| # define P_SSIZE "%li" | |||||
| #elif defined(CARLA_OS_MAC) | #elif defined(CARLA_OS_MAC) | ||||
| # define P_INT64 "%lli" | # define P_INT64 "%lli" | ||||
| # define P_UINT64 "%llu" | # define P_UINT64 "%llu" | ||||
| @@ -23,7 +23,9 @@ | |||||
| #endif | #endif | ||||
| #include "ysfx_utils.hpp" | #include "ysfx_utils.hpp" | ||||
| #ifndef __EMSCRIPTEN__ | |||||
| #include <fts.h> | #include <fts.h> | ||||
| #endif | |||||
| #include <string> | #include <string> | ||||
| #include <cstring> | #include <cstring> | ||||
| @@ -31,6 +33,7 @@ namespace ysfx { | |||||
| void visit_directories(const char *rootpath, bool (*visit)(const std::string &, void *), void *data) | void visit_directories(const char *rootpath, bool (*visit)(const std::string &, void *), void *data) | ||||
| { | { | ||||
| #ifndef __EMSCRIPTEN__ | |||||
| char *argv[] = {(char *)rootpath, nullptr}; | char *argv[] = {(char *)rootpath, nullptr}; | ||||
| auto compar = [](const FTSENT **a, const FTSENT **b) -> int { | auto compar = [](const FTSENT **a, const FTSENT **b) -> int { | ||||
| @@ -53,6 +56,7 @@ void visit_directories(const char *rootpath, bool (*visit)(const std::string &, | |||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| #endif | |||||
| } | } | ||||
| } // namespace ysfx | } // namespace ysfx | ||||