93 lines
2.6 KiB
Diff
93 lines
2.6 KiB
Diff
From e9a2e27d96e8951cb5a55601102def04e93ae4b3 Mon Sep 17 00:00:00 2001
|
|
From: heppen <hepeng68@huawei.com>
|
|
Date: Fri, 26 May 2023 09:52:04 +0800
|
|
Subject: [PATCH] =?UTF-8?q?commonlibrary/c=5Futils:=20=E5=A4=B4=E6=96=87?=
|
|
=?UTF-8?q?=E4=BB=B6=E7=BC=BA=E5=A4=B1/=E7=B1=BB=E5=9E=8B=E8=BD=AC?=
|
|
=?UTF-8?q?=E6=8D=A2=E4=B8=8D=E5=8C=B9=E9=85=8D=E4=B8=A4=E7=B1=BB=E7=BC=96?=
|
|
=?UTF-8?q?=E8=AF=91=E9=97=AE=E9=A2=98=E8=A7=A3=E5=86=B3?=
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
---
|
|
base/src/event_reactor.h | 1 +
|
|
base/src/file_ex.cpp | 3 ++-
|
|
base/src/parcel.cpp | 1 +
|
|
base/src/string_ex.cpp | 2 ++
|
|
base/src/thread_pool.cpp | 1 +
|
|
5 files changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/base/src/event_reactor.h b/base/src/event_reactor.h
|
|
index 794e44a5..1a282ec5 100644
|
|
--- a/base/src/event_reactor.h
|
|
+++ b/base/src/event_reactor.h
|
|
@@ -21,6 +21,7 @@
|
|
#include <memory>
|
|
#include <mutex>
|
|
#include <list>
|
|
+#include <functional>
|
|
|
|
namespace OHOS {
|
|
namespace Utils {
|
|
diff --git a/base/src/file_ex.cpp b/base/src/file_ex.cpp
|
|
index 578b1bea..a9e05727 100644
|
|
--- a/base/src/file_ex.cpp
|
|
+++ b/base/src/file_ex.cpp
|
|
@@ -24,6 +24,7 @@
|
|
#include <cstdio>
|
|
#include <securec.h>
|
|
#include <cstring>
|
|
+#include <limits.h>
|
|
#include "directory_ex.h"
|
|
#include "utils_log.h"
|
|
|
|
@@ -262,7 +263,7 @@ bool SaveBufferToFile(const string& filePath, const vector<char>& content, bool
|
|
}
|
|
|
|
// if the file is not exist,create it first!
|
|
- uint32_t mode = truncated ? (ios::out | ios::binary | ios::trunc) : (ios::out | ios::binary | ios::app);
|
|
+ ios_base::openmode mode = truncated ? (ios::out | ios::binary | ios::trunc) : (ios::out | ios::binary | ios::app);
|
|
ofstream file;
|
|
file.open(filePath.c_str(), mode);
|
|
if (!file.is_open()) {
|
|
diff --git a/base/src/parcel.cpp b/base/src/parcel.cpp
|
|
index 4d623532..b0012bc8 100644
|
|
--- a/base/src/parcel.cpp
|
|
+++ b/base/src/parcel.cpp
|
|
@@ -16,6 +16,7 @@
|
|
#include "parcel.h"
|
|
#include "securec.h"
|
|
#include "utils_log.h"
|
|
+#include <limits.h>
|
|
|
|
namespace OHOS {
|
|
|
|
diff --git a/base/src/string_ex.cpp b/base/src/string_ex.cpp
|
|
index 32340ae1..782e4193 100644
|
|
--- a/base/src/string_ex.cpp
|
|
+++ b/base/src/string_ex.cpp
|
|
@@ -20,6 +20,8 @@
|
|
#include <iostream>
|
|
#include <iomanip>
|
|
#include <sstream>
|
|
+#include <algorithm>
|
|
+#include <limits.h>
|
|
using namespace std;
|
|
|
|
namespace OHOS {
|
|
diff --git a/base/src/thread_pool.cpp b/base/src/thread_pool.cpp
|
|
index 9951929f..b4e663c2 100644
|
|
--- a/base/src/thread_pool.cpp
|
|
+++ b/base/src/thread_pool.cpp
|
|
@@ -19,6 +19,7 @@
|
|
|
|
#include <memory>
|
|
#include <pthread.h>
|
|
+#include <cstring>
|
|
|
|
namespace OHOS {
|
|
|
|
--
|
|
2.33.0
|
|
|