diff --git a/dsoftbus/bounds_checking_function/0001-Adaptation-for-dsoftbus.patch b/dsoftbus/bounds_checking_function/0001-Adaptation-for-dsoftbus.patch index caf6533554d820aad062c90553496a4303b22a0a..e57ae485f2723d2682780ec833b4abbc47d3d84b 100644 --- a/dsoftbus/bounds_checking_function/0001-Adaptation-for-dsoftbus.patch +++ b/dsoftbus/bounds_checking_function/0001-Adaptation-for-dsoftbus.patch @@ -1,20 +1,20 @@ -From 286fc54c61750d56a1371c2bcbaa5725008bc644 Mon Sep 17 00:00:00 2001 +From f3054acbbb67d6e4889f3a7c2641dc1d74ee1984 Mon Sep 17 00:00:00 2001 From: "beiling.xie" -Date: Wed, 23 Mar 2022 23:15:52 +0800 +Date: Tue, 20 Sep 2022 09:45:38 +0800 Subject: [PATCH] Adaptation for dsoftbus Signed-off-by: beiling.xie --- - BUILD.gn | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 100 insertions(+) + BUILD.gn | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 114 insertions(+) create mode 100644 BUILD.gn diff --git a/BUILD.gn b/BUILD.gn new file mode 100644 -index 0000000..b7ece9b +index 0000000..9bec199 --- /dev/null +++ b/BUILD.gn -@@ -0,0 +1,100 @@ +@@ -0,0 +1,114 @@ +# Copyright (c) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. @@ -101,6 +101,20 @@ index 0000000..b7ece9b + head_files = [ "inlcude" ] + } +} else { ++ ohos_static_library("libsec_static") { ++ sources = libsec_sources ++ public_configs = [ ":libsec_public_config" ] ++ cflags = [ ++ "-D_INC_STRING_S", ++ "-D_INC_WCHAR_S", ++ "-D_SECIMP=//", ++ "-D_STDIO_S_DEFINED", ++ "-D_INC_STDIO_S", ++ "-D_INC_STDLIB_S", ++ "-D_INC_MEMORY_S", ++ ] ++ } ++ + ohos_shared_library("libsec_shared") { + sources = libsec_sources + public_configs = [ ":libsec_public_config" ] @@ -116,5 +130,5 @@ index 0000000..b7ece9b + } +} -- -2.27.0 +2.25.1 diff --git a/dsoftbus/depend/hilog/hilog.c b/dsoftbus/depend/hilog/hilog.c index 9271d2a84114a89e70111362e9ce8845d1127dc8..46d69f7ceb6e7ce02e9b3a1204c5ec23648516c3 100644 --- a/dsoftbus/depend/hilog/hilog.c +++ b/dsoftbus/depend/hilog/hilog.c @@ -3,6 +3,7 @@ #include #include #include "securec.h" +#include "hilog_base/log_base.h" #ifndef LOG_PRINT_MAX_LEN #define LOG_PRINT_MAX_LEN 256 diff --git a/dsoftbus/depend/hilog/include/hilog/log.h b/dsoftbus/depend/hilog/include/hilog/log.h index ac26e3647ab80b0ad00a00fc41c5ba2737ad4d1e..237ad7bb1005deb80dc3ef2819ef5347bd7ccc94 100644 --- a/dsoftbus/depend/hilog/include/hilog/log.h +++ b/dsoftbus/depend/hilog/include/hilog/log.h @@ -7,6 +7,16 @@ extern "C" { #endif #endif +// Log type +typedef enum { + LOG_TYPE_MIN = 0, + LOG_APP = 0, + // Log to kmsg, only used by init phase. + LOG_INIT = 1, + // Used by core service, framework. + LOG_CORE = 3, + LOG_TYPE_MAX +} LogType; char *adapterStrForPrintfFormat(const char *fmt); void printfAdapter(const char *fmt, ...); @@ -16,6 +26,7 @@ void printfAdapter(const char *fmt, ...); #define HILOG_WARN(type, fmt, ...) printfAdapter(fmt"\n", ##__VA_ARGS__) #define HILOG_ERROR(type, fmt, ...) printfAdapter(fmt"\n", ##__VA_ARGS__) #define HiLogPrint(type, level, domain, tag, fmt, ...) printf(fmt"\n", ##__VA_ARGS__) +#define HiLogBasePrint(type, level, domain, tag, fmt, ...) printfAdapter(fmt"\n", ##__VA_ARGS__) #ifdef __cplusplus #if __cplusplus diff --git a/dsoftbus/depend/hilog/include/hilog_base/log_base.h b/dsoftbus/depend/hilog/include/hilog_base/log_base.h new file mode 100644 index 0000000000000000000000000000000000000000..b3e84fb7d2f34590a9d0e9daff19be309808ec3a --- /dev/null +++ b/dsoftbus/depend/hilog/include/hilog_base/log_base.h @@ -0,0 +1 @@ +#include diff --git a/dsoftbus/third_party/cJSON/third_party_cJSON-OpenHarmony-v3.0.2-LTS.zip b/dsoftbus/third_party/cJSON/third_party_cJSON-OpenHarmony-v3.1.2-Release.zip similarity index 77% rename from dsoftbus/third_party/cJSON/third_party_cJSON-OpenHarmony-v3.0.2-LTS.zip rename to dsoftbus/third_party/cJSON/third_party_cJSON-OpenHarmony-v3.1.2-Release.zip index 80857cd3fc65ea13e1a94e264e3f297abea5a5eb..74918f80bd003ca5102fa7b3f734ca7e71359560 100644 Binary files a/dsoftbus/third_party/cJSON/third_party_cJSON-OpenHarmony-v3.0.2-LTS.zip and b/dsoftbus/third_party/cJSON/third_party_cJSON-OpenHarmony-v3.1.2-Release.zip differ diff --git a/dsoftbus/third_party/jinja2/third_party_jinja2-OpenHarmony-v3.0.2-LTS.zip b/dsoftbus/third_party/jinja2/third_party_jinja2-OpenHarmony-v3.1.2-Release.zip similarity index 43% rename from dsoftbus/third_party/jinja2/third_party_jinja2-OpenHarmony-v3.0.2-LTS.zip rename to dsoftbus/third_party/jinja2/third_party_jinja2-OpenHarmony-v3.1.2-Release.zip index 4a7f9b72764f45f6b57e1a29f28210e1ad353cc2..d094bd2bb6f6aeb91bf0cb4e0a95a9373da433e3 100644 Binary files a/dsoftbus/third_party/jinja2/third_party_jinja2-OpenHarmony-v3.0.2-LTS.zip and b/dsoftbus/third_party/jinja2/third_party_jinja2-OpenHarmony-v3.1.2-Release.zip differ diff --git a/dsoftbus/third_party/libcoap/third_party_libcoap-OpenHarmony-v3.1.2-Release.zip b/dsoftbus/third_party/libcoap/third_party_libcoap-OpenHarmony-v3.1.2-Release.zip new file mode 100644 index 0000000000000000000000000000000000000000..583618775d560b95f6cb0a6733daba097bb410fe Binary files /dev/null and b/dsoftbus/third_party/libcoap/third_party_libcoap-OpenHarmony-v3.1.2-Release.zip differ diff --git a/dsoftbus/third_party/markupsafe/third_party_markupsafe-OpenHarmony-v3.0.2-LTS.zip b/dsoftbus/third_party/markupsafe/third_party_markupsafe-OpenHarmony-v3.0.2-LTS.zip deleted file mode 100644 index 6156e28d92fce4759be119ab4e34b636d8feaf90..0000000000000000000000000000000000000000 Binary files a/dsoftbus/third_party/markupsafe/third_party_markupsafe-OpenHarmony-v3.0.2-LTS.zip and /dev/null differ diff --git a/dsoftbus/third_party/markupsafe/third_party_markupsafe-OpenHarmony-v3.1.2-Release.zip b/dsoftbus/third_party/markupsafe/third_party_markupsafe-OpenHarmony-v3.1.2-Release.zip new file mode 100644 index 0000000000000000000000000000000000000000..81370b1f6eff951576d4a288d97f40907bbc3e76 Binary files /dev/null and b/dsoftbus/third_party/markupsafe/third_party_markupsafe-OpenHarmony-v3.1.2-Release.zip differ diff --git a/dsoftbus/utils/0001-Adaptation-for-dsoftbus.patch b/dsoftbus/utils/0001-Adaptation-for-dsoftbus.patch index d350e76a074545ab47628fbed974e95cb96d7c2f..8af30abe164ea14ceee0870472e08f112fca14f1 100644 --- a/dsoftbus/utils/0001-Adaptation-for-dsoftbus.patch +++ b/dsoftbus/utils/0001-Adaptation-for-dsoftbus.patch @@ -1,39 +1,19 @@ -From ecb011a769e1b403a9b0d4203ac3f8b7c1c77228 Mon Sep 17 00:00:00 2001 +From 28bfe4c02841e82fa67ade0665e31a2cec617f5a Mon Sep 17 00:00:00 2001 From: "beiling.xie" -Date: Wed, 23 Mar 2022 22:48:56 +0800 +Date: Tue, 20 Sep 2022 09:40:28 +0800 Subject: [PATCH] Adaptation for dsoftbus Signed-off-by: beiling.xie --- - base/BUILD.gn | 145 +------------------------------------------- - base/src/parcel.cpp | 1 + - 2 files changed, 4 insertions(+), 142 deletions(-) + base/BUILD.gn | 21 +-------------------- + base/src/parcel.cpp | 1 + + 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/base/BUILD.gn b/base/BUILD.gn -index 318bbe7..2c9d6db 100644 +index 883b1ec..5785192 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -14,161 +14,22 @@ import("//build/ohos.gni") - - ############################################################################### - config("utils_config") { -- visibility = [ ":*" ] - include_dirs = [ - "include", -- "//developtools/liblog", -- ] -- cflags = [] -- if (current_os == "mingw") { -- cflags += [ "-Wno-error=inconsistent-dllimport" ] -- } --} -- --config("static_utils_config") { -- visibility = [ ":*" ] -- include_dirs = [ -- "include", -- "//developtools/liblog", - ] +@@ -38,24 +38,8 @@ config("static_utils_config") { } sources_utils = [ @@ -55,141 +35,47 @@ index 318bbe7..2c9d6db 100644 - "src/timer_event_handler.cpp", - "src/ashmem.cpp", - "src/rwlock.cpp", -- "src/securec/fscanf_s.c", -- "src/securec/fwscanf_s.c", -- "src/securec/gets_s.c", -- "src/securec/memcpy_s.c", -- "src/securec/memmove_s.c", -- "src/securec/memset_s.c", -- "src/securec/scanf_s.c", -- "src/securec/securecutil.c", -- "src/securec/secureinput_a.c", -- "src/securec/secureinput_w.c", -- "src/securec/secureprintoutput_a.c", -- "src/securec/secureprintoutput_w.c", -- "src/securec/snprintf_s.c", -- "src/securec/sprintf_s.c", -- "src/securec/sscanf_s.c", -- "src/securec/strcat_s.c", -- "src/securec/strcpy_s.c", -- "src/securec/strncat_s.c", -- "src/securec/strncpy_s.c", -- "src/securec/strtok_s.c", -- "src/securec/swprintf_s.c", -- "src/securec/swscanf_s.c", -- "src/securec/vfscanf_s.c", -- "src/securec/vfwscanf_s.c", -- "src/securec/vscanf_s.c", -- "src/securec/vsnprintf_s.c", -- "src/securec/vsprintf_s.c", -- "src/securec/vsscanf_s.c", -- "src/securec/vswprintf_s.c", -- "src/securec/vswscanf_s.c", -- "src/securec/vwscanf_s.c", -- "src/securec/wcscat_s.c", -- "src/securec/wcscpy_s.c", -- "src/securec/wcsncat_s.c", -- "src/securec/wcsncpy_s.c", -- "src/securec/wcstok_s.c", -- "src/securec/wmemcpy_s.c", -- "src/securec/wmemmove_s.c", -- "src/securec/wscanf_s.c", ] --ohos_static_library("utilsbase") { -- sources = sources_utils -- configs = [ ":utils_config" ] -- defines = [ "CONFIG_HILOG" ] -- external_deps = [ "hiviewdfx_hilog_native:libhilog" ] --} -- - ohos_shared_library("utils") { - sources = sources_utils -- configs = [ ":utils_config" ] -- subsystem_name = "utils" -- defines = [ "CONFIG_HILOG" ] -- external_deps = [ "hiviewdfx_hilog_native:libhilog" ] -- part_name = "utils_base" -- install_images = [ -- "system", -- "updater", -- ] --} -- --securec_sources = [ -- "src/securec/fscanf_s.c", -- "src/securec/fwscanf_s.c", -- "src/securec/gets_s.c", -- "src/securec/memcpy_s.c", -- "src/securec/memmove_s.c", -- "src/securec/memset_s.c", -- "src/securec/scanf_s.c", -- "src/securec/securecutil.c", -- "src/securec/secureinput_a.c", -- "src/securec/secureinput_w.c", -- "src/securec/secureprintoutput_a.c", -- "src/securec/secureprintoutput_w.c", -- "src/securec/snprintf_s.c", -- "src/securec/sprintf_s.c", -- "src/securec/sscanf_s.c", -- "src/securec/strcat_s.c", -- "src/securec/strcpy_s.c", -- "src/securec/strncat_s.c", -- "src/securec/strncpy_s.c", -- "src/securec/strtok_s.c", -- "src/securec/swprintf_s.c", -- "src/securec/swscanf_s.c", -- "src/securec/vfscanf_s.c", -- "src/securec/vfwscanf_s.c", -- "src/securec/vscanf_s.c", -- "src/securec/vsnprintf_s.c", -- "src/securec/vsnprintf_s_p.c", -- "src/securec/vsprintf_s.c", -- "src/securec/vsscanf_s.c", -- "src/securec/vswprintf_s.c", -- "src/securec/vswscanf_s.c", -- "src/securec/vwscanf_s.c", -- "src/securec/wcscat_s.c", -- "src/securec/wcscpy_s.c", -- "src/securec/wcsncat_s.c", -- "src/securec/wcsncpy_s.c", -- "src/securec/wcstok_s.c", -- "src/securec/wmemcpy_s.c", -- "src/securec/wmemmove_s.c", -- "src/securec/wscanf_s.c", --] -- --ohos_static_library("utilsecurec") { -- sources = securec_sources -- configs = [ ":utils_config" ] -+ public_configs = [ ":utils_config" ] -+ deps = [ "//third_party/bounds_checking_function:libsec_shared" ] + securec_sources = [ +@@ -110,7 +94,6 @@ ohos_static_library("utilsbase") { + ] + public_configs = [ ":static_utils_config" ] + defines = [ "CONFIG_HILOG" ] +- external_deps = [ "hilog_native:libhilog_base" ] } --ohos_shared_library("utilsecurec_shared") { -- sources = securec_sources -- configs = [ ":utils_config" ] -- public_configs = [ ":utils_config" ] + ohos_shared_library("utils") { +@@ -123,8 +106,7 @@ ohos_shared_library("utils") { + public_configs = [ ":static_utils_config" ] + subsystem_name = "utils" + defines = [ "CONFIG_HILOG" ] +- external_deps = [ "hilog_native:libhilog_base" ] - part_name = "utils_base" -- install_images = [ -- "system", -- "updater", -- ] -+group("utilsecurec_shared") { - } - ############################################################################### ++ external_deps = [ "hiviewdfx_hilog_native:libhilog" ] + install_images = [ + "system", + "updater", +@@ -166,7 +148,6 @@ ohos_shared_library("utilsecurec_shared") { + ":private_securec_config", + ] + public_configs = [ ":utils_config" ] +- part_name = "utils_base" + install_images = [ + "system", + "updater", diff --git a/base/src/parcel.cpp b/base/src/parcel.cpp -index 83621f2..915f8ca 100755 +index 855f7cf..1abaec5 100755 --- a/base/src/parcel.cpp +++ b/base/src/parcel.cpp -@@ -16,6 +16,7 @@ +@@ -13,6 +13,7 @@ + * limitations under the License. + */ + ++#include #include "parcel.h" #include "securec.h" #include "utils_log.h" -+#include - - namespace OHOS { - -- -2.27.0 +2.25.1 diff --git a/dsoftbus/utils/utils_native-OpenHarmony-v3.0.2-LTS.zip b/dsoftbus/utils/commonlibrary_c_utils-OpenHarmony-v3.1.2-Release.zip similarity index 50% rename from dsoftbus/utils/utils_native-OpenHarmony-v3.0.2-LTS.zip rename to dsoftbus/utils/commonlibrary_c_utils-OpenHarmony-v3.1.2-Release.zip index f1ceb9e096d0b3bfaf662f3733285cef4f9c0ba7..f72030507e34304d540c03e4ac639ed10b22bb51 100644 Binary files a/dsoftbus/utils/utils_native-OpenHarmony-v3.0.2-LTS.zip and b/dsoftbus/utils/commonlibrary_c_utils-OpenHarmony-v3.1.2-Release.zip differ