// effectively prevents LLVM from erasing things like /dev/null, any block
// special file, or other things that aren't "regular" files.
if (!S_ISREG(buf.st_mode) && !S_ISDIR(buf.st_mode) && !S_ISLNK(buf.st_mode))
- return make_error_code(std::errc::operation_not_permitted);
+ return make_error_code(errc::operation_not_permitted);
if (::remove(p.begin()) == -1) {
if (errno != ENOENT || !IgnoreNonExisting)
file_status &Result) {
if (StatRet != 0) {
std::error_code ec(errno, std::generic_category());
- if (ec == std::errc::no_such_file_or_directory)
+ if (ec == errc::no_such_file_or_directory)
Result = file_status(file_type::file_not_found);
else
Result = file_status(file_type::status_error);
return std::error_code();
#else
#warning Missing futimes() and futimens()
- return make_error_code(std::errc::not_supported);
+ return make_error_code(errc::not_supported);
#endif
}
, Mapping() {
// Make sure that the requested size fits within SIZE_T.
if (length > std::numeric_limits<size_t>::max()) {
- ec = make_error_code(std::errc::invalid_argument);
+ ec = make_error_code(errc::invalid_argument);
return;
}
, Mapping() {
// Make sure that the requested size fits within SIZE_T.
if (length > std::numeric_limits<size_t>::max()) {
- ec = make_error_code(std::errc::invalid_argument);
+ ec = make_error_code(errc::invalid_argument);
return;
}