mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0032442: Application Framework - Problems of testing on MacOS arm64 platform
Fixed the problem of reading XML files on MacOS. 'errno' was not reseted even the 'strtol' function produced a good value. So, now it is erased forcibly before the call.
This commit is contained in:
parent
452ba192d5
commit
e720157864
@ -184,6 +184,7 @@ Standard_Boolean LDOMBasicString::equals (const LDOMBasicString& anOther) const
|
||||
case LDOM_AsciiDocClear:
|
||||
case LDOM_AsciiHashed:
|
||||
{
|
||||
errno = 0;
|
||||
long aLongOther = strtol ((const char *) anOther.myVal.ptr, NULL, 10);
|
||||
return (errno == 0 && aLongOther == long(myVal.i));
|
||||
}
|
||||
@ -197,6 +198,7 @@ Standard_Boolean LDOMBasicString::equals (const LDOMBasicString& anOther) const
|
||||
{
|
||||
case LDOM_Integer:
|
||||
{
|
||||
errno = 0;
|
||||
long aLong = strtol ((const char *) myVal.ptr, NULL, 10);
|
||||
return (errno == 0 && aLong == long(anOther.myVal.i));
|
||||
}
|
||||
@ -273,6 +275,7 @@ LDOMBasicString::operator TCollection_ExtendedString () const
|
||||
buf[1] = ptr[1];
|
||||
buf[2] = ptr[2];
|
||||
buf[3] = ptr[3];
|
||||
errno = 0;
|
||||
aResult[j++] = Standard_ExtCharacter (strtol (&buf[0], NULL, 16));
|
||||
if (errno) {
|
||||
delete [] aResult;
|
||||
@ -306,6 +309,7 @@ Standard_Boolean LDOMBasicString::GetInteger (Standard_Integer& aResult) const
|
||||
case LDOM_AsciiHashed:
|
||||
{
|
||||
char * ptr;
|
||||
errno = 0;
|
||||
long aValue = strtol ((const char *)myVal.ptr, &ptr, 10);
|
||||
if (ptr == myVal.ptr || errno == ERANGE || errno == EINVAL)
|
||||
return Standard_False;
|
||||
|
@ -114,6 +114,7 @@ void OSD_Directory::Build (const OSD_Protection& theProtect)
|
||||
_osd_wnt_set_error (myError, OSD_WDirectory);
|
||||
}
|
||||
#else
|
||||
errno = 0;
|
||||
TCollection_AsciiString aBuffer;
|
||||
mode_t anInternalProt = (mode_t )theProtect.Internal();
|
||||
myPath.SystemName (aBuffer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user