Changeset f7ea5400 in mainline for uspace/lib/posix/time.h


Ignore:
Timestamp:
2012-08-15T17:52:09Z (12 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
16639bb
Parents:
9dec6d4
Message:

Replace the gmtime(), asctime() localtime() and ctime() with a new set of reentrant functions.
The former will be kept in the posix library for compatibility reasons.

File:
1 edited

Legend:

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

    r9dec6d4 rf7ea5400  
    8787extern struct tm *posix_gmtime_r(const time_t *restrict timer,
    8888    struct tm *restrict result);
     89extern struct tm *posix_gmtime(const time_t *restrict timep);
    8990extern struct tm *posix_localtime_r(const time_t *restrict timer,
    9091    struct tm *restrict result);
     92extern struct tm *posix_localtime(const time_t *restrict timep);
    9193
    9294/* Formatting Calendar Time */
    9395extern char *posix_asctime_r(const struct tm *restrict timeptr,
    9496    char *restrict buf);
     97extern char *posix_asctime(const struct tm *restrict timeptr);
    9598extern char *posix_ctime_r(const time_t *timer, char *buf);
     99extern char *posix_ctime(const time_t *timer);
    96100
    97101/* Clocks */
     
    109113
    110114#ifndef LIBPOSIX_INTERNAL
    111         #define timespec posix_timespec
    112         #define itimerspec posix_itimerspec
    113         #define timer_t posix_timer_t
     115        #define timespec    posix_timespec
     116        #define itimerspec  posix_itimerspec
     117        #define timer_t     posix_timer_t
    114118
    115         #define daylight posix_daylight
    116         #define timezone posix_timezone
    117         #define tzname posix_tzname
    118         #define tzset posix_tzset
     119        #define daylight    posix_daylight
     120        #define timezone    posix_timezone
     121        #define tzname      posix_tzname
     122        #define tzset       posix_tzset
    119123
    120         #define gmtime_r posix_gmtime_r
     124        #define gmtime_r    posix_gmtime_r
     125        #define gmtime      posix_gmtime
    121126        #define localtime_r posix_localtime_r
     127        #define localtime   posix_localtime
    122128
    123         #define asctime_r posix_asctime_r
    124         #define ctime_r posix_ctime_r
     129        #define asctime_r   posix_asctime_r
     130        #define asctime     posix_asctime
     131        #define ctime_r     posix_ctime_r
     132        #define ctime       posix_ctime
    125133
    126134        #define clock_getres posix_clock_getres
Note: See TracChangeset for help on using the changeset viewer.