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


Ignore:
Timestamp:
2019-05-27T12:38:26Z (5 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/ctime

    r4d51c60 rbc56f30  
    3030#define LIBCPP_CTIME
    3131
    32 
    33 namespace std::hel
    34 {
    35     extern "C" {
    36         #include <time.h>
    37     }
    38 }
     32#include <time.h>
    3933
    4034namespace std
    4135{
    42     /* using std::hel::clock_t; */
    43     using std::hel::size_t;
    44     using std::hel::time_t;
    45     using std::hel::tm;
    46     /* using std::hel::timespec; */
     36    using ::clock_t;
     37    using ::size_t;
     38    using ::time_t;
     39    using ::tm;
     40    using ::timespec;
    4741
    48     /* using std::hel::clock; */
    49     using std::hel::time;
    50     using std::hel::difftime;
     42    using ::clock;
     43    using ::time;
     44    using ::difftime;
    5145
    52     /* using std::hel::ctime; */
    53     /* using std::hel::asctime; */
    54     using std::hel::strftime;
    55     /* using std::hel::wcsftime; */
    56     /* using std::hel::gmtime; */
    57     /* using std::hel::localtime; */
    58     using std::hel::mktime;
     46    using ::ctime;
     47    using ::asctime;
     48    using ::strftime;
     49    /* using ::wcsftime; */
     50    /* using ::gmtime; */
     51    /* using ::localtime; */
     52    using ::mktime;
    5953}
    6054
    61 /* using std::hel::clock_t; */
    62 using std::hel::size_t;
    63 using std::hel::time_t;
    64 using std::hel::tm;
    65 /* using std::hel::timespec; */
    66 
    67 /* using std::hel::clock; */
    68 using std::hel::time;
    69 using std::hel::difftime;
    70 
    71 /* using std::hel::ctime; */
    72 /* using std::hel::asctime; */
    73 using std::hel::strftime;
    74 /* using std::hel::wcsftime; */
    75 /* using std::hel::gmtime; */
    76 /* using std::hel::localtime; */
    77 using std::hel::mktime;
    78 
    7955#endif
Note: See TracChangeset for help on using the changeset viewer.