VirtualBox

Changeset 95803 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 25, 2022 12:28:16 PM (2 years ago)
Author:
vboxsync
Message:

IPRT/errvars-win.cpp: Adjusted for not having errno in IPRT_NO_CRT mode. bugref:10261

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/errvars-win.cpp

    r93115 r95803  
    3030*********************************************************************************************************************************/
    3131#include <iprt/win/winsock2.h>
    32 #include <errno.h>
     32#ifndef IPRT_NO_CRT
     33# include <errno.h>
     34#endif
    3335
    3436#include <iprt/errcore.h>
     
    4648    pVars->ai32Vars[1] = GetLastError();
    4749    pVars->ai32Vars[2] = g_pfnWSAGetLastError ? g_pfnWSAGetLastError() : WSANOTINITIALISED;
     50#ifndef IPRT_NO_CRT
    4851    pVars->ai32Vars[3] = errno;
     52#endif
    4953    return pVars;
    5054}
     
    5458{
    5559    AssertReturnVoid(pVars->ai32Vars[0] == RTERRVARS_MAGIC);
     60#ifndef IPRT_NO_CRT
    5661    errno = pVars->ai32Vars[3];
     62#endif
    5763    if (   pVars->ai32Vars[2] != WSANOTINITIALISED
    5864        && g_pfnWSASetLastError)
     
    7076        && pVars1->ai32Vars[1] == pVars2->ai32Vars[1]
    7177        && pVars1->ai32Vars[2] == pVars2->ai32Vars[2]
    72         && pVars1->ai32Vars[3] == pVars2->ai32Vars[3];
     78#ifndef IPRT_NO_CRT
     79        && pVars1->ai32Vars[3] == pVars2->ai32Vars[3]
     80#endif
     81        ;
    7382}
    7483
     
    8190        || (uint32_t)pVars->ai32Vars[1] != GetLastError()
    8291        || pVars->ai32Vars[2] != (g_pfnWSAGetLastError ? g_pfnWSAGetLastError() : WSANOTINITIALISED)
    83         || pVars->ai32Vars[3] != errno;
     92#ifndef IPRT_NO_CRT
     93        || pVars->ai32Vars[3] != errno
     94#endif
     95        ;
     96
    8497}
    8598
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette