User | Revision | Line number | New contents of line |
sca8er |
3:0c3bcea5b4d0
|
1
|
/*
|
sca8er |
3:0c3bcea5b4d0
|
2
|
* utime.h
|
sca8er |
3:0c3bcea5b4d0
|
3
|
* This file has no copyright assigned and is placed in the Public Domain.
|
sca8er |
3:0c3bcea5b4d0
|
4
|
* This file is a part of the mingw-runtime package.
|
sca8er |
3:0c3bcea5b4d0
|
5
|
* No warranty is given; refer to the file DISCLAIMER within the package.
|
sca8er |
3:0c3bcea5b4d0
|
6
|
*
|
sca8er |
3:0c3bcea5b4d0
|
7
|
* Support for the utime function.
|
sca8er |
3:0c3bcea5b4d0
|
8
|
*
|
sca8er |
3:0c3bcea5b4d0
|
9
|
*/
|
sca8er |
3:0c3bcea5b4d0
|
10
|
#ifndef _UTIME_H_
|
sca8er |
3:0c3bcea5b4d0
|
11
|
#define _UTIME_H_
|
sca8er |
3:0c3bcea5b4d0
|
12
|
|
sca8er |
3:0c3bcea5b4d0
|
13
|
/* All the headers include this file. */
|
sca8er |
3:0c3bcea5b4d0
|
14
|
#include <_mingw.h>
|
sca8er |
3:0c3bcea5b4d0
|
15
|
|
sca8er |
3:0c3bcea5b4d0
|
16
|
#define __need_wchar_t
|
sca8er |
3:0c3bcea5b4d0
|
17
|
#define __need_size_t
|
sca8er |
3:0c3bcea5b4d0
|
18
|
#ifndef RC_INVOKED
|
sca8er |
3:0c3bcea5b4d0
|
19
|
#include <stddef.h>
|
sca8er |
3:0c3bcea5b4d0
|
20
|
#endif /* Not RC_INVOKED */
|
sca8er |
3:0c3bcea5b4d0
|
21
|
#include <sys/types.h>
|
sca8er |
3:0c3bcea5b4d0
|
22
|
|
sca8er |
3:0c3bcea5b4d0
|
23
|
#ifndef RC_INVOKED
|
sca8er |
3:0c3bcea5b4d0
|
24
|
|
sca8er |
3:0c3bcea5b4d0
|
25
|
/*
|
sca8er |
3:0c3bcea5b4d0
|
26
|
* Structure used by _utime function.
|
sca8er |
3:0c3bcea5b4d0
|
27
|
*/
|
sca8er |
3:0c3bcea5b4d0
|
28
|
struct _utimbuf
|
sca8er |
3:0c3bcea5b4d0
|
29
|
{
|
sca8er |
3:0c3bcea5b4d0
|
30
|
time_t actime; /* Access time */
|
sca8er |
3:0c3bcea5b4d0
|
31
|
time_t modtime; /* Modification time */
|
sca8er |
3:0c3bcea5b4d0
|
32
|
};
|
sca8er |
3:0c3bcea5b4d0
|
33
|
#if __MSVCRT_VERSION__ >= 0x0800
|
sca8er |
3:0c3bcea5b4d0
|
34
|
struct __utimbuf32
|
sca8er |
3:0c3bcea5b4d0
|
35
|
{
|
sca8er |
3:0c3bcea5b4d0
|
36
|
__time32_t actime;
|
sca8er |
3:0c3bcea5b4d0
|
37
|
__time32_t modtime;
|
sca8er |
3:0c3bcea5b4d0
|
38
|
};
|
sca8er |
3:0c3bcea5b4d0
|
39
|
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
|
sca8er |
3:0c3bcea5b4d0
|
40
|
|
sca8er |
3:0c3bcea5b4d0
|
41
|
|
sca8er |
3:0c3bcea5b4d0
|
42
|
#ifndef _NO_OLDNAMES
|
sca8er |
3:0c3bcea5b4d0
|
43
|
/* NOTE: Must be the same as _utimbuf above. */
|
sca8er |
3:0c3bcea5b4d0
|
44
|
struct utimbuf
|
sca8er |
3:0c3bcea5b4d0
|
45
|
{
|
sca8er |
3:0c3bcea5b4d0
|
46
|
time_t actime;
|
sca8er |
3:0c3bcea5b4d0
|
47
|
time_t modtime;
|
sca8er |
3:0c3bcea5b4d0
|
48
|
};
|
sca8er |
3:0c3bcea5b4d0
|
49
|
#endif /* Not _NO_OLDNAMES */
|
sca8er |
3:0c3bcea5b4d0
|
50
|
|
sca8er |
3:0c3bcea5b4d0
|
51
|
#ifdef __cplusplus
|
sca8er |
3:0c3bcea5b4d0
|
52
|
extern "C" {
|
sca8er |
3:0c3bcea5b4d0
|
53
|
#endif
|
sca8er |
3:0c3bcea5b4d0
|
54
|
|
sca8er |
3:0c3bcea5b4d0
|
55
|
#if __MSVCRT_VERSION__ < 0x0800
|
sca8er |
3:0c3bcea5b4d0
|
56
|
_CRTIMP int __cdecl __MINGW_NOTHROW _utime (const char*, struct _utimbuf*);
|
sca8er |
3:0c3bcea5b4d0
|
57
|
#endif
|
sca8er |
3:0c3bcea5b4d0
|
58
|
|
sca8er |
3:0c3bcea5b4d0
|
59
|
#ifndef _NO_OLDNAMES
|
sca8er |
3:0c3bcea5b4d0
|
60
|
/* FIXME for __MSVCRT_VERSION__ >= 0x0800 */
|
sca8er |
3:0c3bcea5b4d0
|
61
|
_CRTIMP int __cdecl __MINGW_NOTHROW utime (const char*, struct utimbuf*);
|
sca8er |
3:0c3bcea5b4d0
|
62
|
#endif /* Not _NO_OLDNAMES */
|
sca8er |
3:0c3bcea5b4d0
|
63
|
|
sca8er |
3:0c3bcea5b4d0
|
64
|
#if __MSVCRT_VERSION__ < 0x0800
|
sca8er |
3:0c3bcea5b4d0
|
65
|
_CRTIMP int __cdecl __MINGW_NOTHROW _futime (int, struct _utimbuf*);
|
sca8er |
3:0c3bcea5b4d0
|
66
|
#endif
|
sca8er |
3:0c3bcea5b4d0
|
67
|
|
sca8er |
3:0c3bcea5b4d0
|
68
|
/* The wide character version, only available for MSVCRT versions of the
|
sca8er |
3:0c3bcea5b4d0
|
69
|
* C runtime library. */
|
sca8er |
3:0c3bcea5b4d0
|
70
|
#ifdef __MSVCRT__
|
sca8er |
3:0c3bcea5b4d0
|
71
|
#if __MSVCRT_VERSION__ < 0x0800
|
sca8er |
3:0c3bcea5b4d0
|
72
|
_CRTIMP int __cdecl __MINGW_NOTHROW _wutime (const wchar_t*, struct _utimbuf*);
|
sca8er |
3:0c3bcea5b4d0
|
73
|
#endif
|
sca8er |
3:0c3bcea5b4d0
|
74
|
#endif /* MSVCRT runtime */
|
sca8er |
3:0c3bcea5b4d0
|
75
|
|
sca8er |
3:0c3bcea5b4d0
|
76
|
/* These require newer versions of msvcrt.dll (6.10 or higher). */
|
sca8er |
3:0c3bcea5b4d0
|
77
|
#if __MSVCRT_VERSION__ >= 0x0601
|
sca8er |
3:0c3bcea5b4d0
|
78
|
struct __utimbuf64
|
sca8er |
3:0c3bcea5b4d0
|
79
|
{
|
sca8er |
3:0c3bcea5b4d0
|
80
|
__time64_t actime;
|
sca8er |
3:0c3bcea5b4d0
|
81
|
__time64_t modtime;
|
sca8er |
3:0c3bcea5b4d0
|
82
|
};
|
sca8er |
3:0c3bcea5b4d0
|
83
|
|
sca8er |
3:0c3bcea5b4d0
|
84
|
_CRTIMP int __cdecl __MINGW_NOTHROW _utime64 (const char*, struct __utimbuf64*);
|
sca8er |
3:0c3bcea5b4d0
|
85
|
_CRTIMP int __cdecl __MINGW_NOTHROW _wutime64 (const wchar_t*, struct __utimbuf64*);
|
sca8er |
3:0c3bcea5b4d0
|
86
|
_CRTIMP int __cdecl __MINGW_NOTHROW _futime64 (int, struct __utimbuf64*);
|
sca8er |
3:0c3bcea5b4d0
|
87
|
#endif /* __MSVCRT_VERSION__ >= 0x0601 */
|
sca8er |
3:0c3bcea5b4d0
|
88
|
|
sca8er |
3:0c3bcea5b4d0
|
89
|
#if __MSVCRT_VERSION__ >= 0x0800
|
sca8er |
3:0c3bcea5b4d0
|
90
|
_CRTIMP int __cdecl __MINGW_NOTHROW _utime32 (const char*, struct __utimbuf32*);
|
sca8er |
3:0c3bcea5b4d0
|
91
|
_CRTIMP int __cdecl __MINGW_NOTHROW _wutime32 (const wchar_t*, struct __utimbuf32*);
|
sca8er |
3:0c3bcea5b4d0
|
92
|
_CRTIMP int __cdecl __MINGW_NOTHROW _futime32 (int, struct __utimbuf32*);
|
sca8er |
3:0c3bcea5b4d0
|
93
|
#ifndef _USE_32BIT_TIME_T
|
sca8er |
3:0c3bcea5b4d0
|
94
|
_CRTALIAS int __cdecl __MINGW_NOTHROW _utime (const char* _v1, struct _utimbuf* _v2) { return(_utime64 (_v1,(struct __utimbuf64*)_v2)); }
|
sca8er |
3:0c3bcea5b4d0
|
95
|
_CRTALIAS int __cdecl __MINGW_NOTHROW _wutime (const wchar_t* _v1, struct _utimbuf* _v2) { return(_wutime64 (_v1,(struct __utimbuf64*)_v2)); }
|
sca8er |
3:0c3bcea5b4d0
|
96
|
_CRTALIAS int __cdecl __MINGW_NOTHROW _futime (int _v1, struct _utimbuf* _v2) { return(_futime64 (_v1,(struct __utimbuf64*)_v2)); }
|
sca8er |
3:0c3bcea5b4d0
|
97
|
#else
|
sca8er |
3:0c3bcea5b4d0
|
98
|
_CRTALIAS int __cdecl __MINGW_NOTHROW _utime (const char* _v1, struct _utimbuf* _v2) { return(_utime32 (_v1,(struct __utimbuf32*)_v2)); }
|
sca8er |
3:0c3bcea5b4d0
|
99
|
_CRTALIAS int __cdecl __MINGW_NOTHROW _wutime (const wchar_t* _v1, struct _utimbuf* _v2) { return(_wutime32 (_v1,(struct __utimbuf32*)_v2)); }
|
sca8er |
3:0c3bcea5b4d0
|
100
|
_CRTALIAS int __cdecl __MINGW_NOTHROW _futime (int _v1, struct _utimbuf* _v2) { return(_futime32 (_v1,(struct __utimbuf32*)_v2)); }
|
sca8er |
3:0c3bcea5b4d0
|
101
|
#endif
|
sca8er |
3:0c3bcea5b4d0
|
102
|
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
|
sca8er |
3:0c3bcea5b4d0
|
103
|
|
sca8er |
3:0c3bcea5b4d0
|
104
|
#ifdef __cplusplus
|
sca8er |
3:0c3bcea5b4d0
|
105
|
}
|
sca8er |
3:0c3bcea5b4d0
|
106
|
#endif
|
sca8er |
3:0c3bcea5b4d0
|
107
|
|
sca8er |
3:0c3bcea5b4d0
|
108
|
#endif /* Not RC_INVOKED */
|
sca8er |
3:0c3bcea5b4d0
|
109
|
|
sca8er |
3:0c3bcea5b4d0
|
110
|
#endif /* Not _UTIME_H_ */
|