|
|
|
1 |
|
/*** |
2 |
|
*wstat.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 function definitions for the low-level |
8 |
|
* file handling and I/O functions. |
9 |
|
* |
10 |
|
* [Public] |
11 |
|
* |
12 |
|
****/ |
13 |
|
|
14 |
|
#if _MSC_VER > 1000 |
15 |
|
#pragma once |
16 |
|
#endif |
17 |
|
|
18 |
|
#if !defined(__CRTDECL) |
19 |
|
#if defined(_M_CEE_PURE) |
20 |
|
#define __CRTDECL |
21 |
|
#else |
22 |
|
#define __CRTDECL __cdecl |
23 |
|
#endif |
24 |
|
#endif |
25 |
|
|
26 |
|
#ifndef _INC_WSTAT_INL |
27 |
|
#define _INC_WSTAT_INL |
28 |
|
|
29 |
|
/* _STATIC_ASSERT is for enforcing boolean/integral conditions at compile time. |
30 |
|
Since it is purely a compile-time mechanism that generates no code, the check |
31 |
|
is left in even if _DEBUG is not defined. */ |
32 |
|
|
33 |
|
#ifndef _STATIC_ASSERT |
34 |
|
#define _STATIC_ASSERT(expr) typedef char __static_assert_t[ (expr) ] |
35 |
|
#endif |
36 |
|
|
37 |
|
#ifdef _USE_32BIT_TIME_T |
38 |
|
static __inline int __CRTDECL _wstat(const wchar_t * _Filename, struct _stat * _Stat) |
39 |
|
{ |
40 |
|
_STATIC_ASSERT( sizeof(struct _stat) == sizeof(struct _stat32) ); |
41 |
|
return _wstat32(_Filename,(struct _stat32 *)_Stat); |
42 |
|
} |
43 |
|
#else |
44 |
|
static __inline int __CRTDECL _wstat(const wchar_t * _Filename, struct _stat * _Stat) |
45 |
|
{ |
46 |
|
_STATIC_ASSERT( sizeof(struct _stat) == sizeof(struct _stat64i32) ); |
47 |
|
return _wstat64i32(_Filename,(struct _stat64i32 *)_Stat); |
48 |
|
} |
49 |
|
#endif /* _USE_32BIT_TIME_T */ |
50 |
|
|
51 |
|
#ifdef _USE_32BIT_TIME_T |
52 |
|
static __inline int __CRTDECL _wstati64(const wchar_t * _Filename, struct _stati64 * _Stat) |
53 |
|
{ |