home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / crt / src / sys / timeb.h < prev    next >
C/C++ Source or Header  |  1998-06-17  |  3KB  |  133 lines

  1. /***
  2. *sys/timeb.h - definition/declarations for _ftime()
  3. *
  4. *       Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. *       This file define the _ftime() function and the types it uses.
  8. *       [System V]
  9. *
  10. *       [Public]
  11. *
  12. ****/
  13.  
  14. #if _MSC_VER > 1000
  15. #pragma once
  16. #endif  /* _MSC_VER > 1000 */
  17.  
  18. #ifndef _INC_TIMEB
  19. #define _INC_TIMEB
  20.  
  21. #if !defined (_WIN32) && !defined (_MAC)
  22. #error ERROR: Only Mac or Win32 targets supported!
  23. #endif  /* !defined (_WIN32) && !defined (_MAC) */
  24.  
  25. #ifndef _CRTBLD
  26. /* This version of the header files is NOT for user programs.
  27.  * It is intended for use when building the C runtimes ONLY.
  28.  * The version intended for public use will not have this message.
  29.  */
  30. #error ERROR: Use of C runtime library internal header file.
  31. #endif  /* _CRTBLD */
  32.  
  33. #ifdef _MSC_VER
  34. #pragma pack(push,8)
  35. #endif  /* _MSC_VER */
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif  /* __cplusplus */
  40.  
  41. #ifndef _INTERNAL_IFSTRIP_
  42. #include <cruntime.h>
  43. #endif  /* _INTERNAL_IFSTRIP_ */
  44.  
  45.  
  46. /* Define _CRTIMP */
  47.  
  48. #ifndef _CRTIMP
  49. #ifdef CRTDLL
  50. #define _CRTIMP __declspec(dllexport)
  51. #else  /* CRTDLL */
  52. #ifdef _DLL
  53. #define _CRTIMP __declspec(dllimport)
  54. #else  /* _DLL */
  55. #define _CRTIMP
  56. #endif  /* _DLL */
  57. #endif  /* CRTDLL */
  58. #endif  /* _CRTIMP */
  59.  
  60.  
  61. /* Define __cdecl for non-Microsoft compilers */
  62.  
  63. #if (!defined (_MSC_VER) && !defined (__cdecl))
  64. #define __cdecl
  65. #endif  /* (!defined (_MSC_VER) && !defined (__cdecl)) */
  66.  
  67. /* Define _CRTAPI1 (for compatibility with the NT SDK) */
  68.  
  69. #ifndef _CRTAPI1
  70. #if _MSC_VER >= 800 && _M_IX86 >= 300
  71. #define _CRTAPI1 __cdecl
  72. #else  /* _MSC_VER >= 800 && _M_IX86 >= 300 */
  73. #define _CRTAPI1
  74. #endif  /* _MSC_VER >= 800 && _M_IX86 >= 300 */
  75. #endif  /* _CRTAPI1 */
  76.  
  77.  
  78. #ifndef _TIME_T_DEFINED
  79. typedef long time_t;
  80. #define _TIME_T_DEFINED
  81. #endif  /* _TIME_T_DEFINED */
  82.  
  83.  
  84. /* Structure returned by _ftime system call */
  85.  
  86. #ifndef _TIMEB_DEFINED
  87. struct _timeb {
  88.         time_t time;
  89.         unsigned short millitm;
  90.         short timezone;
  91.         short dstflag;
  92.         };
  93.  
  94. #if !__STDC__
  95.  
  96. /* Non-ANSI name for compatibility */
  97.  
  98. struct timeb {
  99.         time_t time;
  100.         unsigned short millitm;
  101.         short timezone;
  102.         short dstflag;
  103.         };
  104.  
  105. #endif  /* !__STDC__ */
  106.  
  107. #define _TIMEB_DEFINED
  108. #endif  /* _TIMEB_DEFINED */
  109.  
  110.  
  111. /* Function prototypes */
  112.  
  113. _CRTIMP void __cdecl _ftime(struct _timeb *);
  114.  
  115. #if !__STDC__
  116.  
  117. /* Non-ANSI name for compatibility */
  118.  
  119. _CRTIMP void __cdecl ftime(struct timeb *);
  120.  
  121. #endif  /* !__STDC__ */
  122.  
  123.  
  124. #ifdef __cplusplus
  125. }
  126. #endif  /* __cplusplus */
  127.  
  128. #ifdef _MSC_VER
  129. #pragma pack(pop)
  130. #endif  /* _MSC_VER */
  131.  
  132. #endif  /* _INC_TIMEB */
  133.