[CRT] Make _controlfp_s portable

This commit is contained in:
Timo Kreuzer 2023-08-06 09:50:39 +03:00
parent a17dd3a7a9
commit 994d5e0ad1
4 changed files with 32 additions and 35 deletions

View file

@ -68,16 +68,3 @@ unsigned int CDECL _control87(unsigned int newval, unsigned int mask)
return flags;
}
int CDECL _controlfp_s(unsigned int *cur, unsigned int newval, unsigned int mask)
{
unsigned int val;
if (!MSVCRT_CHECK_PMT( !(newval & mask & ~(_MCW_EM | _MCW_RC | _MCW_DN)) ))
{
if (cur) *cur = _controlfp(0, 0); /* retrieve it anyway */
return EINVAL;
}
val = _controlfp(newval, mask);
if (cur) *cur = val;
return 0;
}