Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

182 lines
4.9 KiB

  1. /***
  2. *sys/timeb.h - definition/declarations for _ftime()
  3. *
  4. * Copyright (c) 1985-2001, 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. *Revision History:
  13. * 07-28-87 SKS Fixed TIME_T_DEFINED to be _TIME_T_DEFINED
  14. * 12-11-87 JCR Added "_loadds" functionality
  15. * 12-18-87 JCR Added _FAR_ to declarations
  16. * 02-10-88 JCR Cleaned up white space
  17. * 05-03-89 JCR Added _INTERNAL_IFSTRIP for relinc usage
  18. * 08-22-89 GJF Cleanup, now specific to OS/2 2.0 (i.e., 386 flat model)
  19. * 10-30-89 GJF Fixed copyright
  20. * 11-02-89 JCR Changed "DLL" to "_DLL"
  21. * 03-21-90 GJF Added #ifndef _INC_TIMEB stuff, added #include
  22. * <cruntime.h> and replaced _cdecl with _CALLTYPE1 in
  23. * prototype. Also, removed some (now) useless
  24. * preprocessor directives.
  25. * 01-21-91 GJF ANSI naming.
  26. * 08-20-91 JCR C++ and ANSI naming
  27. * 09-28-91 JCR ANSI names: DOSX32=prototypes, WIN32=#defines for now
  28. * 01-23-92 GJF Had to change name of time zone field in timeb struct
  29. * to "tmzone" to make global time zone variable work in
  30. * crtdll.dll. INCOMPATIBLE CHANGE! OLD NAMING CANNOT BE
  31. * SUPPORTED BY A MACRO!
  32. * 08-07-92 GJF Function calling type and variable type macros.
  33. * 01-21-93 GJF Removed support for C6-386's _cdecl.
  34. * 04-06-93 SKS Replace _CRTAPI1/2 with __cdecl, _CRTVAR1 with nothing
  35. * 04-07-93 SKS Add _CRTIMP keyword for CRT DLL model
  36. * Use link-time aliases for old names, not #define's
  37. * Restore "timezone" field to its correct name.
  38. * 10-13-93 GJF Merged NT and Cuda versions.
  39. * 11-03-94 GJF Ensure 8 byte alignment.
  40. * 12-28-94 JCF Merged with mac header.
  41. * 02-14-95 CFW Clean up Mac merge, add _CRTBLD.
  42. * 04-27-95 CFW Add mac/win32 test.
  43. * 12-14-95 JWM Add "#pragma once".
  44. * 01-23-97 GJF Cleaned out obsolete support for _NTSDK and _CRTAPI*.
  45. * Also, detab-ed.
  46. * 09-30-97 JWM Restored not-so-obsolete _CRTAPI1 support.
  47. * 10-07-97 RDL Added IA64.
  48. * 05-06-98 GJF Added __time64_t support.
  49. * 02-25-99 GJF Changed time_t to __int64
  50. * 05-13-99 PML Remove _CRTAPI1
  51. * 05-17-99 PML Remove all Macintosh support.
  52. *
  53. ****/
  54. #if _MSC_VER > 1000 /*IFSTRIP=IGN*/
  55. #pragma once
  56. #endif
  57. #ifndef _INC_TIMEB
  58. #define _INC_TIMEB
  59. #if !defined(_WIN32)
  60. #error ERROR: Only Win32 target supported!
  61. #endif
  62. #ifndef _CRTBLD
  63. /* This version of the header files is NOT for user programs.
  64. * It is intended for use when building the C runtimes ONLY.
  65. * The version intended for public use will not have this message.
  66. */
  67. #error ERROR: Use of C runtime library internal header file.
  68. #endif /* _CRTBLD */
  69. #ifdef _MSC_VER
  70. #pragma pack(push,8)
  71. #endif /* _MSC_VER */
  72. #ifdef __cplusplus
  73. extern "C" {
  74. #endif
  75. #ifndef _INTERNAL_IFSTRIP_
  76. #include <cruntime.h>
  77. #endif /* _INTERNAL_IFSTRIP_ */
  78. /* Define _CRTIMP */
  79. #ifndef _CRTIMP
  80. #ifdef CRTDLL
  81. #define _CRTIMP __declspec(dllexport)
  82. #else /* ndef CRTDLL */
  83. #ifdef _DLL
  84. #define _CRTIMP __declspec(dllimport)
  85. #else /* ndef _DLL */
  86. #define _CRTIMP
  87. #endif /* _DLL */
  88. #endif /* CRTDLL */
  89. #endif /* _CRTIMP */
  90. /* Define __cdecl for non-Microsoft compilers */
  91. #if ( !defined(_MSC_VER) && !defined(__cdecl) )
  92. #define __cdecl
  93. #endif
  94. #ifndef _TIME_T_DEFINED
  95. #ifdef _WIN64
  96. typedef __int64 time_t; /* time value */
  97. #else
  98. typedef long time_t; /* time value */
  99. #endif
  100. #if _INTEGRAL_MAX_BITS >= 64 /*IFSTRIP=IGN*/
  101. typedef __int64 __time64_t;
  102. #endif
  103. #define _TIME_T_DEFINED /* avoid multiple def's of time_t */
  104. #endif
  105. /* Structure returned by _ftime system call */
  106. #ifndef _TIMEB_DEFINED
  107. struct _timeb {
  108. time_t time;
  109. unsigned short millitm;
  110. short timezone;
  111. short dstflag;
  112. };
  113. #if !__STDC__
  114. /* Non-ANSI name for compatibility */
  115. struct timeb {
  116. time_t time;
  117. unsigned short millitm;
  118. short timezone;
  119. short dstflag;
  120. };
  121. #endif
  122. #if _INTEGRAL_MAX_BITS >= 64 /*IFSTRIP=IGN*/
  123. struct __timeb64 {
  124. __time64_t time;
  125. unsigned short millitm;
  126. short timezone;
  127. short dstflag;
  128. };
  129. #endif
  130. #define _TIMEB_DEFINED
  131. #endif
  132. /* Function prototypes */
  133. _CRTIMP void __cdecl _ftime(struct _timeb *);
  134. #if !__STDC__
  135. /* Non-ANSI name for compatibility */
  136. _CRTIMP void __cdecl ftime(struct timeb *);
  137. #endif
  138. #if _INTEGRAL_MAX_BITS >= 64 /*IFSTRIP=IGN*/
  139. _CRTIMP void __cdecl _ftime64(struct __timeb64 *);
  140. #endif
  141. #ifdef __cplusplus
  142. }
  143. #endif
  144. #ifdef _MSC_VER
  145. #pragma pack(pop)
  146. #endif /* _MSC_VER */
  147. #endif /* _INC_TIMEB */