There is no posix_category in std, use generic_category.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210630 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2014-06-11 03:49:13 +00:00
parent 3692045d8e
commit 7456ad1240
3 changed files with 3 additions and 17 deletions

View File

@@ -222,7 +222,7 @@ static error_code getMemoryBufferForStream(int FD,
ReadBytes = read(FD, Buffer.end(), ChunkSize);
if (ReadBytes == -1) {
if (errno == EINTR) continue;
return error_code(errno, posix_category());
return error_code(errno, generic_category());
}
Buffer.set_size(Buffer.size() + ReadBytes);
} while (ReadBytes != 0);
@@ -370,7 +370,7 @@ static error_code getOpenFileImpl(int FD, const char *Filename,
size_t BytesLeft = MapSize;
#ifndef HAVE_PREAD
if (lseek(FD, Offset, SEEK_SET) == -1)
return error_code(errno, posix_category());
return error_code(errno, generic_category());
#endif
while (BytesLeft) {
@@ -383,7 +383,7 @@ static error_code getOpenFileImpl(int FD, const char *Filename,
if (errno == EINTR)
continue;
// Error while reading.
return error_code(errno, posix_category());
return error_code(errno, generic_category());
}
if (NumRead == 0) {
memset(BufPtr, 0, BytesLeft); // zero-initialize rest of the buffer.