1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-22 03:03:18 +00:00

Fixed #ifdef

This commit is contained in:
Bryan Roe
2020-05-22 00:31:48 -07:00
parent 32935e0102
commit 2a0cc4435d
2 changed files with 6 additions and 1 deletions

View File

@@ -1031,7 +1031,6 @@ void* ILibMemory_SmartReAllocate(void *ptr, size_t len)
void* ILibMemory_SmartAllocateEx_ResizeExtra(void *ptr, size_t newExtraSize)
{
if (ILibMemory_ExtraSize(ptr) == 0 || newExtraSize == 0) { return(NULL); }
size_t rawSize = ILibMemory_RawSize(ptr);
size_t size = ILibMemory_Size(ptr);
size_t extraSize = ILibMemory_ExtraSize(ptr);
@@ -3017,7 +3016,9 @@ char *ILibChain_GetMetaDataFromDescriptorSet(void *chain, fd_set *inr, fd_set *i
}
char *ILibChain_GetMetaDataFromDescriptorSetEx(void *chain, fd_set *inr, fd_set *inw, fd_set *ine)
{
#ifdef WIN32
ILibBaseChain *bchain = (ILibBaseChain*)chain;
#endif
char *retStr = (char*)ILibMemory_SmartAllocate(65535);
int len = 0;
void *node = ILibLinkedList_GetNode_Head(((ILibBaseChain*)chain)->Links);

View File

@@ -1211,7 +1211,9 @@ void ILibProcessPipe_Pipe_ResetMetadata(ILibProcessPipe_Pipe p, char *metadata)
pipeObject->metadata = (char*)ILibMemory_SmartAllocate(strnlen_s(metadata, 1024) + 1);
memcpy_s(pipeObject->metadata, ILibMemory_Size(pipeObject->metadata), metadata, ILibMemory_Size(pipeObject->metadata) - 1);
#ifdef WIN32
ILibChain_WaitHandle_UpdateMetadata(pipeObject->mProcess->chain, pipeObject->mOverlapped->hEvent, pipeObject->metadata);
#endif
}
void ILibProcessPipe_Process_ResetMetadata(ILibProcessPipe_Process p, char *metadata)
{
@@ -1228,7 +1230,9 @@ void ILibProcessPipe_Process_ResetMetadata(ILibProcessPipe_Process p, char *meta
j->metadata = (char*)ILibMemory_SmartAllocate(8 + strnlen_s(metadata, 1024));
sprintf_s(j->metadata, ILibMemory_Size(j->metadata), "%s [EXIT]", metadata);
#ifdef WIN32
ILibChain_WaitHandle_UpdateMetadata(j->chain, j->hProcess, j->metadata);
#endif
}
char *ILibProcessPipe_Process_GetMetadata(ILibProcessPipe_Process p)
{