forked from Green-Sky/tomato
Squashed 'external/toxcore/c-toxcore/' changes from 640e6cace..e58eb27a8
e58eb27a8 fix(toxav): remove extra copy of video frame on encode Tested and works, but there might be alignment issues and other stuff. 206ea3530 refactor: Explicitly pass dependencies to constructors. 7cefa93cf fix(toxencryptsave): Wipe salt and passkey after usage. 7c3be2342 refactor: Add file/line to tox-bootstrapd logging. f84e8cdce refactor: Move loglogdata out of network.c. 390f7db06 refactor: Move random and memory OS-specifics to `os_*` files. REVERT: 640e6cace fix(toxav): remove extra copy of video frame on encode Tested and works, but there might be alignment issues and other stuff. git-subtree-dir: external/toxcore/c-toxcore git-subtree-split: e58eb27a84f9fa0cd996868e079f39e90a5c04b6
This commit is contained in:
@@ -39,6 +39,12 @@ cc_library(
|
||||
visibility = ["//c-toxcore:__subpackages__"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "tox_attributes",
|
||||
hdrs = ["tox_attributes.h"],
|
||||
visibility = ["//c-toxcore:__subpackages__"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "ccompat",
|
||||
srcs = ["ccompat.c"],
|
||||
@@ -47,6 +53,59 @@ cc_library(
|
||||
deps = [":attributes"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "tox_memory",
|
||||
srcs = ["tox_memory.c"],
|
||||
hdrs = [
|
||||
"tox_memory.h",
|
||||
"tox_memory_impl.h",
|
||||
],
|
||||
visibility = ["//c-toxcore:__subpackages__"],
|
||||
deps = [
|
||||
":ccompat",
|
||||
":tox_attributes",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "os_memory",
|
||||
srcs = ["os_memory.c"],
|
||||
hdrs = ["os_memory.h"],
|
||||
visibility = ["//c-toxcore:__subpackages__"],
|
||||
deps = [
|
||||
":attributes",
|
||||
":tox_memory",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "tox_random",
|
||||
srcs = ["tox_random.c"],
|
||||
hdrs = [
|
||||
"tox_random.h",
|
||||
"tox_random_impl.h",
|
||||
],
|
||||
visibility = ["//c-toxcore:__subpackages__"],
|
||||
deps = [
|
||||
":ccompat",
|
||||
":tox_attributes",
|
||||
":tox_memory",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "os_random",
|
||||
srcs = ["os_random.c"],
|
||||
hdrs = ["os_random.h"],
|
||||
visibility = ["//c-toxcore:__subpackages__"],
|
||||
deps = [
|
||||
":attributes",
|
||||
":ccompat",
|
||||
":tox_random",
|
||||
"@libsodium",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "mem",
|
||||
srcs = ["mem.c"],
|
||||
@@ -55,6 +114,7 @@ cc_library(
|
||||
deps = [
|
||||
":attributes",
|
||||
":ccompat",
|
||||
":tox_memory",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -65,7 +125,9 @@ cc_library(
|
||||
hdrs = ["mem_test_util.hh"],
|
||||
deps = [
|
||||
":mem",
|
||||
":os_memory",
|
||||
":test_util",
|
||||
":tox_memory",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -75,6 +137,7 @@ cc_test(
|
||||
srcs = ["mem_test.cc"],
|
||||
deps = [
|
||||
":mem",
|
||||
":os_memory",
|
||||
"@com_google_googletest//:gtest",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
@@ -208,6 +271,7 @@ cc_test(
|
||||
":bin_unpack",
|
||||
":logger",
|
||||
":mem",
|
||||
":os_memory",
|
||||
"@com_google_googletest//:gtest",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
@@ -222,6 +286,7 @@ cc_library(
|
||||
":attributes",
|
||||
":ccompat",
|
||||
":mem",
|
||||
":tox_random",
|
||||
":util",
|
||||
"@libsodium",
|
||||
],
|
||||
@@ -249,6 +314,7 @@ cc_library(
|
||||
deps = [
|
||||
":crypto_core",
|
||||
":test_util",
|
||||
":tox_random",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -285,6 +351,7 @@ cc_test(
|
||||
deps = [
|
||||
":list",
|
||||
":mem",
|
||||
":os_memory",
|
||||
"@com_google_googletest//:gtest",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
@@ -372,8 +439,14 @@ cc_library(
|
||||
|
||||
cc_library(
|
||||
name = "network",
|
||||
srcs = ["network.c"],
|
||||
hdrs = ["network.h"],
|
||||
srcs = [
|
||||
"net_log.c",
|
||||
"network.c",
|
||||
],
|
||||
hdrs = [
|
||||
"net_log.h",
|
||||
"network.h",
|
||||
],
|
||||
visibility = [
|
||||
"//c-toxcore/auto_tests:__pkg__",
|
||||
"//c-toxcore/other:__pkg__",
|
||||
@@ -1148,6 +1221,8 @@ cc_library(
|
||||
":net_profile",
|
||||
":network",
|
||||
":onion_client",
|
||||
":os_memory",
|
||||
":os_random",
|
||||
":state",
|
||||
":tox_log_level",
|
||||
":tox_options",
|
||||
@@ -1163,6 +1238,7 @@ cc_test(
|
||||
srcs = ["tox_test.cc"],
|
||||
deps = [
|
||||
":crypto_core",
|
||||
":os_random",
|
||||
":tox",
|
||||
":tox_log_level",
|
||||
":tox_options",
|
||||
|
||||
Reference in New Issue
Block a user