2010-02-14 Roumen Petrov <rumen@users.sourceforge.net>
Issue [2134161]: time64 functions and types for msvcrt >= 8.0 (initial implementation) * new type: __time32_t * new structures: _finddata32_t, _finddata32i64_t, _finddata64i32_t, __stat32, _stat32i64, _stat64i32, __timeb32, __utimbuf32, __wfinddata32_t, _wfinddata32i64_t, _wfinddata64i32_t * new functions: _ctime32, _difftime32, _difftime64, _findfirst32 _findfirst32i64, _findfirst64i32, _findnext32, _findnext32i64, _findnext64i32, _fstat32, _fstat32i64, _fstat64i32, _ftime32, _futime32, _gmtime32, _localtime32, _mkgmtime32, _mkgmtime64, _mktime32, _stat32, _stat32i64, _stat64i32, _time32, _utime32, _wctime32, _wfindfirst32, _wfindfirst32i64, _wfindfirst64i32, _wfindnext32, _wfindnext32i64, _wfindnext64i32, _wstat32, _wstat32i64, _wstat64i32,_wutime32 * new define _USE_32BIT_TIME_T set 32 or 64 aliases for: time_t, ctime, difftime, _findfirst, _findfirsti64, _findnext, _findnexti64, _fstat, _fstati64, _ftime, _futime, gmtime, localtime, mktime, _stat, _stati64, time, _utime, _wctime, _wfindfirst, _wfindfirsti64, _wfindnext, _wfindnexti64, _wstat, _wstati64, _wutime
This commit is contained in:
@ -185,12 +185,23 @@ _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wfullpath (wchar_t*, const wchar_t*, s
|
||||
#ifdef __MSVCRT__
|
||||
/* wide function prototypes, also declared in time.h */
|
||||
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wasctime (const struct tm*);
|
||||
#if __MSVCRT_VERSION__ < 0x0800
|
||||
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t*);
|
||||
#endif
|
||||
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wstrdate (wchar_t*);
|
||||
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wstrtime (wchar_t*);
|
||||
#if __MSVCRT_VERSION__ >= 0x601
|
||||
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime64 (const __time64_t*);
|
||||
#endif
|
||||
#if __MSVCRT_VERSION__ >= 0x0800
|
||||
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime32 (const __time32_t*);
|
||||
#ifndef _USE_32BIT_TIME_T
|
||||
_CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t* _v) { return(_wctime64 (_v)); }
|
||||
#else
|
||||
_CRTALIAS wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t* _v) { return(_wctime32 (_v)); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __MSVCRT__ */
|
||||
#endif /* __STRICT_ANSI__ */
|
||||
_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
|
||||
@ -355,6 +366,34 @@ struct __wfinddata64_t {
|
||||
wchar_t name[260];
|
||||
};
|
||||
#endif
|
||||
#if __MSVCRT_VERSION__ >= 0x0800
|
||||
struct __wfinddata32_t {
|
||||
unsigned attrib;
|
||||
__time32_t time_create;
|
||||
__time32_t time_access;
|
||||
__time32_t time_write;
|
||||
__int32 size;
|
||||
wchar_t name[FILENAME_MAX];
|
||||
};
|
||||
|
||||
struct _wfinddata32i64_t {
|
||||
unsigned attrib;
|
||||
__time32_t time_create;
|
||||
__time32_t time_access;
|
||||
__time32_t time_write;
|
||||
__int64 size;
|
||||
wchar_t name[FILENAME_MAX];
|
||||
};
|
||||
|
||||
struct _wfinddata64i32_t {
|
||||
unsigned attrib;
|
||||
__time64_t time_create;
|
||||
__time64_t time_access;
|
||||
__time64_t time_write;
|
||||
__int32 size;
|
||||
wchar_t name[FILENAME_MAX];
|
||||
};
|
||||
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
|
||||
#define _WFINDDATA_T_DEFINED
|
||||
#endif
|
||||
|
||||
@ -367,18 +406,43 @@ struct __wfinddata64_t {
|
||||
_CRTIMP int __cdecl __MINGW_NOTHROW _waccess (const wchar_t*, int);
|
||||
_CRTIMP int __cdecl __MINGW_NOTHROW _wchmod (const wchar_t*, int);
|
||||
_CRTIMP int __cdecl __MINGW_NOTHROW _wcreat (const wchar_t*, int);
|
||||
#if __MSVCRT_VERSION__ < 0x0800
|
||||
_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst (const wchar_t*, struct _wfinddata_t *);
|
||||
_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext (long, struct _wfinddata_t *);
|
||||
#endif
|
||||
_CRTIMP int __cdecl __MINGW_NOTHROW _wunlink (const wchar_t*);
|
||||
_CRTIMP int __cdecl __MINGW_NOTHROW _wopen (const wchar_t*, int, ...);
|
||||
_CRTIMP int __cdecl __MINGW_NOTHROW _wsopen (const wchar_t*, int, int, ...);
|
||||
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wmktemp (wchar_t*);
|
||||
#if __MSVCRT_VERSION__ < 0x0800
|
||||
_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirsti64 (const wchar_t*, struct _wfinddatai64_t*);
|
||||
_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnexti64 (long, struct _wfinddatai64_t*);
|
||||
#else
|
||||
_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst32i64 (const wchar_t*, struct _wfinddata32i64_t*);
|
||||
_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst64i32 (const wchar_t*, struct _wfinddata64i32_t*);
|
||||
_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext32i64 (long, struct _wfinddata32i64_t*);
|
||||
_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext64i32 (long, struct _wfinddata64i32_t*);
|
||||
#endif /* __MSVCRT_VERSION__ < 0x0800 */
|
||||
#if __MSVCRT_VERSION__ >= 0x0601
|
||||
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64(const wchar_t*, struct __wfinddata64_t*);
|
||||
_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindnext64(intptr_t, struct __wfinddata64_t*);
|
||||
#endif /* __MSVCRT_VERSION__ >= 0x0601 */
|
||||
#if __MSVCRT_VERSION__ >= 0x0800
|
||||
_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst32 (const wchar_t*, struct __wfinddata32_t*);
|
||||
_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext32 (long, struct __wfinddata32_t*);
|
||||
#ifndef _USE_32BIT_TIME_T
|
||||
_CRTALIAS long __cdecl __MINGW_NOTHROW _wfindfirst (const wchar_t* _v1, struct _wfinddata_t* _v2) { return(_wfindfirst64i32 (_v1,(struct _wfinddata64i32_t*)_v2)); }
|
||||
_CRTALIAS int __cdecl __MINGW_NOTHROW _wfindnext (long _v1, struct _wfinddata_t* _v2) { return(_wfindnext64i32 (_v1,(struct _wfinddata64i32_t*)_v2)); }
|
||||
_CRTALIAS long __cdecl __MINGW_NOTHROW _wfindfirsti64 (const wchar_t* _v1, struct _wfinddatai64_t* _v2) { return(_wfindfirst64 (_v1,(struct __wfinddata64_t*)_v2)); }
|
||||
_CRTALIAS int __cdecl __MINGW_NOTHROW _wfindnexti64 (long _v1, struct _wfinddatai64_t* _v2) { return(_wfindnext64 (_v1,(struct __wfinddata64_t*)_v2)); }
|
||||
#else
|
||||
_CRTALIAS long __cdecl __MINGW_NOTHROW _wfindfirst (const wchar_t* _v1, struct _wfinddata_t* _v2) { return(_wfindfirst32 (_v1,(struct __wfinddata32_t*)_v2)); }
|
||||
_CRTALIAS int __cdecl __MINGW_NOTHROW _wfindnext (long _v1, struct _wfinddata_t* _v2) { return(_wfindnext32 (_v1,(struct __wfinddata32_t*)_v2)); }
|
||||
_CRTALIAS long __cdecl __MINGW_NOTHROW _wfindfirsti64 (const wchar_t* _v1, struct _wfinddatai64_t* _v2) { return(_wfindfirst32i64 (_v1,(struct _wfinddata32i64_t*)_v2)); }
|
||||
_CRTALIAS int __cdecl __MINGW_NOTHROW _wfindnexti64 (long _v1, struct _wfinddatai64_t* _v2) { return(_wfindnext32i64 (_v1,(struct _wfinddata32i64_t*)_v2)); }
|
||||
#endif /* !_USE_32BIT_TIME_T*/
|
||||
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
|
||||
|
||||
#endif /* defined (__MSVCRT__) */
|
||||
#define _WIO_DEFINED
|
||||
#endif /* _WIO_DEFINED */
|
||||
@ -468,7 +532,51 @@ struct __stat64
|
||||
__time64_t st_mtime;
|
||||
__time64_t st_ctime;
|
||||
};
|
||||
#endif /* __MSVCRT_VERSION__ */
|
||||
#endif /* __MSVCRT_VERSION__ >= 0x0601*/
|
||||
|
||||
#if __MSVCRT_VERSION__ >= 0x0800
|
||||
struct __stat32
|
||||
{
|
||||
_dev_t st_dev;
|
||||
_ino_t st_ino;
|
||||
_mode_t st_mode;
|
||||
short st_nlink;
|
||||
short st_uid;
|
||||
short st_gid;
|
||||
_dev_t st_rdev;
|
||||
__int32 st_size;
|
||||
__time32_t st_atime;
|
||||
__time32_t st_mtime;
|
||||
__time32_t st_ctime;
|
||||
};
|
||||
struct _stat32i64 {
|
||||
_dev_t st_dev;
|
||||
_ino_t st_ino;
|
||||
_mode_t st_mode;
|
||||
short st_nlink;
|
||||
short st_uid;
|
||||
short st_gid;
|
||||
_dev_t st_rdev;
|
||||
__int64 st_size;
|
||||
__time32_t st_atime;
|
||||
__time32_t st_mtime;
|
||||
__time32_t st_ctime;
|
||||
};
|
||||
struct _stat64i32 {
|
||||
_dev_t st_dev;
|
||||
_ino_t st_ino;
|
||||
_mode_t st_mode;
|
||||
short st_nlink;
|
||||
short st_uid;
|
||||
short st_gid;
|
||||
_dev_t st_rdev;
|
||||
__int32 st_size;
|
||||
__time64_t st_atime;
|
||||
__time64_t st_mtime;
|
||||
__time64_t st_ctime;
|
||||
};
|
||||
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
|
||||
|
||||
#endif /* __MSVCRT__ */
|
||||
#define _STAT_DEFINED
|
||||
#endif /* _STAT_DEFINED */
|
||||
@ -476,11 +584,25 @@ struct __stat64
|
||||
#if !defined ( _WSTAT_DEFINED)
|
||||
/* also declared in sys/stat.h */
|
||||
#if defined __MSVCRT__
|
||||
#if __MSVCRT_VERSION__ < 0x0800
|
||||
_CRTIMP int __cdecl __MINGW_NOTHROW _wstat (const wchar_t*, struct _stat*);
|
||||
_CRTIMP int __cdecl __MINGW_NOTHROW _wstati64 (const wchar_t*, struct _stati64*);
|
||||
#endif /* __MSVCRT_VERSION__ < 0x0800 */
|
||||
#if __MSVCRT_VERSION__ >= 0x0601
|
||||
_CRTIMP int __cdecl __MINGW_NOTHROW _wstat64 (const wchar_t*, struct __stat64*);
|
||||
#endif /* __MSVCRT_VERSION__ >= 0x0601 */
|
||||
#if __MSVCRT_VERSION__ >= 0x0800
|
||||
_CRTIMP int __cdecl __MINGW_NOTHROW _wstat32 (const wchar_t*, struct __stat32*);
|
||||
_CRTIMP int __cdecl __MINGW_NOTHROW _wstat32i64 (const wchar_t*, struct _stat32i64*);
|
||||
_CRTIMP int __cdecl __MINGW_NOTHROW _wstat64i32 (const wchar_t*, struct _stat64i32*);
|
||||
#ifndef _USE_32BIT_TIME_T
|
||||
_CRTALIAS int __cdecl __MINGW_NOTHROW _wstat (const wchar_t* _v1, struct _stat* _v2) { return(_wstat64i32 (_v1,(struct _stat64i32*)_v2)); }
|
||||
_CRTALIAS int __cdecl __MINGW_NOTHROW _wstati64 (const wchar_t* _v1, struct _stati64* _v2) { return(_wstat64 (_v1,(struct __stat64*)_v2)); }
|
||||
#else
|
||||
_CRTALIAS int __cdecl __MINGW_NOTHROW _wstat (const wchar_t* _v1, struct _stat* _v2) { return(_wstat32 (_v1,(struct __stat32*)_v2)); }
|
||||
_CRTALIAS int __cdecl __MINGW_NOTHROW _wstati64 (const wchar_t* _v1, struct _stati64* _v2) { return(_wstat32i64 (_v1,(struct _stat32i64*)_v2)); }
|
||||
#endif /* !_USE_32BIT_TIME_T */
|
||||
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
|
||||
#endif /* __MSVCRT__ */
|
||||
#define _WSTAT_DEFINED
|
||||
#endif /* ! _WSTAT_DEFIND */
|
||||
|
Reference in New Issue
Block a user