Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygentime.h
Go to the documentation of this file.
00001 00006 #ifndef _TIME_H_ 00007 #define _TIME_H_ 00008 00009 #include <crtdefs.h> 00010 00011 #ifndef _WIN32 00012 #error Only Win32 target is supported! 00013 #endif 00014 00015 #pragma pack(push,_CRT_PACKING) 00016 00017 #ifdef __cplusplus 00018 extern "C" { 00019 #endif 00020 00021 #ifndef _TIME32_T_DEFINED 00022 #define _TIME32_T_DEFINED 00023 typedef long __time32_t; 00024 #endif 00025 00026 #ifndef _TIME64_T_DEFINED 00027 #define _TIME64_T_DEFINED 00028 #if _INTEGRAL_MAX_BITS >= 64 00029 #if defined(__GNUC__) && defined(__STRICT_ANSI__) 00030 typedef int _time64_t __attribute__ ((mode (DI))); 00031 #else 00032 __MINGW_EXTENSION typedef __int64 __time64_t; 00033 #endif 00034 #endif 00035 #endif 00036 00037 #ifndef _TIME_T_DEFINED 00038 #define _TIME_T_DEFINED 00039 #ifdef _USE_32BIT_TIME_T 00040 typedef __time32_t time_t; 00041 #else 00042 typedef __time64_t time_t; 00043 #endif 00044 #endif 00045 00046 #ifndef _CLOCK_T_DEFINED 00047 #define _CLOCK_T_DEFINED 00048 typedef long clock_t; 00049 #endif 00050 00051 #ifndef _SIZE_T_DEFINED 00052 #define _SIZE_T_DEFINED 00053 #undef size_t 00054 #ifdef _WIN64 00055 #if defined(__GNUC__) && defined(__STRICT_ANSI__) 00056 typedef unsigned int size_t __attribute__ ((mode (DI))); 00057 #else 00058 __MINGW_EXTENSION typedef unsigned __int64 size_t; 00059 #endif 00060 #else 00061 typedef unsigned int size_t; 00062 #endif 00063 #endif 00064 00065 #ifndef NULL 00066 #ifdef __cplusplus 00067 #define NULL 0 00068 #else 00069 #define NULL ((void *)0) 00070 #endif 00071 #endif 00072 00073 #ifndef _TM_DEFINED 00074 #define _TM_DEFINED 00075 struct tm { 00076 int tm_sec; 00077 int tm_min; 00078 int tm_hour; 00079 int tm_mday; 00080 int tm_mon; 00081 int tm_year; 00082 int tm_wday; 00083 int tm_yday; 00084 int tm_isdst; 00085 }; 00086 #endif 00087 00088 #define CLOCKS_PER_SEC 1000 00089 00090 _CRTDATA(extern int _daylight); 00091 _CRTDATA(extern long _dstbias); 00092 _CRTDATA(extern long _timezone); 00093 _CRTDATA(extern char * _tzname[2]); 00094 00095 _CRTIMP errno_t __cdecl _get_daylight(int *_Daylight); 00096 _CRTIMP errno_t __cdecl _get_dstbias(long *_Daylight_savings_bias); 00097 _CRTIMP errno_t __cdecl _get_timezone(long *_Timezone); 00098 _CRTIMP errno_t __cdecl _get_tzname(size_t *_ReturnValue,char *_Buffer,size_t _SizeInBytes,int _Index); 00099 00100 _CRTIMP _CRT_INSECURE_DEPRECATE(asctime_s) char *__cdecl asctime(const struct tm *_Tm); 00101 _CRTIMP _CRT_INSECURE_DEPRECATE(_ctime32_s) char *__cdecl _ctime32(const __time32_t *_Time); 00102 _CRTIMP clock_t __cdecl clock(void); 00103 _CRTIMP double __cdecl _difftime32(__time32_t _Time1,__time32_t _Time2); 00104 _CRTIMP _CRT_INSECURE_DEPRECATE(_gmtime32_s) struct tm *__cdecl _gmtime32(const __time32_t *_Time); 00105 _CRTIMP _CRT_INSECURE_DEPRECATE(_localtime32_s) struct tm *__cdecl _localtime32(const __time32_t *_Time); 00106 _CRTIMP size_t __cdecl strftime(char *_Buf,size_t _SizeInBytes,const char *_Format,const struct tm *_Tm); 00107 _CRTIMP size_t __cdecl _strftime_l(char *_Buf,size_t _Max_size,const char *_Format,const struct tm *_Tm,_locale_t _Locale); 00108 _CRTIMP char *__cdecl _strdate(char *_Buffer); 00109 _CRTIMP char *__cdecl _strtime(char *_Buffer); 00110 _CRTIMP __time32_t __cdecl _time32(__time32_t *_Time); 00111 _CRTIMP __time32_t __cdecl _mktime32(struct tm *_Tm); 00112 _CRTIMP __time32_t __cdecl _mkgmtime32(struct tm *_Tm); 00113 _CRTIMP void __cdecl _tzset(void); 00114 _CRT_OBSOLETE(GetLocalTime) unsigned __cdecl _getsystime(struct tm *_Tm); 00115 _CRT_OBSOLETE(GetLocalTime) unsigned __cdecl _setsystime(struct tm *_Tm,unsigned _MilliSec); 00116 00117 _CRTIMP errno_t __cdecl asctime_s(char *_Buf,size_t _SizeInWords,const struct tm *_Tm); 00118 _CRTIMP errno_t __cdecl _ctime32_s(char *_Buf,size_t _SizeInBytes,const __time32_t *_Time); 00119 _CRTIMP errno_t __cdecl _gmtime32_s(struct tm *_Tm,const __time32_t *_Time); 00120 _CRTIMP errno_t __cdecl _localtime32_s(struct tm *_Tm,const __time32_t *_Time); 00121 _CRTIMP errno_t __cdecl _strdate_s(char *_Buf,size_t _SizeInBytes); 00122 _CRTIMP errno_t __cdecl _strtime_s(char *_Buf ,size_t _SizeInBytes); 00123 00124 #if _INTEGRAL_MAX_BITS >= 64 00125 _CRTIMP double __cdecl _difftime64(__time64_t _Time1,__time64_t _Time2); 00126 _CRTIMP _CRT_INSECURE_DEPRECATE(_ctime64_s) char *__cdecl _ctime64(const __time64_t *_Time); 00127 _CRTIMP _CRT_INSECURE_DEPRECATE(_gmtime64_s) struct tm *__cdecl _gmtime64(const __time64_t *_Time); 00128 _CRTIMP _CRT_INSECURE_DEPRECATE(_localtime64_s) struct tm *__cdecl _localtime64(const __time64_t *_Time); 00129 _CRTIMP __time64_t __cdecl _mktime64(struct tm *_Tm); 00130 _CRTIMP __time64_t __cdecl _mkgmtime64(struct tm *_Tm); 00131 _CRTIMP __time64_t __cdecl _time64(__time64_t *_Time); 00132 00133 _CRTIMP errno_t __cdecl _ctime64_s(char *_Buf,size_t _SizeInBytes,const __time64_t *_Time); 00134 _CRTIMP errno_t __cdecl _gmtime64_s(struct tm *_Tm,const __time64_t *_Time); 00135 _CRTIMP errno_t __cdecl _localtime64_s(struct tm *_Tm,const __time64_t *_Time); 00136 #endif 00137 00138 #ifndef _WTIME_DEFINED 00139 #define _WTIME_DEFINED 00140 _CRTIMP _CRT_INSECURE_DEPRECATE(_wasctime_s) wchar_t *__cdecl _wasctime(const struct tm *_Tm); 00141 _CRTIMP wchar_t *__cdecl _wctime(const time_t *_Time); 00142 _CRTIMP _CRT_INSECURE_DEPRECATE(_wctime32_s) wchar_t *__cdecl _wctime32(const __time32_t *_Time); 00143 _CRTIMP size_t __cdecl wcsftime(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm); 00144 _CRTIMP size_t __cdecl _wcsftime_l(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm,_locale_t _Locale); 00145 _CRTIMP wchar_t *__cdecl _wstrdate(wchar_t *_Buffer); 00146 _CRTIMP wchar_t *__cdecl _wstrtime(wchar_t *_Buffer); 00147 00148 _CRTIMP errno_t __cdecl _wasctime_s(wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm); 00149 _CRTIMP errno_t __cdecl _wctime32_s(wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time); 00150 _CRTIMP errno_t __cdecl _wstrdate_s(wchar_t *_Buf,size_t _SizeInWords); 00151 _CRTIMP errno_t __cdecl _wstrtime_s(wchar_t *_Buf,size_t _SizeInWords); 00152 #if _INTEGRAL_MAX_BITS >= 64 00153 _CRTIMP _CRT_INSECURE_DEPRECATE(_wctime64_s) wchar_t *__cdecl _wctime64(const __time64_t *_Time); 00154 _CRTIMP errno_t __cdecl _wctime64_s(wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time); 00155 #endif 00156 00157 #if !defined (RC_INVOKED) && !defined (_INC_WTIME_INL) 00158 #define _INC_WTIME_INL 00159 #ifdef _USE_32BIT_TIME_T 00160 /* Do it like this to be compatible to msvcrt.dll on 32 bit windows XP and before */ 00161 __CRT_INLINE wchar_t *__cdecl _wctime32(const time_t *_Time) { return _wctime(_Time); } 00162 __CRT_INLINE errno_t _wctime32_s(wchar_t *_Buffer, size_t _SizeInWords,const __time32_t *_Time) { return _wctime32_s(_Buffer, _SizeInWords, _Time); } 00163 #else 00164 __CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime64(_Time); } 00165 __CRT_INLINE errno_t _wctime_s(wchar_t *_Buffer, size_t _SizeInWords,const time_t *_Time) { return _wctime64_s(_Buffer, _SizeInWords, _Time); } 00166 #endif 00167 #endif 00168 00169 #endif /* !_WTIME_DEFINED */ 00170 00171 _CRTIMP double __cdecl difftime(time_t _Time1,time_t _Time2); 00172 _CRTIMP char *__cdecl ctime(const time_t *_Time); 00173 _CRTIMP struct tm *__cdecl gmtime(const time_t *_Time); 00174 _CRTIMP struct tm *__cdecl localtime(const time_t *_Time); 00175 _CRTIMP struct tm *__cdecl localtime_r(const time_t *_Time,struct tm *); 00176 00177 _CRTIMP time_t __cdecl mktime(struct tm *_Tm); 00178 _CRTIMP time_t __cdecl _mkgmtime(struct tm *_Tm); 00179 _CRTIMP time_t __cdecl time(time_t *_Time); 00180 00181 #if !defined(RC_INVOKED) && !defined(_NO_INLINING) && !defined(_CRTBLD) 00182 #ifdef _USE_32BIT_TIME_T 00183 #if 0 00184 __CRT_INLINE double __cdecl difftime(time_t _Time1,time_t _Time2) { return _difftime32(_Time1,_Time2); } 00185 __CRT_INLINE char *__cdecl ctime(const time_t *_Time) { return _ctime32(_Time); } 00186 __CRT_INLINE struct tm *__cdecl gmtime(const time_t *_Time) { return _gmtime32(_Time); } 00187 __CRT_INLINE struct tm *__cdecl localtime(const time_t *_Time) { return _localtime32(_Time); } 00188 __CRT_INLINE errno_t __cdecl localtime_s(struct tm *_Tm,const time_t *_Time) { return _localtime32_s(_Tm,_Time); } 00189 __CRT_INLINE time_t __cdecl mktime(struct tm *_Tm) { return _mktime32(_Tm); } 00190 __CRT_INLINE time_t __cdecl _mkgmtime(struct tm *_Tm) { return _mkgmtime32(_Tm); } 00191 __CRT_INLINE time_t __cdecl time(time_t *_Time) { return _time32(_Time); } 00192 #endif 00193 #else 00194 __CRT_INLINE double __cdecl difftime(time_t _Time1,time_t _Time2) { return _difftime64(_Time1,_Time2); } 00195 __CRT_INLINE char *__cdecl ctime(const time_t *_Time) { return _ctime64(_Time); } 00196 __CRT_INLINE struct tm *__cdecl gmtime(const time_t *_Time) { return _gmtime64(_Time); } 00197 __CRT_INLINE struct tm *__cdecl localtime(const time_t *_Time) { return _localtime64(_Time); } 00198 __CRT_INLINE errno_t __cdecl localtime_s(struct tm *_Tm,const time_t *_Time) { return _localtime64_s(_Tm,_Time); } 00199 __CRT_INLINE time_t __cdecl mktime(struct tm *_Tm) { return _mktime64(_Tm); } 00200 __CRT_INLINE time_t __cdecl _mkgmtime(struct tm *_Tm) { return _mkgmtime64(_Tm); } 00201 __CRT_INLINE time_t __cdecl time(time_t *_Time) { return _time64(_Time); } 00202 #endif 00203 #endif 00204 00205 #if !defined(NO_OLDNAMES) || defined(_POSIX) 00206 #define CLK_TCK CLOCKS_PER_SEC 00207 00208 _CRTIMP extern int daylight; 00209 _CRTIMP extern long timezone; 00210 _CRTIMP extern char *tzname[2]; 00211 _CRTIMP void __cdecl tzset(void); 00212 #endif 00213 00214 #ifdef __cplusplus 00215 } 00216 #endif 00217 00218 #pragma pack(pop) 00219 00220 #endif /* End _TIME_H_ */ 00221 Generated on Fri May 25 2012 04:28:22 for ReactOS by
1.7.6.1
|