Skip to content

Commit

Permalink
fix build error in linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
huiguangjun committed Nov 15, 2019
1 parent 8f757be commit e36869b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
5 changes: 3 additions & 2 deletions sdk/src/ResumableBaseWorker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
*/

#include <string>
#include <codecvt>
#include <algorithm>

#ifdef _WIN32
#include <codecvt>
#endif
#include <alibabacloud/oss/Const.h>
#include "ResumableBaseWorker.h"
#include "utils/FileSystemUtils.h"
Expand Down
1 change: 1 addition & 0 deletions sdk/src/model/LifecycleRule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ void LifeCycleTransition::setStorageClass(AlibabaCloud::OSS::StorageClass storag
}

LifecycleRule::LifecycleRule() :
status_(RuleStatus::Enabled),
expiredObjectDeleteMarker_(false)
{
}
Expand Down
3 changes: 2 additions & 1 deletion test/src/MultipartUpload/ResumableObjectTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
#include "src/external/json/json.h"
#include <fstream>
#include <ctime>
#ifdef _WIN32
#include <codecvt> // std::codecvt_utf8

#endif

namespace AlibabaCloud {
namespace OSS {
Expand Down
2 changes: 1 addition & 1 deletion test/src/Object/ObjectBasicOperationTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1682,7 +1682,7 @@ TEST_F(ObjectBasicOperationTest, DeleteObjectsWithSpecialCharsTest)
delRequest.addKey(key);
auto delOutcome = Client->DeleteObjects(delRequest);
EXPECT_EQ(delOutcome.isSuccess(), true);
EXPECT_EQ(delOutcome.result().keyList().size(), 1);
EXPECT_EQ(delOutcome.result().keyList().size(), 1U);
EXPECT_EQ(delOutcome.result().Quiet(), false);

EXPECT_EQ(Client->DoesObjectExist(BucketName, key), false);
Expand Down
7 changes: 4 additions & 3 deletions test/src/Utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <fstream>
#include <thread>
#ifdef _WIN32
#include <codecvt>
#include <ws2tcpip.h>
#pragma comment (lib, "Ws2_32.lib")
#else
Expand All @@ -36,7 +37,6 @@
#include <src/utils/Crc64.h>
#include <src/http/Url.h>
#include <cstring>
#include <codecvt>

#ifdef GetObject
#undef GetObject
Expand Down Expand Up @@ -435,8 +435,9 @@ std::string TestUtils::GetExecutableDirectory()

std::wstring TestUtils::GetExecutableDirectoryW()
{
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
return converter.from_bytes(GetExecutableDirectory());
return L"";
//std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
//return converter.from_bytes(GetExecutableDirectory());
}

#endif
Expand Down

0 comments on commit e36869b

Please sign in to comment.