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.

122 lines
2.4 KiB

  1. /***
  2. *sys/utime.h - definitions/declarations for utime()
  3. *
  4. * Copyright (c) 1985-1997, 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) && !defined(_MAC)
  22. #error ERROR: Only Mac or Win32 targets 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. /* Define _CRTAPI1 (for compatibility with the NT SDK) */
  43. #ifndef _CRTAPI1
  44. #if _MSC_VER >= 800 && _M_IX86 >= 300
  45. #define _CRTAPI1 __cdecl
  46. #else
  47. #define _CRTAPI1
  48. #endif
  49. #endif
  50. #ifdef _WIN32
  51. #ifndef _WCHAR_T_DEFINED
  52. typedef unsigned short wchar_t;
  53. #define _WCHAR_T_DEFINED
  54. #endif
  55. #endif /* _WIN32 */
  56. #ifndef _TIME_T_DEFINED
  57. typedef long time_t;
  58. #define _TIME_T_DEFINED
  59. #endif
  60. /* define struct used by _utime() function */
  61. #ifndef _UTIMBUF_DEFINED
  62. struct _utimbuf {
  63. time_t actime; /* access time */
  64. time_t modtime; /* modification time */
  65. };
  66. #if !__STDC__
  67. /* Non-ANSI name for compatibility */
  68. struct utimbuf {
  69. time_t actime; /* access time */
  70. time_t modtime; /* modification time */
  71. };
  72. #endif
  73. #define _UTIMBUF_DEFINED
  74. #endif
  75. /* Function Prototypes */
  76. _CRTIMP int __cdecl _utime(const char *, struct _utimbuf *);
  77. #ifdef _WIN32
  78. _CRTIMP int __cdecl _futime(int, struct _utimbuf *);
  79. /* Wide Function Prototypes */
  80. _CRTIMP int __cdecl _wutime(const wchar_t *, struct _utimbuf *);
  81. #endif /* _WIN32 */
  82. #if !__STDC__
  83. /* Non-ANSI name for compatibility */
  84. _CRTIMP int __cdecl utime(const char *, struct utimbuf *);
  85. #endif
  86. #ifdef __cplusplus
  87. }
  88. #endif
  89. #ifdef _MSC_VER
  90. #pragma pack(pop)
  91. #endif /* _MSC_VER */
  92. #endif /* _INC_UTIME */