authorgravatar for leroycepearson@geemili.xyzLeRoyce Pearson <leroycepearson@geemili.xyz> 2020-04-02 23:39:25-06:00
committergravatar for leroycepearson@geemili.xyzLeRoyce Pearson <leroycepearson@geemili.xyz> 2020-04-02 23:39:25-06:00
log733f1c25bd34270b76c5fa43928dfffda1ecd5e3
tree97bffcd642dcd04cd66a20762004783eb03b437c
parentea6525797d0db83a8560179b317837cb58634049

Fix compile errors in stage2


7 files changed, 13 insertions(+), 9 deletions(-)

lib/std/child_process.zig+1
......@@ -357,6 +357,7 @@ pub const ChildProcess = struct {
357357 error.NoSpaceLeft => unreachable,
358358 error.FileTooBig => unreachable,
359359 error.DeviceBusy => unreachable,
360 error.FileLocksNotSupported => unreachable,
360361 else => |e| return e,
361362 }
362363 else
lib/std/fs.zig+1
......@@ -843,6 +843,7 @@ pub const Dir = struct {
843843 error.IsDir => unreachable, // we're providing O_DIRECTORY
844844 error.NoSpaceLeft => unreachable, // not providing O_CREAT
845845 error.PathAlreadyExists => unreachable, // not providing O_CREAT
846 error.FileLocksNotSupported => unreachable, // locking folders is not supported
846847 else => |e| return e,
847848 };
848849 return Dir{ .fd = fd };
lib/std/os.zig+8
......@@ -819,26 +819,34 @@ pub const OpenError = error{
819819 SystemFdQuotaExceeded,
820820 NoDevice,
821821 FileNotFound,
822
822823 /// The path exceeded `MAX_PATH_BYTES` bytes.
823824 NameTooLong,
825
824826 /// Insufficient kernel memory was available, or
825827 /// the named file is a FIFO and per-user hard limit on
826828 /// memory allocation for pipes has been reached.
827829 SystemResources,
830
828831 /// The file is too large to be opened. This error is unreachable
829832 /// for 64-bit targets, as well as when opening directories.
830833 FileTooBig,
834
831835 /// The path refers to directory but the `O_DIRECTORY` flag was not provided.
832836 IsDir,
837
833838 /// A new path cannot be created because the device has no room for the new file.
834839 /// This error is only reachable when the `O_CREAT` flag is provided.
835840 NoSpaceLeft,
841
836842 /// A component used as a directory in the path was not, in fact, a directory, or
837843 /// `O_DIRECTORY` was specified and the path was not a directory.
838844 NotDir,
845
839846 /// The path already exists and the `O_CREAT` and `O_EXCL` flags were provided.
840847 PathAlreadyExists,
841848 DeviceBusy,
849
842850 /// The underlying filesystem does not support file locks
843851 FileLocksNotSupported,
844852} || UnexpectedError;
lib/std/zig/system.zig+2-3
......@@ -468,9 +468,8 @@ pub const NativeTargetInfo = struct {
468468 error.InvalidUtf8 => unreachable,
469469 error.BadPathName => unreachable,
470470 error.PipeBusy => unreachable,
471 error.PermissionDenied => unreachable,
472 error.FileBusy => unreachable,
473 error.Locked => unreachable,
471 error.FileLocksNotSupported => unreachable,
472 error.WouldBlock => unreachable,
474473
475474 error.IsDir,
476475 error.NotDir,
src-self-hosted/stage2.zig+1-4
......@@ -115,7 +115,6 @@ const Error = extern enum {
115115 InvalidOperatingSystemVersion,
116116 UnknownClangOption,
117117 NestedResponseFile,
118 PermissionDenied,
119118 FileBusy,
120119 Locked,
121120};
......@@ -849,9 +848,7 @@ export fn stage2_libc_parse(stage1_libc: *Stage2LibCInstallation, libc_file_z: [
849848 error.NoDevice => return .NoDevice,
850849 error.NotDir => return .NotDir,
851850 error.DeviceBusy => return .DeviceBusy,
852 error.PermissionDenied => return .PermissionDenied,
853 error.FileBusy => return .FileBusy,
854 error.Locked => return .Locked,
851 error.FileLocksNotSupported => unreachable,
855852 };
856853 stage1_libc.initFromStage2(libc);
857854 return .None;
src/error.cpp-1
......@@ -85,7 +85,6 @@ const char *err_str(Error err) {
8585 case ErrorInvalidOperatingSystemVersion: return "invalid operating system version";
8686 case ErrorUnknownClangOption: return "unknown Clang option";
8787 case ErrorNestedResponseFile: return "nested response file";
88 case ErrorPermissionDenied: return "permission is denied";
8988 case ErrorFileBusy: return "file is busy";
9089 case ErrorLocked: return "file is locked by another process";
9190 }
src/stage2.h-1
......@@ -107,7 +107,6 @@ enum Error {
107107 ErrorInvalidOperatingSystemVersion,
108108 ErrorUnknownClangOption,
109109 ErrorNestedResponseFile,
110 ErrorPermissionDenied,
111110 ErrorFileBusy,
112111 ErrorLocked,
113112};