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.

129 lines
2.8 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. ****/
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. #ifndef _INC_UTIME
  20. #define _INC_UTIME
  21. #if !defined(_WIN32)
  22. #error ERROR: Only Win32 target supported!
  23. #endif
  24. #ifdef _MSC_VER
  25. #pragma pack(push,8)
  26. #endif /* _MSC_VER */
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30. /* Define _CRTIMP */
  31. #ifndef _CRTIMP
  32. #ifdef _DLL
  33. #define _CRTIMP __declspec(dllimport)
  34. #else /* ndef _DLL */
  35. #define _CRTIMP
  36. #endif /* _DLL */
  37. #endif /* _CRTIMP */
  38. /* Define __cdecl for non-Microsoft compilers */
  39. #if ( !defined(_MSC_VER) && !defined(__cdecl) )
  40. #define __cdecl
  41. #endif
  42. #ifndef _WCHAR_T_DEFINED
  43. typedef unsigned short wchar_t;
  44. #define _WCHAR_T_DEFINED
  45. #endif
  46. #ifndef _TIME_T_DEFINED
  47. #ifdef _WIN64
  48. typedef __int64 time_t; /* time value */
  49. #else
  50. typedef long time_t; /* time value */
  51. #endif
  52. #if _INTEGRAL_MAX_BITS >= 64
  53. typedef __int64 __time64_t;
  54. #endif
  55. #define _TIME_T_DEFINED /* avoid multiple def's of time_t */
  56. #endif
  57. /* define struct used by _utime() function */
  58. #ifndef _UTIMBUF_DEFINED
  59. struct _utimbuf {
  60. time_t actime; /* access time */
  61. time_t modtime; /* modification time */
  62. };
  63. #if !__STDC__
  64. /* Non-ANSI name for compatibility */
  65. struct utimbuf {
  66. time_t actime; /* access time */
  67. time_t modtime; /* modification time */
  68. };
  69. #endif
  70. #if _INTEGRAL_MAX_BITS >= 64
  71. struct __utimbuf64 {
  72. __time64_t actime; /* access time */
  73. __time64_t modtime; /* modification time */
  74. };
  75. #endif
  76. #define _UTIMBUF_DEFINED
  77. #endif
  78. /* Function Prototypes */
  79. _CRTIMP int __cdecl _utime(const char *, struct _utimbuf *);
  80. _CRTIMP int __cdecl _futime(int, struct _utimbuf *);
  81. /* Wide Function Prototypes */
  82. _CRTIMP int __cdecl _wutime(const wchar_t *, struct _utimbuf *);
  83. #if _INTEGRAL_MAX_BITS >= 64
  84. _CRTIMP int __cdecl _utime64(const char *, struct __utimbuf64 *);
  85. _CRTIMP int __cdecl _futime64(int, struct __utimbuf64 *);
  86. _CRTIMP int __cdecl _wutime64(const wchar_t *, struct __utimbuf64 *);
  87. #endif
  88. #if !__STDC__
  89. /* Non-ANSI name for compatibility */
  90. _CRTIMP int __cdecl utime(const char *, struct utimbuf *);
  91. #endif
  92. #ifdef __cplusplus
  93. }
  94. #endif
  95. #ifdef _MSC_VER
  96. #pragma pack(pop)
  97. #endif /* _MSC_VER */
  98. #endif /* _INC_UTIME */