VirtualBox

Changeset 96058 in vbox


Ignore:
Timestamp:
Aug 5, 2022 11:09:17 AM (2 years ago)
Author:
vboxsync
Message:

IPRT/nocrt: Added strtoull. bugref:10261

Location:
trunk/src/VBox/Runtime
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/Makefile.kmk

    r96056 r96058  
    18051805        common/string/nocrt-strtoll.cpp \
    18061806        common/string/nocrt-strtoul.cpp \
     1807        common/string/nocrt-strtoull.cpp \
    18071808        common/string/strtok_r.cpp \
    18081809        r3/nocrt-per-thread-1.cpp \
  • trunk/src/VBox/Runtime/common/string/nocrt-strtoull.cpp

    r96057 r96058  
    11/* $Id$ */
    22/** @file
    3  * IPRT - No-CRT - strtoul.
     3 * IPRT - No-CRT - strtoull.
    44 */
    55
     
    3838
    3939
    40 #undef strtoul
    41 unsigned long RT_NOCRT(strtoul)(const char *psz, char **ppszNext, int iBase)
     40#undef strtoull
     41unsigned long long RT_NOCRT(strtoull)(const char *psz, char **ppszNext, int iBase)
    4242{
    43 #if LONG_BIT == 64
     43#if LLONG_BIT == 64
    4444    uint64_t uValue = 0;
    4545    int rc = RTStrToUInt64Ex(psz, ppszNext, (unsigned)iBase, &uValue);
    46 #elif LONG_BIT == 32
    47     uint32_t uValue = 0;
    48     int rc = RTStrToUInt32Ex(psz, ppszNext, (unsigned)iBase, &uValue);
    4946#else
    50 # error "Unsupported LONG_BIT value"
     47# error "Unsupported LLONG_BIT value"
    5148#endif
    5249    if (rc == VINF_SUCCESS || rc == VWRN_TRAILING_CHARS || rc == VWRN_TRAILING_SPACES || rc == VWRN_NEGATIVE_UNSIGNED)
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