Author: tkreuzer Date: Mon Jan 19 15:53:26 2009 New Revision: 38955
URL: http://svn.reactos.org/svn/reactos?rev=38955&view=rev Log: time.h: add asctime_s and localtime_s, remove sec_api include wchar.h: fix WTIME definitions
Modified: branches/ros-amd64-bringup/reactos/include/crt/time.h branches/ros-amd64-bringup/reactos/include/crt/wchar.h
Modified: branches/ros-amd64-bringup/reactos/include/crt/time.h URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/includ... ============================================================================== --- branches/ros-amd64-bringup/reactos/include/crt/time.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/crt/time.h [iso-8859-1] Mon Jan 19 15:53:26 2009 @@ -114,8 +114,10 @@ _CRT_OBSOLETE(GetLocalTime) unsigned __cdecl _getsystime(struct tm *_Tm); _CRT_OBSOLETE(GetLocalTime) unsigned __cdecl _setsystime(struct tm *_Tm,unsigned _MilliSec);
+ _CRTIMP errno_t __cdecl asctime_s(char *_Buf,size_t _SizeInWords,const struct tm *_Tm); _CRTIMP errno_t __cdecl _ctime32_s(char *_Buf,size_t _SizeInBytes,const __time32_t *_Time); _CRTIMP errno_t __cdecl _gmtime32_s(struct tm *_Tm,const __time32_t *_Time); + _CRTIMP errno_t __cdecl localtime_s(struct tm *_Tm,const time_t *_Time); _CRTIMP errno_t __cdecl _localtime32_s(struct tm *_Tm,const __time32_t *_Time); _CRTIMP errno_t __cdecl _strdate_s(char *_Buf,size_t _SizeInBytes); _CRTIMP errno_t __cdecl _strtime_s(char *_Buf ,size_t _SizeInBytes); @@ -214,7 +216,5 @@
#pragma pack(pop)
-#include <sec_api/time_s.h> - #endif /* End _TIME_H_ */
Modified: branches/ros-amd64-bringup/reactos/include/crt/wchar.h URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/includ... ============================================================================== --- branches/ros-amd64-bringup/reactos/include/crt/wchar.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/crt/wchar.h [iso-8859-1] Mon Jan 19 15:53:26 2009 @@ -733,26 +733,36 @@
#ifndef _WTIME_DEFINED #define _WTIME_DEFINED - - _CRTIMP wchar_t *__cdecl _wasctime(const struct tm *_Tm); - _CRTIMP wchar_t *__cdecl _wctime32(const __time32_t *_Time); - size_t __cdecl wcsftime(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm); + _CRTIMP _CRT_INSECURE_DEPRECATE(_wasctime_s) wchar_t *__cdecl _wasctime(const struct tm *_Tm); + _CRTIMP wchar_t *__cdecl _wctime(const time_t *_Time); + _CRTIMP _CRT_INSECURE_DEPRECATE(_wctime32_s) wchar_t *__cdecl _wctime32(const __time32_t *_Time); + _CRTIMP size_t __cdecl wcsftime(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm); _CRTIMP size_t __cdecl _wcsftime_l(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm,_locale_t _Locale); _CRTIMP wchar_t *__cdecl _wstrdate(wchar_t *_Buffer); _CRTIMP wchar_t *__cdecl _wstrtime(wchar_t *_Buffer); + + _CRTIMP errno_t __cdecl _wasctime_s(wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm); + _CRTIMP errno_t __cdecl _wctime32_s(wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time); + _CRTIMP errno_t __cdecl _wstrdate_s(wchar_t *_Buf,size_t _SizeInWords); + _CRTIMP errno_t __cdecl _wstrtime_s(wchar_t *_Buf,size_t _SizeInWords); #if _INTEGRAL_MAX_BITS >= 64 - _CRTIMP wchar_t *__cdecl _wctime64(const __time64_t *_Time); + _CRTIMP _CRT_INSECURE_DEPRECATE(_wctime64_s) wchar_t *__cdecl _wctime64(const __time64_t *_Time); + _CRTIMP errno_t __cdecl _wctime64_s(wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time); #endif
#if !defined (RC_INVOKED) && !defined (_INC_WTIME_INL) #define _INC_WTIME_INL #ifdef _USE_32BIT_TIME_T -__CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime32(_Time); } +/* Do it like this to be compatible to msvcrt.dll on 32 bit windows XP and before */ +__CRT_INLINE wchar_t *__cdecl _wctime32(const time_t *_Time) { return _wctime(_Time); } +__CRT_INLINE errno_t _wctime32_s(wchar_t *_Buffer, size_t _SizeInWords,const __time32_t *_Time) { return _wctime32_s(_Buffer, _SizeInWords, _Time); } #else __CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime64(_Time); } -#endif -#endif -#endif +__CRT_INLINE errno_t _wctime_s(wchar_t *_Buffer, size_t _SizeInWords,const time_t *_Time) { return _wctime64_s(_Buffer, _SizeInWords, _Time); } +#endif +#endif + +#endif /* !_WTIME_DEFINED */
typedef int mbstate_t; typedef wchar_t _Wint_t;