Home | History | Annotate | Download | only in sec_api
      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 #ifndef _TIME_H__S
      7 #define _TIME_H__S
      8 
      9 #include <time.h>
     10 
     11 #if defined(MINGW_HAS_SECURE_API)
     12 
     13 #ifdef __cplusplus
     14 extern "C" {
     15 #endif
     16 
     17   errno_t __cdecl _ctime32_s (char *_Buf,size_t _SizeInBytes,const __time32_t *_Time);
     18   errno_t __cdecl _gmtime32_s (struct tm *_Tm,const __time32_t *_Time);
     19   errno_t __cdecl _localtime32_s (struct tm *_Tm,const __time32_t *_Time);
     20   errno_t __cdecl asctime_s (char *_Buf,size_t _SizeInWords,const struct tm *_Tm);
     21   errno_t __cdecl _strdate_s (char *_Buf,size_t _SizeInBytes);
     22   errno_t __cdecl _strtime_s (char *_Buf ,size_t _SizeInBytes);
     23   errno_t __cdecl _ctime64_s (char *_Buf,size_t _SizeInBytes,const __time64_t *_Time);
     24   errno_t __cdecl _gmtime64_s (struct tm *_Tm,const __time64_t *_Time);
     25   errno_t __cdecl _localtime64_s (struct tm *_Tm,const __time64_t *_Time);
     26 
     27 #ifndef _WTIME_S_DEFINED
     28 #define _WTIME_S_DEFINED
     29   errno_t __cdecl _wasctime_s (wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm);
     30   errno_t __cdecl _wctime32_s (wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time);
     31   errno_t __cdecl _wstrdate_s (wchar_t *_Buf,size_t _SizeInWords);
     32   errno_t __cdecl _wstrtime_s (wchar_t *_Buf,size_t _SizeInWords);
     33   errno_t __cdecl _wctime64_s (wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time);
     34 
     35 #if !defined (RC_INVOKED) && !defined (_INC_WTIME_S_INL)
     36 #define _INC_WTIME_S_INL
     37   errno_t __cdecl _wctime_s(wchar_t *, size_t, const time_t *);
     38 #ifndef _USE_32BIT_TIME_T
     39 __CRT_INLINE errno_t __cdecl _wctime_s (wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime64_s (_Buffer,_SizeInWords,_Time); }
     40 #endif
     41 #endif
     42 #endif
     43 
     44 #ifndef RC_INVOKED
     45 #ifdef _USE_32BIT_TIME_T
     46 __CRT_INLINE errno_t __cdecl localtime_s(struct tm *_Tm,const time_t *_Time) { return _localtime32_s(_Tm,_Time); }
     47 __CRT_INLINE errno_t __cdecl gmtime_s(struct tm *_Tm, const time_t *_Time)   { return _gmtime32_s(_Tm, _Time); }
     48 
     49 #else
     50 __CRT_INLINE errno_t __cdecl localtime_s(struct tm *_Tm,const time_t *_Time) { return _localtime64_s(_Tm,_Time); }
     51 __CRT_INLINE errno_t __cdecl gmtime_s(struct tm *_Tm, const time_t *_Time) { return _gmtime64_s(_Tm, _Time); }
     52 #endif
     53 #endif
     54 
     55 #ifdef __cplusplus
     56 }
     57 #endif
     58 
     59 #endif
     60 #endif
     61