st_birthtim to useful value.
* fhandler_process.cc (fhandler_process::fstat): Ditto.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Take
additional parameter for creation time. Fill st_birthtim with it.
Accomodate additional creation time parameter throughout.
* fhandler_raw.cc (fhandler_dev_raw::fstat): Set new stat member
st_birthtim to useful value.
* fhandler.cc (fhandler_base::fstat): Ditto.
* fhandler_registry.cc (fhandler_registry::fstat): Ditto.
* include/cygwin/version.h: Bump API minor number.
* include/cygwin/stat.h (struct __stat64): Replace st_spare4 with
timestruc_t st_birthtim.
(struct stat): Ditto if __CYGWIN_USE_BIG_TYPES__ is defined.
(st_birthtime): Define if __CYGWIN_USE_BIG_TYPES__ is defined.
+2007-03-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_mailslot.cc (fhandler_mailslot::fstat): Set new stat member
+ st_birthtim to useful value.
+ * fhandler_process.cc (fhandler_process::fstat): Ditto.
+ * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Take
+ additional parameter for creation time. Fill st_birthtim with it.
+ Accomodate additional creation time parameter throughout.
+ * fhandler_raw.cc (fhandler_dev_raw::fstat): Set new stat member
+ st_birthtim to useful value.
+ * fhandler.cc (fhandler_base::fstat): Ditto.
+ * fhandler_registry.cc (fhandler_registry::fstat): Ditto.
+ * include/cygwin/version.h: Bump API minor number.
+ * include/cygwin/stat.h (struct __stat64): Replace st_spare4 with
+ timestruc_t st_birthtim.
+ (struct stat): Ditto if __CYGWIN_USE_BIG_TYPES__ is defined.
+ (st_birthtime): Define if __CYGWIN_USE_BIG_TYPES__ is defined.
+
2007-03-02 Corinna Vinschen <corinna@vinschen.de>
* ntdll.h (struct _OBJECT_NAME_INFORMATION): Define.
buf->st_blksize = PREFERRED_IO_BLKSIZE;
buf->st_ctim.tv_sec = 1164931200L; /* Arbitrary value: 2006-12-01 */
buf->st_ctim.tv_nsec = 0L;
- buf->st_atim = buf->st_mtim = buf->st_ctim;
+ buf->st_atim = buf->st_mtim = buf->st_birthtim = buf->st_ctim;
return 0;
}
*(FILETIME *) &pfai->BasicInformation.LastWriteTime,
*(FILETIME *) &pfai->BasicInformation.LastAccessTime,
*(FILETIME *) &pfai->BasicInformation.LastWriteTime,
+ *(FILETIME *) &pfai->BasicInformation.CreationTime,
pfvi->VolumeSerialNumber,
pfai->StandardInformation.EndOfFile.QuadPart,
pfai->StandardInformation.AllocationSize.QuadPart,
lowfs = GetFileSize (get_handle (), &highfs);
if (lowfs == 0xffffffff && GetLastError ())
lowfs = highfs = 0;
- return fstat_helper (buf, ft, ft, ft, 0, (ULONGLONG) highfs << 32 | lowfs,
+ return fstat_helper (buf, ft, ft, ft, ft, 0, (ULONGLONG) highfs << 32 | lowfs,
-1LL, 0ULL, 1, DWORD (pc));
}
local.ftLastWriteTime, /* see fstat_helper comment */
local.ftLastAccessTime,
local.ftLastWriteTime,
+ local.ftCreationTime,
pc.volser (),
(ULONGLONG) local.nFileSizeHigh << 32
| local.nFileSizeLow,
else if (pc.isdir ())
{
FILETIME ft = {};
- res = fstat_helper (buf, ft, ft, ft, pc.volser (), 0ULL, -1LL, 0ULL, 1,
- FILE_ATTRIBUTE_DIRECTORY);
+ res = fstat_helper (buf, ft, ft, ft, ft, pc.volser (), 0ULL, -1LL, 0ULL,
+ 1, FILE_ATTRIBUTE_DIRECTORY);
}
else
{
FILETIME ftChangeTime,
FILETIME ftLastAccessTime,
FILETIME ftLastWriteTime,
+ FILETIME ftCreationTime,
DWORD dwVolumeSerialNumber,
ULONGLONG nFileSize,
LONGLONG nAllocSize,
to_timestruc_t (&ftLastAccessTime, &buf->st_atim);
to_timestruc_t (&ftLastWriteTime, &buf->st_mtim);
to_timestruc_t (&ftChangeTime, &buf->st_ctim);
+ to_timestruc_t (&ftCreationTime, &buf->st_birthtim);
buf->st_dev = dwVolumeSerialNumber ?: pc.volser ();
buf->st_size = (_off64_t) nFileSize;
/* The number of links to a directory includes the
buf->st_nlink = 1;
buf->st_blksize = PREFERRED_IO_BLKSIZE;
time_as_timestruc_t (&buf->st_ctim);
- buf->st_atim = buf->st_mtim = buf->st_ctim;
+ buf->st_atim = buf->st_mtim = buf->st_birthtim = buf->st_ctim;
}
return 0;
}
return -1;
case 1:
case 2:
- buf->st_ctime = buf->st_mtime = p->start_time;
- buf->st_ctim.tv_nsec = buf->st_mtim.tv_nsec = 0;
+ buf->st_ctime = buf->st_mtime = buf->st_birthtime = p->start_time;
+ buf->st_ctim.tv_nsec = buf->st_mtim.tv_nsec
+ = buf->st_birthtim.tv_nsec = 0;
time_as_timestruc_t (&buf->st_atim);
buf->st_uid = p->uid;
buf->st_gid = p->gid;
buf->st_nlink = 1;
buf->st_blksize = PREFERRED_IO_BLKSIZE;
time_as_timestruc_t (&buf->st_ctim);
- buf->st_atim = buf->st_mtim = buf->st_ctim;
+ buf->st_atim = buf->st_mtim = buf->st_birthtim = buf->st_ctim;
}
return 0;
}
&ftLastWriteTime))
{
to_timestruc_t (&ftLastWriteTime, &buf->st_mtim);
- buf->st_ctim = buf->st_mtim;
+ buf->st_ctim = buf->st_birthtim = buf->st_mtim;
time_as_timestruc_t (&buf->st_atim);
if (file_type > 0)
buf->st_nlink = subkey_count + 2;
/* cygwin/stat.h
- Copyright 2002 Red Hat Inc.
+ Copyright 2002, 2007 Red Hat Inc.
Written by Corinna Vinschen <corinna@vinschen.de>
This file is part of Cygwin.
timestruc_t st_ctim;
blksize_t st_blksize;
__blkcnt64_t st_blocks;
- long st_spare4[2];
+ timestruc_t st_birthtim;
};
extern int fstat64 (int fd, struct __stat64 *buf);
timestruc_t st_ctim;
blksize_t st_blksize;
blkcnt_t st_blocks;
+#ifdef __CYGWIN_USE_BIG_TYPES__
+ timestruc_t st_birthtim;
+#else
long st_spare4[2];
+#endif
};
#define st_atime st_atim.tv_sec
#define st_mtime st_mtim.tv_sec
#define st_ctime st_ctim.tv_sec
+#ifdef __CYGWIN_USE_BIG_TYPES__
+#define st_birthtime st_birthtim.tv_sec
+#endif
#ifdef __cplusplus
}
165: Export mq_close, mq_getattr, mq_notify, mq_open, mq_receive,
mq_send, mq_setattr, mq_timedreceive, mq_timedsend, mq_unlink.
166: Export sem_unlink.
+ 167: Add st_birthtim to struct stat.
*/
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
#define CYGWIN_VERSION_API_MAJOR 0
-#define CYGWIN_VERSION_API_MINOR 166
+#define CYGWIN_VERSION_API_MINOR 167
/* There is also a compatibity version number associated with the
shared memory regions. It is incremented when incompatible