Changeset bc56f30 in mainline for uspace/lib/cpp/include/cstdint


Ignore:
Timestamp:
2019-05-27T12:38:26Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0d14c25
Parents:
4d51c60
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-13 16:06:49)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-05-27 12:38:26)
Message:

Make some libc and libposix headers usable in C++

These headers either get included from standard C++ headers,
or are standard themselves, which means any unnamespaced nonstandard
identifiers are a problem. This commit attempts to fix those
issues, and removes hacks previously used in libcpp to work around it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/include/cstdint

    r4d51c60 rbc56f30  
    3030#define LIBCPP_CSTDINT
    3131
    32 
    33 namespace std::hel
    34 {
    35     extern "C" {
    36         #include <stdint.h>
    37     }
    38 }
     32#include <stdint.h>
    3933
    4034namespace std
    4135{
    42     using int8_t  = std::hel::int8_t;
    43     using int16_t = std::hel::int16_t;
    44     using int32_t = std::hel::int32_t;
    45     using int64_t = std::hel::int64_t;
     36    using ::int8_t;
     37    using ::int16_t;
     38    using ::int32_t;
     39    using ::int64_t;
    4640
    47     using intmax_t = std::hel::intmax_t;
    48     using intptr_t = std::hel::intptr_t;
     41    using ::intmax_t;
     42    using ::intptr_t;
    4943
    50     using int_fast8_t  = std::hel::int_fast8_t;
    51     using int_fast16_t = std::hel::int_fast16_t;
    52     using int_fast32_t = std::hel::int_fast32_t;
    53     using int_fast64_t = std::hel::int_fast64_t;
     44    using ::int_fast8_t;
     45    using ::int_fast16_t;
     46    using ::int_fast32_t;
     47    using ::int_fast64_t;
    5448
    55     using int_least8_t  = std::hel::int_least8_t;
    56     using int_least16_t = std::hel::int_least16_t;
    57     using int_least32_t = std::hel::int_least32_t;
    58     using int_least64_t = std::hel::int_least64_t;
     49    using ::int_least8_t;
     50    using ::int_least16_t;
     51    using ::int_least32_t;
     52    using ::int_least64_t;
    5953
    60     using uint8_t  = std::hel::uint8_t;
    61     using uint16_t = std::hel::uint16_t;
    62     using uint32_t = std::hel::uint32_t;
    63     using uint64_t = std::hel::uint64_t;
     54    using ::uint8_t;
     55    using ::uint16_t;
     56    using ::uint32_t;
     57    using ::uint64_t;
    6458
    65     using uintmax_t = std::hel::uintmax_t;
    66     using uintptr_t = std::hel::uintptr_t;
     59    using ::uintmax_t;
     60    using ::uintptr_t;
    6761
    68     using uint_fast8_t  = std::hel::uint_fast8_t;
    69     using uint_fast16_t = std::hel::uint_fast16_t;
    70     using uint_fast32_t = std::hel::uint_fast32_t;
    71     using uint_fast64_t = std::hel::uint_fast64_t;
     62    using ::uint_fast8_t;
     63    using ::uint_fast16_t;
     64    using ::uint_fast32_t;
     65    using ::uint_fast64_t;
    7266
    73     using uint_least8_t  = std::hel::uint_least8_t;
    74     using uint_least16_t = std::hel::uint_least16_t;
    75     using uint_least32_t = std::hel::uint_least32_t;
    76     using uint_least64_t = std::hel::uint_least64_t;
     67    using ::uint_least8_t;
     68    using ::uint_least16_t;
     69    using ::uint_least32_t;
     70    using ::uint_least64_t;
    7771}
    7872
    79 using int8_t  = std::hel::int8_t;
    80 using int16_t = std::hel::int16_t;
    81 using int32_t = std::hel::int32_t;
    82 using int64_t = std::hel::int64_t;
    83 
    84 using intmax_t = std::hel::intmax_t;
    85 using intptr_t = std::hel::intptr_t;
    86 
    87 using int_fast8_t  = std::hel::int_fast8_t;
    88 using int_fast16_t = std::hel::int_fast16_t;
    89 using int_fast32_t = std::hel::int_fast32_t;
    90 using int_fast64_t = std::hel::int_fast64_t;
    91 
    92 using int_least8_t  = std::hel::int_least8_t;
    93 using int_least16_t = std::hel::int_least16_t;
    94 using int_least32_t = std::hel::int_least32_t;
    95 using int_least64_t = std::hel::int_least64_t;
    96 
    97 using uint8_t  = std::hel::uint8_t;
    98 using uint16_t = std::hel::uint16_t;
    99 using uint32_t = std::hel::uint32_t;
    100 using uint64_t = std::hel::uint64_t;
    101 
    102 using uintmax_t = std::hel::uintmax_t;
    103 using uintptr_t = std::hel::uintptr_t;
    104 
    105 using uint_fast8_t  = std::hel::uint_fast8_t;
    106 using uint_fast16_t = std::hel::uint_fast16_t;
    107 using uint_fast32_t = std::hel::uint_fast32_t;
    108 using uint_fast64_t = std::hel::uint_fast64_t;
    109 
    110 using uint_least8_t  = std::hel::uint_least8_t;
    111 using uint_least16_t = std::hel::uint_least16_t;
    112 using uint_least32_t = std::hel::uint_least32_t;
    113 using uint_least64_t = std::hel::uint_least64_t;
    114 
    11573#endif
Note: See TracChangeset for help on using the changeset viewer.