|
|
|
1 |
|
/*** |
2 |
|
*timeb.inl - inline definitions for low-level file handling and I/O functions |
3 |
|
* |
4 |
|
* Copyright (c) Microsoft Corporation. All rights reserved. |
5 |
|
* |
6 |
|
*Purpose: |
7 |
|
* This file contains the definition of the _ftime() function. |
8 |
|
* |
9 |
|
* [Public] |
10 |
|
* |
11 |
|
****/ |
12 |
|
|
13 |
|
#if _MSC_VER > 1000 |
14 |
|
#pragma once |
15 |
|
#endif |
16 |
|
|
17 |
|
#if !defined(__CRTDECL) |
18 |
|
#if defined(_M_CEE_PURE) |
19 |
|
#define __CRTDECL |
20 |
|
#else |
21 |
|
#define __CRTDECL __cdecl |
22 |
|
#endif |
23 |
|
#endif |
24 |
|
|
25 |
|
#ifndef _INC_TIMEB_INL |
26 |
|
#define _INC_TIMEB_INL |
27 |
|
|
28 |
|
/* _STATIC_ASSERT is for enforcing boolean/integral conditions at compile time. |
29 |
|
Since it is purely a compile-time mechanism that generates no code, the check |
30 |
|
is left in even if _DEBUG is not defined. */ |
31 |
|
|
32 |
|
#ifndef _STATIC_ASSERT |
33 |
|
#define _STATIC_ASSERT(expr) typedef char __static_assert_t[ (expr) ] |
34 |
|
#endif |
35 |
|
|
36 |
|
#if !__STDC__ |
37 |
|
|
38 |
|
/* Non-ANSI name for compatibility */ |
39 |
|
|
40 |
|
#pragma warning(push) |
41 |
|
#pragma warning(disable:4996) |
42 |
|
|
43 |
|
#ifdef _USE_32BIT_TIME_T |
44 |
|
static __inline void __CRTDECL ftime(struct timeb * _Tmb) |
45 |
|
{ |
46 |
|
_STATIC_ASSERT( sizeof(struct timeb) == sizeof(struct __timeb32) ); |
47 |
|
_ftime32((struct __timeb32 *)_Tmb); |