12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- #ifndef TIME_H
- #define TIME_H
- #ifndef __TIME_UNSIGNED
- #define __TIME_UNSIGNED 1
- #endif
- #if defined (__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__
- #ifndef __RSIZE_T_DEFINED
- #define __RSIZE_T_DEFINED
- typedef size_t rsize_t;
- #endif
- #ifndef __ERRNO_T_DEFINED
- #define __ERRNO_T_DEFINED
- typedef int errno_t;
- #endif
- #endif
- #if __TIME_UNSIGNED
- struct tm
- {
- unsigned char tm_sec;
- unsigned char tm_min;
- unsigned char tm_hour;
- unsigned char tm_mday;
- unsigned char tm_mon;
- int tm_year;
- unsigned char tm_wday;
- int tm_yday;
- unsigned char tm_isdst;
- unsigned char tm_hundredth;
- };
- #else
- struct tm
- {
- int tm_sec;
- int tm_min;
- int tm_hour;
- int tm_mday;
- int tm_mon;
- int tm_year;
- int tm_wday;
- int tm_yday;
- int tm_isdst;
- char *tm_zone;
- };
- #endif
- typedef unsigned long time_t;
- time_t time(time_t *t);
- struct tm *gmtime(time_t *timep);
- struct tm *localtime(time_t *timep);
- time_t mktime(struct tm *timeptr);
- char *asctime(struct tm *timeptr);
- char *ctime(time_t *timep);
- #endif
|