Changeset 56b308e in mainline for uspace/lib/posix


Ignore:
Timestamp:
2012-04-23T22:28:57Z (14 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d3e3a71
Parents:
f6cb995
Message:

libc: move ctime() from libposix to libc

Location:
uspace/lib/posix
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/time.c

    rf6cb995 r56b308e  
    400400
    401401/**
    402  * Equivalent to asctime(localtime(clock)).
    403  *
    404  * @param timer Time to convert.
    405  * @return Pointer to a statically allocated string holding the date.
    406  */
    407 char *posix_ctime(const time_t *timer)
    408 {
    409         struct tm *loctime = localtime(timer);
    410         if (loctime == NULL) {
    411                 return NULL;
    412         }
    413         return asctime(loctime);
    414 }
    415 
    416 /**
    417402 * Reentrant variant of ctime().
    418403 *
  • uspace/lib/posix/time.h

    rf6cb995 r56b308e  
    9696extern char *posix_asctime_r(const struct tm *restrict timeptr,
    9797    char *restrict buf);
    98 extern char *posix_ctime(const time_t *timer);
    9998extern char *posix_ctime_r(const time_t *timer, char *buf);
    10099
     
    128127
    129128        #define asctime_r posix_asctime_r
    130         #define ctime posix_ctime
    131129        #define ctime_r posix_ctime_r
    132130
Note: See TracChangeset for help on using the changeset viewer.