Kun Yi | 73380f6 | 2019-01-09 13:35:28 -0800 | [diff] [blame] | 1 | #include "sys.hpp" |
| 2 | |
| 3 | #include <fcntl.h> |
| 4 | #include <unistd.h> |
| 5 | |
| 6 | namespace binstore |
| 7 | { |
| 8 | |
| 9 | namespace internal |
| 10 | { |
| 11 | |
| 12 | int SysImpl::open(const char* pathname, int flags) const |
| 13 | { |
| 14 | return ::open(pathname, flags); |
| 15 | } |
| 16 | |
| 17 | int SysImpl::close(int fd) const |
| 18 | { |
| 19 | return ::close(fd); |
| 20 | } |
| 21 | |
| 22 | off_t SysImpl::lseek(int fd, off_t offset, int whence) const |
| 23 | { |
| 24 | return ::lseek(fd, offset, whence); |
| 25 | } |
| 26 | |
| 27 | ssize_t SysImpl::read(int fd, void* buf, size_t count) const |
| 28 | { |
| 29 | return ::read(fd, buf, count); |
| 30 | } |
| 31 | |
| 32 | ssize_t SysImpl::write(int fd, const void* buf, size_t count) const |
| 33 | { |
| 34 | return ::write(fd, buf, count); |
| 35 | } |
| 36 | |
| 37 | SysImpl sys_impl; |
| 38 | |
| 39 | } // namespace internal |
| 40 | |
| 41 | } // namespace binstore |