fix and update on Linux platform

This commit is contained in:
hyzboy 2020-06-18 03:35:55 +08:00
parent 984d9698ef
commit f1f3acdaa3
5 changed files with 7 additions and 7 deletions

View File

@ -27,7 +27,7 @@ namespace hgl
if(config->folder_name.IsEmpty())
{
fullname='.';
fullname=OS_TEXT(".");
}
else
{

View File

@ -170,7 +170,7 @@ namespace hgl
{
if(!mkdir(name,S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH))return(true);
LOG_PROBLEM(OS_TEXT("Create Directory <")+OSString(name)+OS_TEXT("> failed,errno: ")+OSString(errno));
LOG_PROBLEM(OS_TEXT("Create Directory <")+OSString(name)+OS_TEXT("> failed,errno: ")+OSString::valueOf(errno));
return(false);
}

View File

@ -35,13 +35,13 @@ namespace hgl
if(fom==fomReadWrite )fp=hgl_open64(fn,O_RDWR );else
if(fom==fomAppend )fp=hgl_open64(fn,O_APPEND );else
{
LOG_ERROR(OS_TEXT("UNIX,FileAccess,OpenFile(")+OSString(fn)+OS_TEXT(" mode error: "+OSString(fom)));
LOG_ERROR(OS_TEXT("UNIX,FileAccess,OpenFile(")+OSString(fn)+OS_TEXT(" mode error: "+OSString::valueOf(fom)));
RETURN_ERROR(-1);
}
if(fp==-1)
{
LOG_ERROR(OS_TEXT("UNIX,FileAccess,OpenFile(")+OSString(fn)+OS_TEXT(") open return error: "+OSString(errno)));
LOG_ERROR(OS_TEXT("UNIX,FileAccess,OpenFile(")+OSString(fn)+OS_TEXT(") open return error: "+OSString::valueOf(errno)));
}
return fp;

View File

@ -16,8 +16,8 @@ namespace hgl
if(sem_init(ptr,PTHREAD_PROCESS_PRIVATE,0))
{
LOG_ERROR(OS_TEXT("sem_init error,max_count=")+OSString(max_count));
delete ptr;
LOG_ERROR(OS_TEXT("sem_init error,max_count=")+OSString::valueOf(max_count));
delete (sem_t *)ptr;
ptr=nullptr;
}
}

View File

@ -35,7 +35,7 @@ namespace hgl
tp=0;
pthread_attr_destroy(&attr);
LOG_ERROR(OS_TEXT("Create Thread (pthread_create) failed.errno:")+OSString(errno));
LOG_ERROR(OS_TEXT("Create Thread (pthread_create) failed.errno:")+OSString::valueOf(errno));
return(false);
}