2000-02-18 03:38:33 +08:00
|
|
|
/*
|
|
|
|
* stat.h
|
2004-04-21 06:49:32 +08:00
|
|
|
* This file has no copyright assigned and is placed in the Public Domain.
|
|
|
|
* This file is a part of the mingw-runtime package.
|
|
|
|
* No warranty is given; refer to the file DISCLAIMER within the package.
|
2000-02-18 03:38:33 +08:00
|
|
|
*
|
|
|
|
* Symbolic constants for opening and creating files, also stat, fstat and
|
|
|
|
* chmod functions.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _STAT_H_
|
|
|
|
#define _STAT_H_
|
|
|
|
|
|
|
|
/* All the headers include this file. */
|
|
|
|
#include <_mingw.h>
|
|
|
|
|
|
|
|
#define __need_size_t
|
|
|
|
#define __need_wchar_t
|
|
|
|
#ifndef RC_INVOKED
|
|
|
|
#include <stddef.h>
|
|
|
|
#endif /* Not RC_INVOKED */
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Constants for the stat st_mode member.
|
|
|
|
*/
|
|
|
|
#define _S_IFIFO 0x1000 /* FIFO */
|
|
|
|
#define _S_IFCHR 0x2000 /* Character */
|
2001-11-02 03:51:50 +08:00
|
|
|
#define _S_IFBLK 0x3000 /* Block: Is this ever set under w32? */
|
2000-02-18 03:38:33 +08:00
|
|
|
#define _S_IFDIR 0x4000 /* Directory */
|
|
|
|
#define _S_IFREG 0x8000 /* Regular */
|
|
|
|
|
|
|
|
#define _S_IFMT 0xF000 /* File type mask */
|
|
|
|
|
|
|
|
#define _S_IEXEC 0x0040
|
|
|
|
#define _S_IWRITE 0x0080
|
|
|
|
#define _S_IREAD 0x0100
|
|
|
|
|
|
|
|
#define _S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC)
|
|
|
|
#define _S_IXUSR _S_IEXEC
|
|
|
|
#define _S_IWUSR _S_IWRITE
|
|
|
|
#define _S_IRUSR _S_IREAD
|
|
|
|
|
2001-11-02 03:51:50 +08:00
|
|
|
#define _S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
|
|
|
|
#define _S_ISFIFO(m) (((m) & _S_IFMT) == _S_IFIFO)
|
|
|
|
#define _S_ISCHR(m) (((m) & _S_IFMT) == _S_IFCHR)
|
|
|
|
#define _S_ISBLK(m) (((m) & _S_IFMT) == _S_IFBLK)
|
|
|
|
#define _S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
#ifndef _NO_OLDNAMES
|
|
|
|
|
|
|
|
#define S_IFIFO _S_IFIFO
|
|
|
|
#define S_IFCHR _S_IFCHR
|
|
|
|
#define S_IFBLK _S_IFBLK
|
|
|
|
#define S_IFDIR _S_IFDIR
|
|
|
|
#define S_IFREG _S_IFREG
|
|
|
|
#define S_IFMT _S_IFMT
|
|
|
|
#define S_IEXEC _S_IEXEC
|
|
|
|
#define S_IWRITE _S_IWRITE
|
|
|
|
#define S_IREAD _S_IREAD
|
|
|
|
#define S_IRWXU _S_IRWXU
|
|
|
|
#define S_IXUSR _S_IXUSR
|
|
|
|
#define S_IWUSR _S_IWUSR
|
|
|
|
#define S_IRUSR _S_IRUSR
|
|
|
|
|
2001-11-02 03:51:50 +08:00
|
|
|
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
|
|
|
#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
|
|
|
|
#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
|
|
|
|
#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
|
|
|
|
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
#endif /* Not _NO_OLDNAMES */
|
|
|
|
|
|
|
|
#ifndef RC_INVOKED
|
|
|
|
|
|
|
|
#ifndef _STAT_DEFINED
|
|
|
|
/*
|
|
|
|
* The structure manipulated and returned by stat and fstat.
|
|
|
|
*
|
|
|
|
* NOTE: If called on a directory the values in the time fields are not only
|
|
|
|
* invalid, they will cause localtime et. al. to return NULL. And calling
|
|
|
|
* asctime with a NULL pointer causes an Invalid Page Fault. So watch it!
|
|
|
|
*/
|
|
|
|
struct _stat
|
|
|
|
{
|
|
|
|
_dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
|
|
|
|
_ino_t st_ino; /* Always zero ? */
|
|
|
|
_mode_t st_mode; /* See above constants */
|
|
|
|
short st_nlink; /* Number of links. */
|
|
|
|
short st_uid; /* User: Maybe significant on NT ? */
|
|
|
|
short st_gid; /* Group: Ditto */
|
|
|
|
_dev_t st_rdev; /* Seems useless (not even filled in) */
|
|
|
|
_off_t st_size; /* File size in bytes */
|
|
|
|
time_t st_atime; /* Accessed date (always 00:00 hrs local
|
|
|
|
* on FAT) */
|
|
|
|
time_t st_mtime; /* Modified time */
|
|
|
|
time_t st_ctime; /* Creation time */
|
|
|
|
};
|
|
|
|
|
2005-02-08 04:18:08 +08:00
|
|
|
#ifndef _NO_OLDNAMES
|
|
|
|
/* NOTE: Must be the same as _stat above. */
|
2000-02-18 03:38:33 +08:00
|
|
|
struct stat
|
|
|
|
{
|
2007-10-04 02:55:56 +08:00
|
|
|
dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
|
|
|
|
ino_t st_ino; /* Always zero ? */
|
|
|
|
mode_t st_mode; /* See above constants */
|
2000-02-18 03:38:33 +08:00
|
|
|
short st_nlink; /* Number of links. */
|
|
|
|
short st_uid; /* User: Maybe significant on NT ? */
|
|
|
|
short st_gid; /* Group: Ditto */
|
2007-10-04 02:55:56 +08:00
|
|
|
dev_t st_rdev; /* Seems useless (not even filled in) */
|
|
|
|
off_t st_size; /* File size in bytes */
|
2000-02-18 03:38:33 +08:00
|
|
|
time_t st_atime; /* Accessed date (always 00:00 hrs local
|
|
|
|
* on FAT) */
|
|
|
|
time_t st_mtime; /* Modified time */
|
|
|
|
time_t st_ctime; /* Creation time */
|
|
|
|
};
|
2005-02-08 04:18:08 +08:00
|
|
|
#endif /* _NO_OLDNAMES */
|
2004-03-26 19:30:24 +08:00
|
|
|
|
2000-11-21 10:50:03 +08:00
|
|
|
#if defined (__MSVCRT__)
|
|
|
|
struct _stati64 {
|
|
|
|
_dev_t st_dev;
|
|
|
|
_ino_t st_ino;
|
2007-10-04 02:55:56 +08:00
|
|
|
_mode_t st_mode;
|
2000-11-21 10:50:03 +08:00
|
|
|
short st_nlink;
|
|
|
|
short st_uid;
|
|
|
|
short st_gid;
|
|
|
|
_dev_t st_rdev;
|
|
|
|
__int64 st_size;
|
|
|
|
time_t st_atime;
|
|
|
|
time_t st_mtime;
|
|
|
|
time_t st_ctime;
|
|
|
|
};
|
2007-10-04 02:55:56 +08:00
|
|
|
#if __MSVCRT_VERSION__ >= 0x0601
|
2004-03-26 19:30:24 +08:00
|
|
|
struct __stat64
|
|
|
|
{
|
|
|
|
_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;
|
2005-01-17 13:03:17 +08:00
|
|
|
__int64 st_size;
|
2004-03-26 19:30:24 +08:00
|
|
|
__time64_t st_atime;
|
|
|
|
__time64_t st_mtime;
|
|
|
|
__time64_t st_ctime;
|
|
|
|
};
|
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
2010-02-17 10:41:06 +08:00
|
|
|
#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 */
|
2000-11-21 10:50:03 +08:00
|
|
|
#endif /* __MSVCRT__ */
|
2000-02-18 03:38:33 +08:00
|
|
|
#define _STAT_DEFINED
|
|
|
|
#endif /* _STAT_DEFINED */
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
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
2010-02-17 10:41:06 +08:00
|
|
|
#if __MSVCRT_VERSION__ < 0x0800
|
2007-06-23 15:34:16 +08:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _fstat (int, struct _stat*);
|
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
2010-02-17 10:41:06 +08:00
|
|
|
#endif
|
2007-06-23 15:34:16 +08:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _chmod (const char*, int);
|
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
2010-02-17 10:41:06 +08:00
|
|
|
#if __MSVCRT_VERSION__ < 0x0800
|
2007-06-23 15:34:16 +08:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _stat (const char*, struct _stat*);
|
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
2010-02-17 10:41:06 +08:00
|
|
|
#endif
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
#ifndef _NO_OLDNAMES
|
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
2010-02-17 10:41:06 +08:00
|
|
|
/* FIXME for __MSVCRT_VERSION__ >= 0x0800 */
|
2000-02-18 03:38:33 +08:00
|
|
|
/* These functions live in liboldnames.a. */
|
2007-06-23 15:34:16 +08:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW fstat (int, struct stat*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*);
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
#endif /* Not _NO_OLDNAMES */
|
|
|
|
|
2004-03-26 19:30:24 +08:00
|
|
|
#if defined (__MSVCRT__)
|
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
2010-02-17 10:41:06 +08:00
|
|
|
#if __MSVCRT_VERSION__ < 0x0800
|
2007-06-23 15:34:16 +08:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _fstati64(int, struct _stati64 *);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _stati64(const char *, struct _stati64 *);
|
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
2010-02-17 10:41:06 +08:00
|
|
|
#endif
|
2004-03-26 19:30:24 +08:00
|
|
|
/* These require newer versions of msvcrt.dll (6.10 or higher). */
|
|
|
|
#if __MSVCRT_VERSION__ >= 0x0601
|
2007-06-23 15:34:16 +08:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _fstat64 (int, struct __stat64*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _stat64 (const char*, struct __stat64*);
|
2004-03-26 19:30:24 +08:00
|
|
|
#endif /* __MSVCRT_VERSION__ >= 0x0601 */
|
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
2010-02-17 10:41:06 +08:00
|
|
|
#if __MSVCRT_VERSION__ >= 0x0800
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _fstat32 (int, struct __stat32*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _stat32 (const char*, struct __stat32*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _fstat32i64 (int, struct _stat32i64*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _fstat64i32 (int, struct _stat64i32*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _stat32i64 (const char*, struct _stat32i64*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _stat64i32 (const char*, struct _stat64i32*);
|
|
|
|
#ifndef _USE_32BIT_TIME_T
|
|
|
|
_CRTALIAS int __cdecl __MINGW_NOTHROW _fstat (int _v1, struct _stat* _v2) { return(_fstat64i32 (_v1,(struct _stat64i32*)_v2)); }
|
|
|
|
_CRTALIAS int __cdecl __MINGW_NOTHROW _stat (const char* _v1, struct _stat* _v2) { return(_stat64i32 (_v1,(struct _stat64i32*)_v2)); }
|
|
|
|
_CRTALIAS int __cdecl __MINGW_NOTHROW _fstati64 (int _v1, struct _stati64* _v2) { return(_fstat64 (_v1,(struct __stat64*)_v2)); }
|
|
|
|
_CRTALIAS int __cdecl __MINGW_NOTHROW _stati64 (const char* _v1, struct _stati64* _v2) { return(_stat64 (_v1,(struct __stat64*)_v2)); }
|
|
|
|
#else
|
|
|
|
_CRTALIAS int __cdecl __MINGW_NOTHROW _fstat (int _v1, struct _stat* _v2) { return(_fstat32 (_v1,(struct __stat32*)_v2)); }
|
|
|
|
_CRTALIAS int __cdecl __MINGW_NOTHROW _stat (const char* _v1, struct _stat* _v2) { return(_stat32 (_v1,(struct __stat32*)_v2)); }
|
|
|
|
_CRTALIAS int __cdecl __MINGW_NOTHROW _fstati64 (int _v1, struct _stati64* _v2) { return(_fstat32i64 (_v1,(struct _stat32i64*)_v2)); }
|
|
|
|
_CRTALIAS int __cdecl __MINGW_NOTHROW _stati64 (const char* _v1, struct _stati64* _v2) { return(_stat32i64 (_v1,(struct _stat32i64*)_v2)); }
|
|
|
|
#endif /* !_USE_32BIT_TIME_T */
|
|
|
|
#endif /* __MSVCRT_VERSION__ >= 0x0800 */
|
|
|
|
|
|
|
|
|
2004-03-26 19:30:24 +08:00
|
|
|
#if !defined ( _WSTAT_DEFINED) /* also declared in wchar.h */
|
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
2010-02-17 10:41:06 +08:00
|
|
|
#if __MSVCRT_VERSION__ < 0x0800
|
2007-06-23 15:34:16 +08:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _wstat(const wchar_t*, struct _stat*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _wstati64 (const wchar_t*, struct _stati64*);
|
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
2010-02-17 10:41:06 +08:00
|
|
|
#endif
|
2004-03-26 19:30:24 +08:00
|
|
|
#if __MSVCRT_VERSION__ >= 0x0601
|
2007-06-23 15:34:16 +08:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _wstat64 (const wchar_t*, struct __stat64*);
|
2004-03-26 19:30:24 +08:00
|
|
|
#endif /* __MSVCRT_VERSION__ >= 0x0601 */
|
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
2010-02-17 10:41:06 +08:00
|
|
|
#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 */
|
2004-03-26 19:30:24 +08:00
|
|
|
#define _WSTAT_DEFINED
|
|
|
|
#endif /* _WSTAT_DEFIND */
|
|
|
|
#endif /* __MSVCRT__ */
|
2000-02-18 03:38:33 +08:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* Not RC_INVOKED */
|
|
|
|
|
|
|
|
#endif /* Not _STAT_H_ */
|