diff --git a/CMakeLists.txt b/CMakeLists.txt index 715b4e5..f054db9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,12 +19,11 @@ enable_testing() #add_subdirectory("submodules/pipedal_p2pd") add_subdirectory("modules/SQLiteCpp") -set(SDBUSCPP_BUILD_CODEGEN on) +set(SDBUSCPP_BUILD_CODEGEN off) set(SDBUSCPP_INSTALL off) set(SDBUSCPP_BUILD_DOCS off) set(SDBUSCPP_BUILD_DOXYGEN_DOCS off) set(SDBUSCPP_BUILD_TESTS off) -#set(BUILD_SHARED_LIBS on) add_subdirectory("modules/sdbus-cpp") diff --git a/PiPedalCommon/src/RegDb.cpp b/PiPedalCommon/src/RegDb.cpp index 3b08a40..262eeec 100644 --- a/PiPedalCommon/src/RegDb.cpp +++ b/PiPedalCommon/src/RegDb.cpp @@ -305,8 +305,8 @@ using u8 = uint8_t; using u16 = uint16_t; using u32 = uint32_t; -using __be32 = BigEndian; -using __be16 = BigEndian; +using s__be32 = BigEndian; +using s__be16 = BigEndian; #define BIT(n) (1 << n) template @@ -349,7 +349,7 @@ bool regdb_has_valid_signature(const u8 *data, unsigned int size) { return true; struct fwdb_country { u8 alpha2[2]; - __be16 coll_ptr; + s__be16 coll_ptr; /* this struct cannot be extended */ } __packed __aligned(4); @@ -359,13 +359,13 @@ struct fwdb_collection u8 n_rules; u8 dfs_region; /* no optional data yet */ - /* aligned to 2, then followed by __be16 array of rule pointers */ + /* aligned to 2, then followed by s__be16 array of rule pointers */ } __packed __aligned(4); struct fwdb_header { - __be32 magic; - __be32 version; + s__be32 magic; + s__be32 version; struct fwdb_country country[]; } __packed __aligned(4); @@ -382,7 +382,7 @@ struct fwdb_wmm_ac { u8 ecw; u8 aifsn; - __be16 cot; + s__be16 cot; } __packed; struct fwdb_wmm_rule @@ -395,11 +395,11 @@ struct fwdb_rule { u8 len; u8 flags; - __be16 max_eirp; - __be32 start, end, max_bw; + s__be16 max_eirp; + s__be32 start, end, max_bw; /* start of optional data */ - __be16 cac_timeout; - __be16 wmm_ptr; + s__be16 cac_timeout; + s__be16 wmm_ptr; } __packed __aligned(4); #define FWDB_MAGIC 0x52474442 @@ -462,7 +462,7 @@ static bool valid_country(const u8 *data, unsigned int size, { unsigned int ptr = be16_to_cpu(country->coll_ptr) << 2; struct fwdb_collection *coll = (struct fwdb_collection *)(data + ptr); - __be16 *rules_ptr; + s__be16 *rules_ptr; unsigned int i; /* make sure we can read len/n_rules */ @@ -479,7 +479,7 @@ static bool valid_country(const u8 *data, unsigned int size, if (coll->len < offsetofend(struct fwdb_collection, dfs_region)) return false; - rules_ptr = (__be16 *)((u8 *)coll + ALIGN(coll->len, 2)); + rules_ptr = (s__be16 *)((u8 *)coll + ALIGN(coll->len, 2)); for (i = 0; i < coll->n_rules; i++) { @@ -578,7 +578,7 @@ static WifiRegulations regdb_load_country(const struct fwdb_header *db, for (i = 0; i < nRules; i++) { - const __be16 *rules_ptr = (const __be16 *)((u8 *)coll + ALIGN(coll->len, 2)); + const s__be16 *rules_ptr = (const s__be16 *)((u8 *)coll + ALIGN(coll->len, 2)); unsigned int rule_ptr = be16_to_cpu(rules_ptr[i]) << 2; struct fwdb_rule *rule = (fwdb_rule *)((u8 *)db + rule_ptr); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 61ff821..97a2ffb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -846,7 +846,7 @@ add_custom_command(OUTPUT ${REACT_NOTICES_FILE} COMMAND "$" --output ${REACT_NOTICES_FILE} --projectCopyright ${DEBIAN_COPYRIGHT_FILE} - liblilv-0-0 ${BOOST_COPYRIGHT_DIR} lv2-dev libsdbus-c++-dev librsvg2-2 libpango-1.0-0 libx11-6 libxrandr2 + liblilv-0-0 ${BOOST_COPYRIGHT_DIR} lv2-dev librsvg2-2 libpango-1.0-0 libx11-6 libxrandr2 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${DEBIAN_COPYRIGHT_FILE} "$" COMMENT "Updating copyright notices." diff --git a/src/Locale.cpp b/src/Locale.cpp index 8b56117..6d80cc3 100644 --- a/src/Locale.cpp +++ b/src/Locale.cpp @@ -36,7 +36,7 @@ #include "Utf8Utils.hpp" #include -#define U_SHOW_CPLUSPLUS_API 0 +#define U_SHOW_CPLUSPLUS_API 1 #include #include "Lv2Log.hpp" diff --git a/todo.txt b/todo.txt index 569d9c8..e66b1d2 100644 --- a/todo.txt +++ b/todo.txt @@ -1,3 +1,5 @@ +add apt install expat + Carla Project icons. check reload after change of LV2 plugins. @@ -5,10 +7,6 @@ check reload after change of LV2 plugins. Exactly one underrun per seek in Toob Player -check filetime conversion in gcc 12.2! (missing c++ 20 time conversion functions) - AudioFiles.cpp fileTimeToInt64 - - json "skip" code doesn't work with complex objects (MidiChannelBinding specifically). - pipewire aux in?