mirror of
https://github.com/reactos/reactos.git
synced 2025-07-30 19:01:54 +00:00
[SHELL/EXPERIMENTS]
* Create a branch for some evul shell experiments. svn path=/branches/shell-experiments/; revision=61927
This commit is contained in:
parent
d09f611410
commit
527f2f9057
20177 changed files with 0 additions and 1312061 deletions
64
lib/sdk/crt/stdio/stat.c
Normal file
64
lib/sdk/crt/stdio/stat.c
Normal file
|
@ -0,0 +1,64 @@
|
|||
#include <precomp.h>
|
||||
#include <tchar.h>
|
||||
|
||||
#define stat64_to_stat(buf64, buf) \
|
||||
do { \
|
||||
buf->st_dev = (buf64)->st_dev; \
|
||||
buf->st_ino = (buf64)->st_ino; \
|
||||
buf->st_mode = (buf64)->st_mode; \
|
||||
buf->st_nlink = (buf64)->st_nlink; \
|
||||
buf->st_uid = (buf64)->st_uid; \
|
||||
buf->st_gid = (buf64)->st_gid; \
|
||||
buf->st_rdev = (buf64)->st_rdev; \
|
||||
buf->st_size = (_off_t)(buf64)->st_size; \
|
||||
buf->st_atime = (time_t)(buf64)->st_atime; \
|
||||
buf->st_mtime = (time_t)(buf64)->st_mtime; \
|
||||
buf->st_ctime = (time_t)(buf64)->st_ctime; \
|
||||
} while (0)
|
||||
|
||||
int CDECL _tstat(const _TCHAR* path, struct _stat * buf)
|
||||
{
|
||||
int ret;
|
||||
struct __stat64 buf64;
|
||||
|
||||
ret = _tstat64(path, &buf64);
|
||||
if (!ret)
|
||||
stat64_to_stat(&buf64, buf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int CDECL _tstati64(const _TCHAR* path, struct _stati64 * buf)
|
||||
{
|
||||
int ret;
|
||||
struct __stat64 buf64;
|
||||
|
||||
ret = _tstat64(path, &buf64);
|
||||
if (!ret)
|
||||
stat64_to_stat(&buf64, buf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifndef _UNICODE
|
||||
|
||||
int CDECL _fstat(int fd, struct _stat* buf)
|
||||
{ int ret;
|
||||
struct __stat64 buf64;
|
||||
|
||||
ret = _fstat64(fd, &buf64);
|
||||
if (!ret)
|
||||
stat64_to_stat(&buf64, buf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int CDECL _fstati64(int fd, struct _stati64* buf)
|
||||
{
|
||||
int ret;
|
||||
struct __stat64 buf64;
|
||||
|
||||
ret = _fstat64(fd, &buf64);
|
||||
if (!ret)
|
||||
stat64_to_stat(&buf64, buf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue