mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
Tidy up code a bit
svn path=/branches/ros-amd64-bringup/; revision=36260
This commit is contained in:
@@ -116,6 +116,21 @@ static CRITICAL_SECTION FILE_cs;
|
||||
#define LOCK_FILES() do { EnterCriticalSection(&FILE_cs); } while (0)
|
||||
#define UNLOCK_FILES() do { LeaveCriticalSection(&FILE_cs); } while (0)
|
||||
|
||||
void stat64_to_stati64(const struct __stat64 *buf64, struct _stati64 *buf)
|
||||
{
|
||||
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 = buf64->st_size;
|
||||
buf->st_atime = buf64->st_atime;
|
||||
buf->st_mtime = buf64->st_mtime;
|
||||
buf->st_ctime = buf64->st_ctime;
|
||||
}
|
||||
|
||||
static inline BOOL is_valid_fd(int fd)
|
||||
{
|
||||
return fd >= 0 && fd < fdend && (fdesc[fd].wxflag & WX_OPEN);
|
||||
|
||||
@@ -29,21 +29,10 @@
|
||||
#define WCCMD (TOUL('c') << 32 | TOUL('m') << 16 | TOUL('d'))
|
||||
#define WCCOM (TOUL('c') << 32 | TOUL('o') << 16 | TOUL('m'))
|
||||
|
||||
HANDLE fdtoh(int fd);
|
||||
void stat64_to_stati64(const struct __stat64 *buf64, struct _stati64 *buf);
|
||||
|
||||
#if _USE_STAT64
|
||||
void stat64_to_stati64(const struct __stat64 *buf64, struct _stati64 *buf)
|
||||
{
|
||||
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 = buf64->st_size;
|
||||
buf->st_atime = buf64->st_atime;
|
||||
buf->st_mtime = buf64->st_mtime;
|
||||
buf->st_ctime = buf64->st_ctime;
|
||||
}
|
||||
|
||||
//int _tstati64(const TCHAR* path, struct _stati64 * buf)
|
||||
//{
|
||||
@@ -58,7 +47,6 @@ void stat64_to_stati64(const struct __stat64 *buf64, struct _stati64 *buf)
|
||||
|
||||
#endif
|
||||
|
||||
HANDLE fdtoh(int fd); //file.c
|
||||
|
||||
#if _USE_STAT64
|
||||
int CDECL _tstat64(const _TCHAR *path, struct _stat64 *buf)
|
||||
|
||||
Reference in New Issue
Block a user