Skip to content

Commit 0b4ea63

Browse files
committed
fixed:linux build error
1 parent a9e6946 commit 0b4ea63

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

XEngine_Source/StorageModule_APIHelp/APIHelp_Distributed/APIHelp_Distributed.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_RandomAddr(list<string>* pStl_Lis
8585
{
8686
nRandomFront = 0;
8787
}
88-
int i = 0;
88+
unsigned int i = 0;
8989
for (auto stl_ListIterator = pStl_ListAddr->begin(); stl_ListIterator != pStl_ListAddr->end(); stl_ListIterator++, i++)
9090
{
9191
if (nRandomFront == i)
@@ -102,7 +102,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_RandomAddr(list<string>* pStl_Lis
102102
{
103103
nRandomBack = 0;
104104
}
105-
int i = 0;
105+
unsigned int i = 0;
106106
for (auto stl_ListIterator = pStl_ListAddr->rbegin(); stl_ListIterator != pStl_ListAddr->rend(); stl_ListIterator++, i++)
107107
{
108108
if (nRandomBack == i)
@@ -290,8 +290,8 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_UPStorage(LPCTSTR lpszMsgBuffer,
290290
SystemApi_File_EnumFile(pSt_StorageBucket->tszFilePath, &ppListFile, &nListCount, NULL, NULL, TRUE, 1);
291291
for (int j = 0; j < nListCount; j++)
292292
{
293-
struct __stat64 st_FStat;
294-
_stat64(ppListFile[j], &st_FStat);
293+
struct _tstat64 st_FStat;
294+
_tstat64(ppListFile[j], &st_FStat);
295295
nDirCount += st_FStat.st_size;
296296
}
297297
BaseLib_OperatorMemory_Free((XPPPMEM)&ppListFile, nListCount);
@@ -334,8 +334,8 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_UPStorage(LPCTSTR lpszMsgBuffer,
334334
SystemApi_File_EnumFile(stl_ListIterator->tszFilePath, &ppListFile, &nListCount, NULL, NULL, TRUE, 1);
335335
for (int j = 0; j < nListCount; j++)
336336
{
337-
struct __stat64 st_FStat;
338-
_stat64(ppListFile[j], &st_FStat);
337+
struct _tstat64 st_FStat;
338+
_tstat64(ppListFile[j], &st_FStat);
339339
nDirCount += st_FStat.st_size;
340340
}
341341
BaseLib_OperatorMemory_Free((XPPPMEM)&ppListFile, nListCount);
@@ -382,7 +382,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_UPStorage(LPCTSTR lpszMsgBuffer,
382382
{
383383
nUPFront = 0;
384384
}
385-
int i = 0;
385+
unsigned int i = 0;
386386
for (auto stl_ListIterator = stl_BuckSelect.begin(); stl_ListIterator != stl_BuckSelect.end(); stl_ListIterator++, i++)
387387
{
388388
if (nUPFront == i)
@@ -399,7 +399,7 @@ BOOL CAPIHelp_Distributed::APIHelp_Distributed_UPStorage(LPCTSTR lpszMsgBuffer,
399399
{
400400
nUPBack = 0;
401401
}
402-
int i = 0;
402+
unsigned int i = 0;
403403
for (auto stl_ListIterator = stl_BuckSelect.rbegin(); stl_ListIterator != stl_BuckSelect.rend(); stl_ListIterator++, i++)
404404
{
405405
if (nUPBack == i)

XEngine_Source/StorageModule_Session/Session_Stroage/Session_DLStroage.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ BOOL CSession_DLStroage::Session_DLStroage_Insert(LPCTSTR lpszClientAddr, LPCTST
129129
st_Locker.unlock_shared();
130130

131131
SESSION_STORAGEINFO st_Client;
132-
struct __stat64 st_FStat;
132+
struct _tstat64 st_FStat;
133133

134134
memset(&st_Client, '\0', sizeof(SESSION_STORAGEINFO));
135-
int nRet = _stat64(lpszFileDir, &st_FStat);
135+
int nRet = _tstat64(lpszFileDir, &st_FStat);
136136
if (-1 == nRet)
137137
{
138138
Session_IsErrorOccur = TRUE;

XEngine_Source/StorageModule_Session/Session_Stroage/Session_UPStroage.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,9 @@ BOOL CSession_UPStroage::Session_UPStroage_Delete(LPCTSTR lpszClientAddr)
372372
}
373373
if (0 == stl_MapIterator->second.st_StorageInfo.ullFSize)
374374
{
375-
struct __stat64 st_FStat;
376-
memset(&st_FStat, '\0', sizeof(struct __stat64));
377-
_stat64(stl_MapIterator->second.st_StorageInfo.tszFileDir, &st_FStat);
375+
struct _tstat64 st_FStat;
376+
memset(&st_FStat, '\0', sizeof(struct _tstat64));
377+
_tstat64(stl_MapIterator->second.st_StorageInfo.tszFileDir, &st_FStat);
378378
stl_MapIterator->second.st_StorageInfo.ullFSize = st_FStat.st_size;
379379
}
380380
//大小是否足够
@@ -412,9 +412,9 @@ BOOL CSession_UPStroage::Session_UPStroage_Close(LPCTSTR lpszClientAddr)
412412
{
413413
fclose(stl_MapIterator->second.st_StorageInfo.pSt_File);
414414
}
415-
struct __stat64 st_FStat;
416-
memset(&st_FStat, '\0', sizeof(struct __stat64));
417-
_stat64(stl_MapIterator->second.st_StorageInfo.tszFileDir, &st_FStat);
415+
struct _tstat64 st_FStat;
416+
memset(&st_FStat, '\0', sizeof(struct _tstat64));
417+
_tstat64(stl_MapIterator->second.st_StorageInfo.tszFileDir, &st_FStat);
418418
stl_MapIterator->second.st_StorageInfo.ullFSize = st_FStat.st_size;
419419
}
420420
st_Locker.unlock();

0 commit comments

Comments
 (0)