aboutsummaryrefslogtreecommitdiff
path: root/include/mingw.h
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2019-02-16 12:36:52 +0000
committerRon Yorston <rmy@pobox.com>2019-02-16 12:36:52 +0000
commitd82db8e9a618ddd9a11cc57aff37f687abb0effb (patch)
treebd072e7344a3c3f0eff553d41c0f154c4470736e /include/mingw.h
parent91e49fbc7b55e8be78ac3ff943e9b7d4494dfe59 (diff)
downloadbusybox-w32-d82db8e9a618ddd9a11cc57aff37f687abb0effb.tar.gz
busybox-w32-d82db8e9a618ddd9a11cc57aff37f687abb0effb.tar.bz2
busybox-w32-d82db8e9a618ddd9a11cc57aff37f687abb0effb.zip
win32: make stat(2) fetch additional metadata
Modify the WIN32 implementation of stat(2) to fetch inode number, device id and number of hardlinks. This requires opening a handle to the target file so it will be slower. A number of features can be enabled or start to work: - tar can detect if an archive is being stored in itself; - find can support the -inum and -links options; - ls can display inode numbers; - diff can detect attempts to compare a file with itself; - du has better support for hardlinked files; - cp can detect attempts to copy a file over itself.
Diffstat (limited to 'include/mingw.h')
-rw-r--r--include/mingw.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/mingw.h b/include/mingw.h
index 185eb66ed..0f403b993 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -283,6 +283,9 @@ int mingw_chmod(const char *path, int mode);
283typedef int nlink_t; 283typedef int nlink_t;
284typedef int blksize_t; 284typedef int blksize_t;
285typedef off_t blkcnt_t; 285typedef off_t blkcnt_t;
286#if ENABLE_FEATURE_EXTRA_FILE_DATA
287#define ino_t uint64_t
288#endif
286 289
287struct mingw_stat { 290struct mingw_stat {
288 dev_t st_dev; 291 dev_t st_dev;