Reactos
at master 112 lines 2.5 kB view raw
1// 2// sys/timeb.h 3// 4// Copyright (c) Microsoft Corporation. All rights reserved. 5// 6// The _ftime() family of functions 7// 8#pragma once 9 10#include <corecrt.h> 11 12#pragma warning(push) 13#pragma warning(disable: _UCRT_DISABLED_WARNINGS) 14_UCRT_DISABLE_CLANG_WARNINGS 15 16_CRT_BEGIN_C_HEADER 17 18//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 19// 20// Types 21// 22//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 23struct __timeb32 24{ 25 __time32_t time; 26 unsigned short millitm; 27 short timezone; 28 short dstflag; 29}; 30 31struct __timeb64 32{ 33 __time64_t time; 34 unsigned short millitm; 35 short timezone; 36 short dstflag; 37}; 38 39#if defined(_CRT_INTERNAL_NONSTDC_NAMES) && _CRT_INTERNAL_NONSTDC_NAMES && !defined _CRT_NO_TIME_T 40 struct timeb 41 { 42 time_t time; 43 unsigned short millitm; 44 short timezone; 45 short dstflag; 46 }; 47#endif 48 49 50 51//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 52// 53// Functions 54// 55//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 56#ifdef _USE_32BIT_TIME_T 57 #define _timeb __timeb32 58 #define _ftime _ftime32 59 #define _ftime_s _ftime32_s 60#else 61 #define _timeb __timeb64 62 #define _ftime _ftime64 63 #define _ftime_s _ftime64_s 64#endif 65 66 67 68_CRT_INSECURE_DEPRECATE(_ftime32_s) 69_ACRTIMP void __cdecl _ftime32( 70 _Out_ struct __timeb32* _Time 71 ); 72 73_ACRTIMP errno_t __cdecl _ftime32_s( 74 _Out_ struct __timeb32* _Time 75 ); 76 77_CRT_INSECURE_DEPRECATE(_ftime64_s) 78_ACRTIMP void __cdecl _ftime64( 79 _Out_ struct __timeb64* _Time 80 ); 81 82_ACRTIMP errno_t __cdecl _ftime64_s( 83 _Out_ struct __timeb64* _Time 84 ); 85 86 87 88#if !defined RC_INVOKED && !defined __midl && defined(_CRT_INTERNAL_NONSTDC_NAMES) && _CRT_INTERNAL_NONSTDC_NAMES && !defined _CRT_NO_TIME_T 89 90 #ifdef _USE_32BIT_TIME_T 91 92 static __inline void __CRTDECL ftime(struct timeb* const _Tmb) 93 { 94 _STATIC_ASSERT(sizeof(struct timeb) == sizeof(struct __timeb32)); 95 _ftime32((struct __timeb32*)_Tmb); 96 } 97 98 #else 99 100 static __inline void __CRTDECL ftime(struct timeb* const _Tmb) 101 { 102 _STATIC_ASSERT(sizeof(struct timeb) == sizeof(struct __timeb64)); 103 _ftime64((struct __timeb64*)_Tmb); 104 } 105 106 #endif 107 108#endif 109 110_CRT_END_C_HEADER 111_UCRT_RESTORE_CLANG_WARNINGS 112#pragma warning(pop) // _UCRT_DISABLED_WARNINGS