home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / crt / src / sys / utime.h < prev   
C/C++ Source or Header  |  1998-06-17  |  3KB  |  137 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  /* _MSC_VER > 1000 */
  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  /* !defined (_WIN32) && !defined (_MAC) */
  27.  
  28. #ifndef _CRTBLD
  29. /* This version of the header files is NOT for user programs.
  30.  * It is intended for use when building the C runtimes ONLY.
  31.  * The version intended for public use will not have this message.
  32.  */
  33. #error ERROR: Use of C runtime library internal header file.
  34. #endif  /* _CRTBLD */
  35.  
  36. #ifdef _MSC_VER
  37. #pragma pack(push,8)
  38. #endif  /* _MSC_VER */
  39.  
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif  /* __cplusplus */
  43.  
  44. #ifndef _INTERNAL_IFSTRIP_
  45. #include <cruntime.h>
  46. #endif  /* _INTERNAL_IFSTRIP_ */
  47.  
  48.  
  49. /* Define _CRTIMP */
  50.  
  51. #ifndef _CRTIMP
  52. #ifdef CRTDLL
  53. #define _CRTIMP __declspec(dllexport)
  54. #else  /* CRTDLL */
  55. #ifdef _DLL
  56. #define _CRTIMP __declspec(dllimport)
  57. #else  /* _DLL */
  58. #define _CRTIMP
  59. #endif  /* _DLL */
  60. #endif  /* CRTDLL */
  61. #endif  /* _CRTIMP */
  62.  
  63.  
  64. /* Define __cdecl for non-Microsoft compilers */
  65.  
  66. #if (!defined (_MSC_VER) && !defined (__cdecl))
  67. #define __cdecl
  68. #endif  /* (!defined (_MSC_VER) && !defined (__cdecl)) */
  69.  
  70. /* Define _CRTAPI1 (for compatibility with the NT SDK) */
  71.  
  72. #ifndef _CRTAPI1
  73. #if _MSC_VER >= 800 && _M_IX86 >= 300
  74. #define _CRTAPI1 __cdecl
  75. #else  /* _MSC_VER >= 800 && _M_IX86 >= 300 */
  76. #define _CRTAPI1
  77. #endif  /* _MSC_VER >= 800 && _M_IX86 >= 300 */
  78. #endif  /* _CRTAPI1 */
  79.  
  80. #ifdef _WIN32
  81. #ifndef _WCHAR_T_DEFINED
  82. typedef unsigned short wchar_t;
  83. #define _WCHAR_T_DEFINED
  84. #endif  /* _WCHAR_T_DEFINED */
  85. #endif  /* _WIN32 */
  86.  
  87. #ifndef _TIME_T_DEFINED
  88. typedef long time_t;
  89. #define _TIME_T_DEFINED
  90. #endif  /* _TIME_T_DEFINED */
  91.  
  92. /* define struct used by _utime() function */
  93.  
  94. #ifndef _UTIMBUF_DEFINED
  95.  
  96. struct _utimbuf {
  97.         time_t actime;          /* access time */
  98.         time_t modtime;         /* modification time */
  99.         };
  100.  
  101. #if !__STDC__
  102. /* Non-ANSI name for compatibility */
  103. struct utimbuf {
  104.         time_t actime;          /* access time */
  105.         time_t modtime;         /* modification time */
  106.         };
  107. #endif  /* !__STDC__ */
  108.  
  109. #define _UTIMBUF_DEFINED
  110. #endif  /* _UTIMBUF_DEFINED */
  111.  
  112.  
  113. /* Function Prototypes */
  114.  
  115. _CRTIMP int __cdecl _utime(const char *, struct _utimbuf *);
  116. #ifdef _WIN32
  117. _CRTIMP int __cdecl _futime(int, struct _utimbuf *);
  118.  
  119. /* Wide Function Prototypes */
  120. _CRTIMP int __cdecl _wutime(const wchar_t *, struct _utimbuf *);
  121. #endif  /* _WIN32 */
  122.  
  123. #if !__STDC__
  124. /* Non-ANSI name for compatibility */
  125. _CRTIMP int __cdecl utime(const char *, struct utimbuf *);
  126. #endif  /* !__STDC__ */
  127.  
  128. #ifdef __cplusplus
  129. }
  130. #endif  /* __cplusplus */
  131.  
  132. #ifdef _MSC_VER
  133. #pragma pack(pop)
  134. #endif  /* _MSC_VER */
  135.  
  136. #endif  /* _INC_UTIME */
  137.