diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2023-11-26 23:05:07 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2023-11-28 12:52:05 +0300 |
commit | e01c50c7b0a6c5d2a25feb02958d57902c25c141 (patch) | |
tree | 43f2f7719e14e6a6fbabd8aa1bfbcef5e248bc16 /winsup/cygwin/include/fcntl.h | |
parent | 23e9b5cf3c4ff4507eff8fb9fcf8d5cb15afc694 (diff) |
Cygwin: introduce fallocate(2)
First cut of the new, Linux-specific fallocate(2) function.
Do not add any functionality yet, except of basic handling
of FALLOC_FL_KEEP_SIZE.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/include/fcntl.h')
-rw-r--r-- | winsup/cygwin/include/fcntl.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/winsup/cygwin/include/fcntl.h b/winsup/cygwin/include/fcntl.h index 1ef51e50c..b38dfa50b 100644 --- a/winsup/cygwin/include/fcntl.h +++ b/winsup/cygwin/include/fcntl.h @@ -42,12 +42,24 @@ details. */ #define POSIX_FADV_DONTNEED 4 #define POSIX_FADV_NOREUSE 5 -#define __FALLOC_FL_TRUNCATE 0x0001 /* internal */ +#if __GNU_VISIBLE +#define FALLOC_FL_PUNCH_HOLE 0x0001 +#define FALLOC_FL_ZERO_RANGE 0x0002 +#define FALLOC_FL_UNSHARE_RANGE 0x0004 +#define FALLOC_FL_COLLAPSE_RANGE 0x0008 +#define FALLOC_FL_INSERT_RANGE 0x0010 +#define FALLOC_FL_KEEP_SIZE 0x1000 +/* Internal flags */ +#define __FALLOC_FL_TRUNCATE 0x2000 +#endif __BEGIN_DECLS extern int posix_fadvise (int, off_t, off_t, int); extern int posix_fallocate (int, off_t, off_t); +#if __GNU_VISIBLE +extern int fallocate (int, int, off_t, off_t); +#endif __END_DECLS |