Changeset 34120f10 in mainline for common/strtol.c


Ignore:
Timestamp:
2023-10-27T19:38:31Z (15 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, topic/msim-upgrade, topic/simplify-dev-export
Children:
63ed840
Parents:
c89ae25 (diff), 694ca3d6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge code deduplication work

TL;DR: Added directory /common, which now contains the sole existing
copy of ADT, printf_core, and a few other pieces. Should make changes
to any of those less of a headache.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • common/strtol.c

    rc89ae25 r34120f10  
    269269long strtol(const char *nptr, char **endptr, int base)
    270270{
     271#if !__STDC_HOSTED__
     272        errno_t errno;
     273#endif
     274
    271275        return _strtosigned(nptr, endptr, base, LONG_MIN, LONG_MAX, &errno, false);
    272276}
     
    287291unsigned long strtoul(const char *nptr, char **endptr, int base)
    288292{
     293#if !__STDC_HOSTED__
     294        errno_t errno;
     295#endif
     296
    289297        return _strtounsigned(nptr, endptr, base, ULONG_MAX, &errno, false);
    290298}
     
    292300long long strtoll(const char *nptr, char **endptr, int base)
    293301{
     302#if !__STDC_HOSTED__
     303        errno_t errno;
     304#endif
     305
    294306        return _strtosigned(nptr, endptr, base, LLONG_MIN, LLONG_MAX, &errno, false);
    295307}
     
    297309unsigned long long strtoull(const char *nptr, char **endptr, int base)
    298310{
     311#if !__STDC_HOSTED__
     312        errno_t errno;
     313#endif
     314
    299315        return _strtounsigned(nptr, endptr, base, ULLONG_MAX, &errno, false);
    300316}
     
    302318intmax_t strtoimax(const char *nptr, char **endptr, int base)
    303319{
     320#if !__STDC_HOSTED__
     321        errno_t errno;
     322#endif
     323
    304324        return _strtosigned(nptr, endptr, base, INTMAX_MIN, INTMAX_MAX, &errno, false);
    305325}
     
    307327uintmax_t strtoumax(const char *nptr, char **endptr, int base)
    308328{
     329#if !__STDC_HOSTED__
     330        errno_t errno;
     331#endif
     332
    309333        return _strtounsigned(nptr, endptr, base, UINTMAX_MAX, &errno, false);
    310334}
Note: See TracChangeset for help on using the changeset viewer.