This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1357 from mrkline/move-hole-seek
Place SEEK_DATA, SEEK_HOLE in core.sys.linux.unistd
- Loading branch information
Showing
6 changed files
with
27 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module core.sys.linux.unistd; | ||
|
||
public import core.sys.posix.unistd; | ||
|
||
version(linux): | ||
extern(C): | ||
nothrow: | ||
|
||
// Additional seek constants for sparse file handling | ||
// from Linux's unistd.h, stdio.h, and linux/fs.h | ||
// (see http://man7.org/linux/man-pages/man2/lseek.2.html) | ||
enum { | ||
/// Offset is relative to the next location containing data | ||
SEEK_DATA = 3, | ||
/// Offset is relative to the next hole (or EOF if file is not sparse) | ||
SEEK_HOLE = 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters