diff --git a/CMakeLists.txt b/CMakeLists.txt index 662f14b799649f777799110828ba232303882de2..137cefb5b472bc3dbe9e25b83958728b5b4c4a8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -554,8 +554,7 @@ set(ZIG_STD_FILES "net.zig" "os/child_process.zig" "os/darwin.zig" - "os/darwin_errno.zig" - "os/darwin_socket.zig" + "os/darwin/errno.zig" "os/epoch.zig" "os/file.zig" "os/get_app_data_dir.zig" diff --git a/std/c/darwin.zig b/std/c/darwin.zig index 4189dfeadcda8e73a5699e80edfd27a271e1ea0f..1bd1d6c4c997ee99bd8998cf4a5a9c22f4f845dd 100644 --- a/std/c/darwin.zig +++ b/std/c/darwin.zig @@ -30,7 +30,7 @@ pub extern "c" fn sysctl(name: [*]c_int, namelen: c_uint, oldp: ?*c_void, oldlen pub extern "c" fn sysctlbyname(name: [*]const u8, oldp: ?*c_void, oldlenp: ?*usize, newp: ?*c_void, newlen: usize) c_int; pub extern "c" fn sysctlnametomib(name: [*]const u8, mibp: ?*c_int, sizep: ?*usize) c_int; -pub use @import("../os/darwin_errno.zig"); +pub use @import("../os/darwin/errno.zig"); pub const _errno = __error; diff --git a/std/os/darwin.zig b/std/os/darwin.zig index 4258e33c932c8e170c25968c5834346388417cb7..cf67b01d5a25a728f0fd36ff2e237071a2a20aa3 100644 --- a/std/os/darwin.zig +++ b/std/os/darwin.zig @@ -2,8 +2,7 @@ const std = @import("../index.zig"); const c = std.c; const assert = std.debug.assert; -pub use @import("darwin_errno.zig"); -pub use @import("darwin_socket.zig"); +pub use @import("darwin/errno.zig"); pub const PATH_MAX = 1024; @@ -483,6 +482,92 @@ pub const NOTE_MACH_CONTINUOUS_TIME = 0x00000080; /// data is mach absolute time units pub const NOTE_MACHTIME = 0x00000100; +pub const AF_UNSPEC: c_int = 0; +pub const AF_LOCAL: c_int = 1; +pub const AF_UNIX: c_int = AF_LOCAL; +pub const AF_INET: c_int = 2; +pub const AF_SYS_CONTROL: c_int = 2; +pub const AF_IMPLINK: c_int = 3; +pub const AF_PUP: c_int = 4; +pub const AF_CHAOS: c_int = 5; +pub const AF_NS: c_int = 6; +pub const AF_ISO: c_int = 7; +pub const AF_OSI: c_int = AF_ISO; +pub const AF_ECMA: c_int = 8; +pub const AF_DATAKIT: c_int = 9; +pub const AF_CCITT: c_int = 10; +pub const AF_SNA: c_int = 11; +pub const AF_DECnet: c_int = 12; +pub const AF_DLI: c_int = 13; +pub const AF_LAT: c_int = 14; +pub const AF_HYLINK: c_int = 15; +pub const AF_APPLETALK: c_int = 16; +pub const AF_ROUTE: c_int = 17; +pub const AF_LINK: c_int = 18; +pub const AF_XTP: c_int = 19; +pub const AF_COIP: c_int = 20; +pub const AF_CNT: c_int = 21; +pub const AF_RTIP: c_int = 22; +pub const AF_IPX: c_int = 23; +pub const AF_SIP: c_int = 24; +pub const AF_PIP: c_int = 25; +pub const AF_ISDN: c_int = 28; +pub const AF_E164: c_int = AF_ISDN; +pub const AF_KEY: c_int = 29; +pub const AF_INET6: c_int = 30; +pub const AF_NATM: c_int = 31; +pub const AF_SYSTEM: c_int = 32; +pub const AF_NETBIOS: c_int = 33; +pub const AF_PPP: c_int = 34; +pub const AF_MAX: c_int = 40; + +pub const PF_UNSPEC: c_int = AF_UNSPEC; +pub const PF_LOCAL: c_int = AF_LOCAL; +pub const PF_UNIX: c_int = PF_LOCAL; +pub const PF_INET: c_int = AF_INET; +pub const PF_IMPLINK: c_int = AF_IMPLINK; +pub const PF_PUP: c_int = AF_PUP; +pub const PF_CHAOS: c_int = AF_CHAOS; +pub const PF_NS: c_int = AF_NS; +pub const PF_ISO: c_int = AF_ISO; +pub const PF_OSI: c_int = AF_ISO; +pub const PF_ECMA: c_int = AF_ECMA; +pub const PF_DATAKIT: c_int = AF_DATAKIT; +pub const PF_CCITT: c_int = AF_CCITT; +pub const PF_SNA: c_int = AF_SNA; +pub const PF_DECnet: c_int = AF_DECnet; +pub const PF_DLI: c_int = AF_DLI; +pub const PF_LAT: c_int = AF_LAT; +pub const PF_HYLINK: c_int = AF_HYLINK; +pub const PF_APPLETALK: c_int = AF_APPLETALK; +pub const PF_ROUTE: c_int = AF_ROUTE; +pub const PF_LINK: c_int = AF_LINK; +pub const PF_XTP: c_int = AF_XTP; +pub const PF_COIP: c_int = AF_COIP; +pub const PF_CNT: c_int = AF_CNT; +pub const PF_SIP: c_int = AF_SIP; +pub const PF_IPX: c_int = AF_IPX; +pub const PF_RTIP: c_int = AF_RTIP; +pub const PF_PIP: c_int = AF_PIP; +pub const PF_ISDN: c_int = AF_ISDN; +pub const PF_KEY: c_int = AF_KEY; +pub const PF_INET6: c_int = AF_INET6; +pub const PF_NATM: c_int = AF_NATM; +pub const PF_SYSTEM: c_int = AF_SYSTEM; +pub const PF_NETBIOS: c_int = AF_NETBIOS; +pub const PF_PPP: c_int = AF_PPP; +pub const PF_MAX: c_int = AF_MAX; + +pub const SYSPROTO_EVENT: c_int = 1; +pub const SYSPROTO_CONTROL: c_int = 2; + +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; +pub const SOCK_RAW: c_int = 3; +pub const SOCK_RDM: c_int = 4; +pub const SOCK_SEQPACKET: c_int = 5; +pub const SOCK_MAXADDRLEN: c_int = 255; + fn wstatus(x: i32) i32 { return x & 0o177; } diff --git a/std/os/darwin/errno.zig b/std/os/darwin/errno.zig new file mode 100644 index 0000000000000000000000000000000000000000..438f3382ad3bbe0b2190958d743d914b62437999 --- /dev/null +++ b/std/os/darwin/errno.zig @@ -0,0 +1,328 @@ +/// Operation not permitted +pub const EPERM = 1; + +/// No such file or directory +pub const ENOENT = 2; + +/// No such process +pub const ESRCH = 3; + +/// Interrupted system call +pub const EINTR = 4; + +/// Input/output error +pub const EIO = 5; + +/// Device not configured +pub const ENXIO = 6; + +/// Argument list too long +pub const E2BIG = 7; + +/// Exec format error +pub const ENOEXEC = 8; + +/// Bad file descriptor +pub const EBADF = 9; + +/// No child processes +pub const ECHILD = 10; + +/// Resource deadlock avoided +pub const EDEADLK = 11; + +/// Cannot allocate memory +pub const ENOMEM = 12; + +/// Permission denied +pub const EACCES = 13; + +/// Bad address +pub const EFAULT = 14; + +/// Block device required +pub const ENOTBLK = 15; + +/// Device / Resource busy +pub const EBUSY = 16; + +/// File exists +pub const EEXIST = 17; + +/// Cross-device link +pub const EXDEV = 18; + +/// Operation not supported by device +pub const ENODEV = 19; + +/// Not a directory +pub const ENOTDIR = 20; + +/// Is a directory +pub const EISDIR = 21; + +/// Invalid argument +pub const EINVAL = 22; + +/// Too many open files in system +pub const ENFILE = 23; + +/// Too many open files +pub const EMFILE = 24; + +/// Inappropriate ioctl for device +pub const ENOTTY = 25; + +/// Text file busy +pub const ETXTBSY = 26; + +/// File too large +pub const EFBIG = 27; + +/// No space left on device +pub const ENOSPC = 28; + +/// Illegal seek +pub const ESPIPE = 29; + +/// Read-only file system +pub const EROFS = 30; + +/// Too many links +pub const EMLINK = 31; +/// Broken pipe + +// math software +pub const EPIPE = 32; + +/// Numerical argument out of domain +pub const EDOM = 33; +/// Result too large + +// non-blocking and interrupt i/o +pub const ERANGE = 34; + +/// Resource temporarily unavailable +pub const EAGAIN = 35; + +/// Operation would block +pub const EWOULDBLOCK = EAGAIN; + +/// Operation now in progress +pub const EINPROGRESS = 36; +/// Operation already in progress + +// ipc/network software -- argument errors +pub const EALREADY = 37; + +/// Socket operation on non-socket +pub const ENOTSOCK = 38; + +/// Destination address required +pub const EDESTADDRREQ = 39; + +/// Message too long +pub const EMSGSIZE = 40; + +/// Protocol wrong type for socket +pub const EPROTOTYPE = 41; + +/// Protocol not available +pub const ENOPROTOOPT = 42; + +/// Protocol not supported +pub const EPROTONOSUPPORT = 43; + +/// Socket type not supported +pub const ESOCKTNOSUPPORT = 44; + +/// Operation not supported +pub const ENOTSUP = 45; + +/// Protocol family not supported +pub const EPFNOSUPPORT = 46; + +/// Address family not supported by protocol family +pub const EAFNOSUPPORT = 47; + +/// Address already in use +pub const EADDRINUSE = 48; +/// Can't assign requested address + +// ipc/network software -- operational errors +pub const EADDRNOTAVAIL = 49; + +/// Network is down +pub const ENETDOWN = 50; + +/// Network is unreachable +pub const ENETUNREACH = 51; + +/// Network dropped connection on reset +pub const ENETRESET = 52; + +/// Software caused connection abort +pub const ECONNABORTED = 53; + +/// Connection reset by peer +pub const ECONNRESET = 54; + +/// No buffer space available +pub const ENOBUFS = 55; + +/// Socket is already connected +pub const EISCONN = 56; + +/// Socket is not connected +pub const ENOTCONN = 57; + +/// Can't send after socket shutdown +pub const ESHUTDOWN = 58; + +/// Too many references: can't splice +pub const ETOOMANYREFS = 59; + +/// Operation timed out +pub const ETIMEDOUT = 60; + +/// Connection refused +pub const ECONNREFUSED = 61; + +/// Too many levels of symbolic links +pub const ELOOP = 62; + +/// File name too long +pub const ENAMETOOLONG = 63; + +/// Host is down +pub const EHOSTDOWN = 64; + +/// No route to host +pub const EHOSTUNREACH = 65; +/// Directory not empty + +// quotas & mush +pub const ENOTEMPTY = 66; + +/// Too many processes +pub const EPROCLIM = 67; + +/// Too many users +pub const EUSERS = 68; +/// Disc quota exceeded + +// Network File System +pub const EDQUOT = 69; + +/// Stale NFS file handle +pub const ESTALE = 70; + +/// Too many levels of remote in path +pub const EREMOTE = 71; + +/// RPC struct is bad +pub const EBADRPC = 72; + +/// RPC version wrong +pub const ERPCMISMATCH = 73; + +/// RPC prog. not avail +pub const EPROGUNAVAIL = 74; + +/// Program version wrong +pub const EPROGMISMATCH = 75; + +/// Bad procedure for program +pub const EPROCUNAVAIL = 76; + +/// No locks available +pub const ENOLCK = 77; + +/// Function not implemented +pub const ENOSYS = 78; + +/// Inappropriate file type or format +pub const EFTYPE = 79; + +/// Authentication error +pub const EAUTH = 80; +/// Need authenticator + +// Intelligent device errors +pub const ENEEDAUTH = 81; + +/// Device power is off +pub const EPWROFF = 82; + +/// Device error, e.g. paper out +pub const EDEVERR = 83; +/// Value too large to be stored in data type + +// Program loading errors +pub const EOVERFLOW = 84; + +/// Bad executable +pub const EBADEXEC = 85; + +/// Bad CPU type in executable +pub const EBADARCH = 86; + +/// Shared library version mismatch +pub const ESHLIBVERS = 87; + +/// Malformed Macho file +pub const EBADMACHO = 88; + +/// Operation canceled +pub const ECANCELED = 89; + +/// Identifier removed +pub const EIDRM = 90; + +/// No message of desired type +pub const ENOMSG = 91; + +/// Illegal byte sequence +pub const EILSEQ = 92; + +/// Attribute not found +pub const ENOATTR = 93; + +/// Bad message +pub const EBADMSG = 94; + +/// Reserved +pub const EMULTIHOP = 95; + +/// No message available on STREAM +pub const ENODATA = 96; + +/// Reserved +pub const ENOLINK = 97; + +/// No STREAM resources +pub const ENOSR = 98; + +/// Not a STREAM +pub const ENOSTR = 99; + +/// Protocol error +pub const EPROTO = 100; + +/// STREAM ioctl timeout +pub const ETIME = 101; + +/// No such policy registered +pub const ENOPOLICY = 103; + +/// State not recoverable +pub const ENOTRECOVERABLE = 104; + +/// Previous owner died +pub const EOWNERDEAD = 105; + +/// Interface output queue is full +pub const EQFULL = 106; + +/// Must be equal largest errno +pub const ELAST = 106; diff --git a/std/os/darwin_errno.zig b/std/os/darwin_errno.zig deleted file mode 100644 index 438f3382ad3bbe0b2190958d743d914b62437999..0000000000000000000000000000000000000000 --- a/std/os/darwin_errno.zig +++ /dev/null @@ -1,328 +0,0 @@ -/// Operation not permitted -pub const EPERM = 1; - -/// No such file or directory -pub const ENOENT = 2; - -/// No such process -pub const ESRCH = 3; - -/// Interrupted system call -pub const EINTR = 4; - -/// Input/output error -pub const EIO = 5; - -/// Device not configured -pub const ENXIO = 6; - -/// Argument list too long -pub const E2BIG = 7; - -/// Exec format error -pub const ENOEXEC = 8; - -/// Bad file descriptor -pub const EBADF = 9; - -/// No child processes -pub const ECHILD = 10; - -/// Resource deadlock avoided -pub const EDEADLK = 11; - -/// Cannot allocate memory -pub const ENOMEM = 12; - -/// Permission denied -pub const EACCES = 13; - -/// Bad address -pub const EFAULT = 14; - -/// Block device required -pub const ENOTBLK = 15; - -/// Device / Resource busy -pub const EBUSY = 16; - -/// File exists -pub const EEXIST = 17; - -/// Cross-device link -pub const EXDEV = 18; - -/// Operation not supported by device -pub const ENODEV = 19; - -/// Not a directory -pub const ENOTDIR = 20; - -/// Is a directory -pub const EISDIR = 21; - -/// Invalid argument -pub const EINVAL = 22; - -/// Too many open files in system -pub const ENFILE = 23; - -/// Too many open files -pub const EMFILE = 24; - -/// Inappropriate ioctl for device -pub const ENOTTY = 25; - -/// Text file busy -pub const ETXTBSY = 26; - -/// File too large -pub const EFBIG = 27; - -/// No space left on device -pub const ENOSPC = 28; - -/// Illegal seek -pub const ESPIPE = 29; - -/// Read-only file system -pub const EROFS = 30; - -/// Too many links -pub const EMLINK = 31; -/// Broken pipe - -// math software -pub const EPIPE = 32; - -/// Numerical argument out of domain -pub const EDOM = 33; -/// Result too large - -// non-blocking and interrupt i/o -pub const ERANGE = 34; - -/// Resource temporarily unavailable -pub const EAGAIN = 35; - -/// Operation would block -pub const EWOULDBLOCK = EAGAIN; - -/// Operation now in progress -pub const EINPROGRESS = 36; -/// Operation already in progress - -// ipc/network software -- argument errors -pub const EALREADY = 37; - -/// Socket operation on non-socket -pub const ENOTSOCK = 38; - -/// Destination address required -pub const EDESTADDRREQ = 39; - -/// Message too long -pub const EMSGSIZE = 40; - -/// Protocol wrong type for socket -pub const EPROTOTYPE = 41; - -/// Protocol not available -pub const ENOPROTOOPT = 42; - -/// Protocol not supported -pub const EPROTONOSUPPORT = 43; - -/// Socket type not supported -pub const ESOCKTNOSUPPORT = 44; - -/// Operation not supported -pub const ENOTSUP = 45; - -/// Protocol family not supported -pub const EPFNOSUPPORT = 46; - -/// Address family not supported by protocol family -pub const EAFNOSUPPORT = 47; - -/// Address already in use -pub const EADDRINUSE = 48; -/// Can't assign requested address - -// ipc/network software -- operational errors -pub const EADDRNOTAVAIL = 49; - -/// Network is down -pub const ENETDOWN = 50; - -/// Network is unreachable -pub const ENETUNREACH = 51; - -/// Network dropped connection on reset -pub const ENETRESET = 52; - -/// Software caused connection abort -pub const ECONNABORTED = 53; - -/// Connection reset by peer -pub const ECONNRESET = 54; - -/// No buffer space available -pub const ENOBUFS = 55; - -/// Socket is already connected -pub const EISCONN = 56; - -/// Socket is not connected -pub const ENOTCONN = 57; - -/// Can't send after socket shutdown -pub const ESHUTDOWN = 58; - -/// Too many references: can't splice -pub const ETOOMANYREFS = 59; - -/// Operation timed out -pub const ETIMEDOUT = 60; - -/// Connection refused -pub const ECONNREFUSED = 61; - -/// Too many levels of symbolic links -pub const ELOOP = 62; - -/// File name too long -pub const ENAMETOOLONG = 63; - -/// Host is down -pub const EHOSTDOWN = 64; - -/// No route to host -pub const EHOSTUNREACH = 65; -/// Directory not empty - -// quotas & mush -pub const ENOTEMPTY = 66; - -/// Too many processes -pub const EPROCLIM = 67; - -/// Too many users -pub const EUSERS = 68; -/// Disc quota exceeded - -// Network File System -pub const EDQUOT = 69; - -/// Stale NFS file handle -pub const ESTALE = 70; - -/// Too many levels of remote in path -pub const EREMOTE = 71; - -/// RPC struct is bad -pub const EBADRPC = 72; - -/// RPC version wrong -pub const ERPCMISMATCH = 73; - -/// RPC prog. not avail -pub const EPROGUNAVAIL = 74; - -/// Program version wrong -pub const EPROGMISMATCH = 75; - -/// Bad procedure for program -pub const EPROCUNAVAIL = 76; - -/// No locks available -pub const ENOLCK = 77; - -/// Function not implemented -pub const ENOSYS = 78; - -/// Inappropriate file type or format -pub const EFTYPE = 79; - -/// Authentication error -pub const EAUTH = 80; -/// Need authenticator - -// Intelligent device errors -pub const ENEEDAUTH = 81; - -/// Device power is off -pub const EPWROFF = 82; - -/// Device error, e.g. paper out -pub const EDEVERR = 83; -/// Value too large to be stored in data type - -// Program loading errors -pub const EOVERFLOW = 84; - -/// Bad executable -pub const EBADEXEC = 85; - -/// Bad CPU type in executable -pub const EBADARCH = 86; - -/// Shared library version mismatch -pub const ESHLIBVERS = 87; - -/// Malformed Macho file -pub const EBADMACHO = 88; - -/// Operation canceled -pub const ECANCELED = 89; - -/// Identifier removed -pub const EIDRM = 90; - -/// No message of desired type -pub const ENOMSG = 91; - -/// Illegal byte sequence -pub const EILSEQ = 92; - -/// Attribute not found -pub const ENOATTR = 93; - -/// Bad message -pub const EBADMSG = 94; - -/// Reserved -pub const EMULTIHOP = 95; - -/// No message available on STREAM -pub const ENODATA = 96; - -/// Reserved -pub const ENOLINK = 97; - -/// No STREAM resources -pub const ENOSR = 98; - -/// Not a STREAM -pub const ENOSTR = 99; - -/// Protocol error -pub const EPROTO = 100; - -/// STREAM ioctl timeout -pub const ETIME = 101; - -/// No such policy registered -pub const ENOPOLICY = 103; - -/// State not recoverable -pub const ENOTRECOVERABLE = 104; - -/// Previous owner died -pub const EOWNERDEAD = 105; - -/// Interface output queue is full -pub const EQFULL = 106; - -/// Must be equal largest errno -pub const ELAST = 106; diff --git a/std/os/darwin_socket.zig b/std/os/darwin_socket.zig deleted file mode 100644 index 0c613c65043a4b91487003f1a7fd46dbdaeaf33c..0000000000000000000000000000000000000000 --- a/std/os/darwin_socket.zig +++ /dev/null @@ -1,85 +0,0 @@ -pub const AF_UNSPEC: c_int = 0; -pub const AF_LOCAL: c_int = 1; -pub const AF_UNIX: c_int = AF_LOCAL; -pub const AF_INET: c_int = 2; -pub const AF_SYS_CONTROL: c_int = 2; -pub const AF_IMPLINK: c_int = 3; -pub const AF_PUP: c_int = 4; -pub const AF_CHAOS: c_int = 5; -pub const AF_NS: c_int = 6; -pub const AF_ISO: c_int = 7; -pub const AF_OSI: c_int = AF_ISO; -pub const AF_ECMA: c_int = 8; -pub const AF_DATAKIT: c_int = 9; -pub const AF_CCITT: c_int = 10; -pub const AF_SNA: c_int = 11; -pub const AF_DECnet: c_int = 12; -pub const AF_DLI: c_int = 13; -pub const AF_LAT: c_int = 14; -pub const AF_HYLINK: c_int = 15; -pub const AF_APPLETALK: c_int = 16; -pub const AF_ROUTE: c_int = 17; -pub const AF_LINK: c_int = 18; -pub const AF_XTP: c_int = 19; -pub const AF_COIP: c_int = 20; -pub const AF_CNT: c_int = 21; -pub const AF_RTIP: c_int = 22; -pub const AF_IPX: c_int = 23; -pub const AF_SIP: c_int = 24; -pub const AF_PIP: c_int = 25; -pub const AF_ISDN: c_int = 28; -pub const AF_E164: c_int = AF_ISDN; -pub const AF_KEY: c_int = 29; -pub const AF_INET6: c_int = 30; -pub const AF_NATM: c_int = 31; -pub const AF_SYSTEM: c_int = 32; -pub const AF_NETBIOS: c_int = 33; -pub const AF_PPP: c_int = 34; -pub const AF_MAX: c_int = 40; - -pub const PF_UNSPEC: c_int = AF_UNSPEC; -pub const PF_LOCAL: c_int = AF_LOCAL; -pub const PF_UNIX: c_int = PF_LOCAL; -pub const PF_INET: c_int = AF_INET; -pub const PF_IMPLINK: c_int = AF_IMPLINK; -pub const PF_PUP: c_int = AF_PUP; -pub const PF_CHAOS: c_int = AF_CHAOS; -pub const PF_NS: c_int = AF_NS; -pub const PF_ISO: c_int = AF_ISO; -pub const PF_OSI: c_int = AF_ISO; -pub const PF_ECMA: c_int = AF_ECMA; -pub const PF_DATAKIT: c_int = AF_DATAKIT; -pub const PF_CCITT: c_int = AF_CCITT; -pub const PF_SNA: c_int = AF_SNA; -pub const PF_DECnet: c_int = AF_DECnet; -pub const PF_DLI: c_int = AF_DLI; -pub const PF_LAT: c_int = AF_LAT; -pub const PF_HYLINK: c_int = AF_HYLINK; -pub const PF_APPLETALK: c_int = AF_APPLETALK; -pub const PF_ROUTE: c_int = AF_ROUTE; -pub const PF_LINK: c_int = AF_LINK; -pub const PF_XTP: c_int = AF_XTP; -pub const PF_COIP: c_int = AF_COIP; -pub const PF_CNT: c_int = AF_CNT; -pub const PF_SIP: c_int = AF_SIP; -pub const PF_IPX: c_int = AF_IPX; -pub const PF_RTIP: c_int = AF_RTIP; -pub const PF_PIP: c_int = AF_PIP; -pub const PF_ISDN: c_int = AF_ISDN; -pub const PF_KEY: c_int = AF_KEY; -pub const PF_INET6: c_int = AF_INET6; -pub const PF_NATM: c_int = AF_NATM; -pub const PF_SYSTEM: c_int = AF_SYSTEM; -pub const PF_NETBIOS: c_int = AF_NETBIOS; -pub const PF_PPP: c_int = AF_PPP; -pub const PF_MAX: c_int = AF_MAX; - -pub const SYSPROTO_EVENT: c_int = 1; -pub const SYSPROTO_CONTROL: c_int = 2; - -pub const SOCK_STREAM: c_int = 1; -pub const SOCK_DGRAM: c_int = 2; -pub const SOCK_RAW: c_int = 3; -pub const SOCK_RDM: c_int = 4; -pub const SOCK_SEQPACKET: c_int = 5; -pub const SOCK_MAXADDRLEN: c_int = 255; diff --git a/std/os/index.zig b/std/os/index.zig index 87053fd8dfefcafb5617d4f3f69f934ac9854e00..77fd2a78ad69a242b756e527d61697d5ef560116 100644 --- a/std/os/index.zig +++ b/std/os/index.zig @@ -11,7 +11,7 @@ const os = this; test "std.os" { _ = @import("child_process.zig"); _ = @import("darwin.zig"); - _ = @import("darwin_errno.zig"); + _ = @import("darwin/errno.zig"); _ = @import("get_user_id.zig"); _ = @import("linux/index.zig"); _ = @import("path.zig");