home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / sys / utime.h < prev   
Encoding:
C/C++ Source or Header  |  1998-06-16  |  2.4 KB  |  123 lines

  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.  
  17. #if _MSC_VER > 1000
  18. #pragma once
  19. #endif
  20.  
  21. #ifndef _INC_UTIME
  22. #define _INC_UTIME
  23.  
  24. #if !defined(_WIN32) && !defined(_MAC)
  25. #error ERROR: Only Mac or Win32 targets supported!
  26. #endif
  27.  
  28.  
  29. #ifdef  _MSC_VER
  30. #pragma pack(push,8)
  31. #endif  /* _MSC_VER */
  32.  
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36.  
  37.  
  38.  
  39. /* Define _CRTIMP */
  40.  
  41. #ifndef _CRTIMP
  42. #ifdef  _DLL
  43. #define _CRTIMP __declspec(dllimport)
  44. #else   /* ndef _DLL */
  45. #define _CRTIMP
  46. #endif  /* _DLL */
  47. #endif  /* _CRTIMP */
  48.  
  49.  
  50. /* Define __cdecl for non-Microsoft compilers */
  51.  
  52. #if     ( !defined(_MSC_VER) && !defined(__cdecl) )
  53. #define __cdecl
  54. #endif
  55.  
  56. /* Define _CRTAPI1 (for compatibility with the NT SDK) */
  57.  
  58. #ifndef _CRTAPI1
  59. #if    _MSC_VER >= 800 && _M_IX86 >= 300
  60. #define _CRTAPI1 __cdecl
  61. #else
  62. #define _CRTAPI1
  63. #endif
  64. #endif
  65.  
  66. #ifdef  _WIN32
  67. #ifndef _WCHAR_T_DEFINED
  68. typedef unsigned short wchar_t;
  69. #define _WCHAR_T_DEFINED
  70. #endif
  71. #endif  /* _WIN32 */
  72.  
  73. #ifndef _TIME_T_DEFINED
  74. typedef long time_t;
  75. #define _TIME_T_DEFINED
  76. #endif
  77.  
  78. /* define struct used by _utime() function */
  79.  
  80. #ifndef _UTIMBUF_DEFINED
  81.  
  82. struct _utimbuf {
  83.         time_t actime;          /* access time */
  84.         time_t modtime;         /* modification time */
  85.         };
  86.  
  87. #if     !__STDC__
  88. /* Non-ANSI name for compatibility */
  89. struct utimbuf {
  90.         time_t actime;          /* access time */
  91.         time_t modtime;         /* modification time */
  92.         };
  93. #endif
  94.  
  95. #define _UTIMBUF_DEFINED
  96. #endif
  97.  
  98.  
  99. /* Function Prototypes */
  100.  
  101. _CRTIMP int __cdecl _utime(const char *, struct _utimbuf *);
  102. #ifdef _WIN32
  103. _CRTIMP int __cdecl _futime(int, struct _utimbuf *);
  104.  
  105. /* Wide Function Prototypes */
  106. _CRTIMP int __cdecl _wutime(const wchar_t *, struct _utimbuf *);
  107. #endif /* _WIN32 */
  108.  
  109. #if     !__STDC__
  110. /* Non-ANSI name for compatibility */
  111. _CRTIMP int __cdecl utime(const char *, struct utimbuf *);
  112. #endif
  113.  
  114. #ifdef __cplusplus
  115. }
  116. #endif
  117.  
  118. #ifdef  _MSC_VER
  119. #pragma pack(pop)
  120. #endif  /* _MSC_VER */
  121.  
  122. #endif  /* _INC_UTIME */
  123.