| 1160 | } |
| 1161 | |
| 1162 | Result<int64_t> FileTell(int fd) { |
| 1163 | #if defined(_WIN32) |
| 1164 | int64_t current_pos = _telli64(fd); |
| 1165 | if (current_pos == -1) { |
| 1166 | return Status::IOError("_telli64 failed"); |
| 1167 | } |
| 1168 | return current_pos; |
| 1169 | #else |
| 1170 | return lseek64_compat(fd, 0, SEEK_CUR); |
| 1171 | #endif |
| 1172 | } |
| 1173 | |
| 1174 | Result<Pipe> CreatePipe() { |
| 1175 | bool ok; |