| 1 |
/* |
| 2 |
* timeb.h |
| 3 |
* This file has no copyright assigned and is placed in the Public Domain. |
| 4 |
* This file is a part of the mingw-runtime package. |
| 5 |
* No warranty is given; refer to the file DISCLAIMER within the package. |
| 6 |
* |
| 7 |
* Support for the UNIX System V ftime system call. |
| 8 |
* |
| 9 |
*/ |
| 10 |
|
| 11 |
#ifndef _TIMEB_H_ |
| 12 |
#define _TIMEB_H_ |
| 13 |
|
| 14 |
/* All the headers include this file. */ |
| 15 |
#include <_mingw.h> |
| 16 |
#include <sys/types.h> |
| 17 |
|
| 18 |
#ifndef RC_INVOKED |
| 19 |
|
| 20 |
/* |
| 21 |
* TODO: Structure not tested. |
| 22 |
*/ |
| 23 |
struct _timeb |
| 24 |
{ |
| 25 |
time_t time; |
| 26 |
short millitm; |
| 27 |
short timezone; |
| 28 |
short dstflag; |
| 29 |
}; |
| 30 |
|
| 31 |
#if __MSVCRT_VERSION__ >= 0x0800 |
| 32 |
/* |
| 33 |
* TODO: Structure not tested. |
| 34 |
*/ |
| 35 |
struct __timeb32 |
| 36 |
{ |
| 37 |
__time32_t time; |
| 38 |
short millitm; |
| 39 |
short timezone; |
| 40 |
short dstflag; |
| 41 |
}; |
| 42 |
#endif /* __MSVCRT_VERSION__ >= 0x0800 */ |
| 43 |
|
| 44 |
#ifndef _NO_OLDNAMES |
| 45 |
/* |
| 46 |
* TODO: Structure not tested. |
| 47 |
*/ |
| 48 |
struct timeb |
| 49 |
{ |
| 50 |
time_t time; |
| 51 |
short millitm; |
| 52 |
short timezone; |
| 53 |
short dstflag; |
| 54 |
}; |
| 55 |
#endif |
| 56 |
|
| 57 |
#ifdef __cplusplus |
| 58 |
extern "C" { |
| 59 |
#endif |
| 60 |
|
| 61 |
/* TODO: Not tested. */ |
| 62 |
_CRTIMP void __cdecl __MINGW_NOTHROW _ftime (struct _timeb*); |
| 63 |
|
| 64 |
#ifndef _NO_OLDNAMES |
| 65 |
/* FIXME for __MSVCRT_VERSION__ >= 0x0800 */ |
| 66 |
_CRTIMP void __cdecl __MINGW_NOTHROW ftime (struct timeb*); |
| 67 |
#endif /* Not _NO_OLDNAMES */ |
| 68 |
|
| 69 |
/* This requires newer versions of msvcrt.dll (6.10 or higher). */ |
| 70 |
#if __MSVCRT_VERSION__ >= 0x0601 |
| 71 |
struct __timeb64 |
| 72 |
{ |
| 73 |
__time64_t time; |
| 74 |
short millitm; |
| 75 |
short timezone; |
| 76 |
short dstflag; |
| 77 |
}; |
| 78 |
|
| 79 |
_CRTIMP void __cdecl __MINGW_NOTHROW _ftime64 (struct __timeb64*); |
| 80 |
#endif /* __MSVCRT_VERSION__ >= 0x0601 */ |
| 81 |
|
| 82 |
#if __MSVCRT_VERSION__ >= 0x0800 |
| 83 |
_CRTIMP void __cdecl __MINGW_NOTHROW _ftime32 (struct __timeb32*); |
| 84 |
#ifndef _USE_32BIT_TIME_T |
| 85 |
_CRTALIAS void __cdecl __MINGW_NOTHROW _ftime (struct _timeb* _v) { return(_ftime64 ((struct __timeb64*)_v)); } |
| 86 |
#else |
| 87 |
_CRTALIAS void __cdecl __MINGW_NOTHROW _ftime (struct _timeb* _v) { return(_ftime32 ((struct __timeb32*)_v)); } |
| 88 |
#endif |
| 89 |
#endif /* __MSVCRT_VERSION__ >= 0x0800 */ |
| 90 |
|
| 91 |
#ifdef __cplusplus |
| 92 |
} |
| 93 |
#endif |
| 94 |
|
| 95 |
#endif /* Not RC_INVOKED */ |
| 96 |
|
| 97 |
#endif /* Not _TIMEB_H_ */ |