Re: stat-time tests fix for Windows

2017-05-14 Thread Bruno Haible
Paul Eggert wrote: > This misfeature is by design. It's called "file system tunneling". See, for > example: > > http://dfstream.blogspot.com/2012/02/file-system-tunneling-in-windows.html Thanks. It's worth extending the comment: 2017-05-14 Bruno Haible stat-time tests: Improve comm

Re: stat-time tests fix for Windows

2017-05-14 Thread Paul Eggert
Bruno Haible wrote: Strangely enough, when you create a file, delete it, create it again (with the same name), then the st_ctime field will contain the time of the first creation. This misfeature is by design. It's called "file system tunneling". See, for example: http://dfstream.blogspot.com

Re: plans for file related modules on Windows

2017-05-14 Thread Ben Pfaff
On Sun, May 14, 2017 at 06:06:03PM +0200, Bruno Haible wrote: > > I did not realize that Windows could even support a proper > > implementation of the struct stat st_dev and st_ino. I'd find this > > useful in multiple programs, although in some of them I might really > > just use the code you wri

Re: plans for file related modules on Windows

2017-05-14 Thread Bruno Haible
Hi Ben, > I did not realize that Windows could even support a proper > implementation of the struct stat st_dev and st_ino. I'd find this > useful in multiple programs, although in some of them I might really > just use the code you write as an educational resource. I've considered your wish. Th

same-inode: adapt for windows-stat-inodes

2017-05-14 Thread Bruno Haible
With this adaptation of the 'same-inode' module, the 'stat' test now passes on native Windows. (Well, it says "SKIP" because of missing symbolic link support.) 2017-05-14 Bruno Haible same-inode: Adapt for windows-stat-inodes. * lib/same-inode.h: Include . (SAME_INODE)

windows-stat-inodes: new module

2017-05-14 Thread Bruno Haible
This patch implements the 'windows-stat-inodes' module, that provide good st_dev and st_ino values on native Windows - at least for most files. On files where it cannot do so (unreadable files or directories), it sets both fields to 0. This is not as good as Cygwin does; Cygwin provides non-zero s

stat-time tests fix for Windows

2017-05-14 Thread Bruno Haible
On native Windows, the 'test-stat-time' test works fine the first time I run it, but fails in subsequent runs in the same build directory. Strangely enough, when you create a file, delete it, create it again (with the same name), then the st_ctime field will contain the time of the first creation.

stat-time: adapt for windows-stat-timespec

2017-05-14 Thread Bruno Haible
One more adaptation of module 'stat-time' for the 'struct stat' with 'struct timespec' fields on Windows: 2017-05-14 Bruno Haible stat-time: Adapt for windows-stat-timespec. * lib/stat-time.h (get_stat_birthtime) [_GL_WINDOWS_STAT_TIMESPEC]: Use entire st_ctim field.