Leaked source code of windows server 2003
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.

180 lines
5.3 KiB

  1. /***
  2. *sys/utime.h - definitions/declarations for utime()
  3. *
  4. * Copyright (c) 1985-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * This file defines the structure used by the utime routine to set
  8. * new file access and modification times. NOTE - MS-DOS
  9. * does not recognize access time, so this field will
  10. * always be ignored and the modification time field will be
  11. * used to set the new time.
  12. *
  13. * [Public]
  14. *
  15. *Revision History:
  16. * 07-28-87 SKS Fixed TIME_T_DEFINED to be _TIME_T_DEFINED
  17. * 12-11-87 JCR Added "_loadds" functionality
  18. * 12-18-87 JCR Added _FAR_ to declarations
  19. * 02-10-88 JCR Cleaned up white space
  20. * 05-03-89 JCR Added _INTERNAL_IFSTRIP for relinc usage
  21. * 08-22-89 GJF Cleanup, now specific to OS/2 2.0 (i.e., 386 flat model)
  22. * 10-30-89 GJF Fixed copyright
  23. * 11-02-89 JCR Changed "DLL" to "_DLL"
  24. * 03-21-90 GJF Added #ifndef _INC_UTIME and #include <cruntime.h>
  25. * stuff, and replaced _cdecl with _CALLTYPE1 in the
  26. * prototype.
  27. * 01-22-91 GJF ANSI naming.
  28. * 08-20-91 JCR C++ and ANSI naming
  29. * 08-26-91 BWM Added prototype for _futime.
  30. * 09-28-91 JCR ANSI names: DOSX32=prototypes, WIN32=#defines for now
  31. * 08-07-92 GJF Function calling type and variable type macros.
  32. * 01-21-93 GJF Removed support for C6-386's _cdecl.
  33. * 04-06-93 SKS Replace _CRTAPI1/2 with __cdecl, _CRTVAR1 with nothing
  34. * 04-07-93 SKS Add _CRTIMP keyword for CRT DLL model
  35. * Use link-time aliases for old names, not #define's
  36. * 09-10-93 GJF Merged NT SDK and Cuda versions.
  37. * 12-07-93 CFW Add wide char version protos.
  38. * 11-03-94 GJF Ensure 8 byte alignment.
  39. * 12-28-94 JCF Merged with mac header.
  40. * 02-14-95 CFW Clean up Mac merge, add _CRTBLD.
  41. * 04-27-95 CFW Add mac/win32 test.
  42. * 12-14-95 JWM Add "#pragma once".
  43. * 01-23-97 GJF Cleaned out obsolete support for _NTSDK and _CRTAPI*.
  44. * Also, detab-ed.
  45. * 09-30-97 JWM Restored not-so-obsolete _CRTAPI1 support.
  46. * 10-07-97 RDL Added IA64.
  47. * 05-06-98 GJF Added __time64_t support.
  48. * 02-25-99 GJF Changed time_t to __int64
  49. * 05-13-99 PML Remove _CRTAPI1
  50. * 05-17-99 PML Remove all Macintosh support.
  51. *
  52. ****/
  53. #if _MSC_VER > 1000 /*IFSTRIP=IGN*/
  54. #pragma once
  55. #endif
  56. #ifndef _INC_UTIME
  57. #define _INC_UTIME
  58. #if !defined(_WIN32)
  59. #error ERROR: Only Win32 target supported!
  60. #endif
  61. #ifndef _CRTBLD
  62. /* This version of the header files is NOT for user programs.
  63. * It is intended for use when building the C runtimes ONLY.
  64. * The version intended for public use will not have this message.
  65. */
  66. #error ERROR: Use of C runtime library internal header file.
  67. #endif /* _CRTBLD */
  68. #ifdef _MSC_VER
  69. #pragma pack(push,8)
  70. #endif /* _MSC_VER */
  71. #ifdef __cplusplus
  72. extern "C" {
  73. #endif
  74. #ifndef _INTERNAL_IFSTRIP_
  75. #include <cruntime.h>
  76. #endif /* _INTERNAL_IFSTRIP_ */
  77. /* Define _CRTIMP */
  78. #ifndef _CRTIMP
  79. #ifdef CRTDLL
  80. #define _CRTIMP __declspec(dllexport)
  81. #else /* ndef CRTDLL */
  82. #ifdef _DLL
  83. #define _CRTIMP __declspec(dllimport)
  84. #else /* ndef _DLL */
  85. #define _CRTIMP
  86. #endif /* _DLL */
  87. #endif /* CRTDLL */
  88. #endif /* _CRTIMP */
  89. /* Define __cdecl for non-Microsoft compilers */
  90. #if ( !defined(_MSC_VER) && !defined(__cdecl) )
  91. #define __cdecl
  92. #endif
  93. #ifndef _WCHAR_T_DEFINED
  94. typedef unsigned short wchar_t;
  95. #define _WCHAR_T_DEFINED
  96. #endif
  97. #ifndef _TIME_T_DEFINED
  98. #ifdef _WIN64
  99. typedef __int64 time_t; /* time value */
  100. #else
  101. typedef long time_t; /* time value */
  102. #endif
  103. #if _INTEGRAL_MAX_BITS >= 64 /*IFSTRIP=IGN*/
  104. typedef __int64 __time64_t;
  105. #endif
  106. #define _TIME_T_DEFINED /* avoid multiple def's of time_t */
  107. #endif
  108. /* define struct used by _utime() function */
  109. #ifndef _UTIMBUF_DEFINED
  110. struct _utimbuf {
  111. time_t actime; /* access time */
  112. time_t modtime; /* modification time */
  113. };
  114. #if !__STDC__
  115. /* Non-ANSI name for compatibility */
  116. struct utimbuf {
  117. time_t actime; /* access time */
  118. time_t modtime; /* modification time */
  119. };
  120. #endif
  121. #if _INTEGRAL_MAX_BITS >= 64 /*IFSTRIP=IGN*/
  122. struct __utimbuf64 {
  123. __time64_t actime; /* access time */
  124. __time64_t modtime; /* modification time */
  125. };
  126. #endif
  127. #define _UTIMBUF_DEFINED
  128. #endif
  129. /* Function Prototypes */
  130. _CRTIMP int __cdecl _utime(const char *, struct _utimbuf *);
  131. _CRTIMP int __cdecl _futime(int, struct _utimbuf *);
  132. /* Wide Function Prototypes */
  133. _CRTIMP int __cdecl _wutime(const wchar_t *, struct _utimbuf *);
  134. #if _INTEGRAL_MAX_BITS >= 64 /*IFSTRIP=IGN*/
  135. _CRTIMP int __cdecl _utime64(const char *, struct __utimbuf64 *);
  136. _CRTIMP int __cdecl _futime64(int, struct __utimbuf64 *);
  137. _CRTIMP int __cdecl _wutime64(const wchar_t *, struct __utimbuf64 *);
  138. #endif
  139. #if !__STDC__
  140. /* Non-ANSI name for compatibility */
  141. _CRTIMP int __cdecl utime(const char *, struct utimbuf *);
  142. #endif
  143. #ifdef __cplusplus
  144. }
  145. #endif
  146. #ifdef _MSC_VER
  147. #pragma pack(pop)
  148. #endif /* _MSC_VER */
  149. #endif /* _INC_UTIME */