authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-07-31 11:23:56-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-07-31 11:23:56-07:00
logc0ac1411db64011a967670261412c09dc29f8105
tree450b1023532db605e3ae2532265c8df6543015b7
parent26777d98fe46d81b74ef304c1d1fd5975d7e0a0b

Revert "std: freebsd update proposal"

This reverts commit 2568da2f41d3403b2cd91bbb84862c86932b63e6.

1 files changed, 2 insertions(+), 12 deletions(-)

lib/std/c/freebsd.zig+2-12
...@@ -5,21 +5,12 @@ const maxInt = std.math.maxInt;...@@ -5,21 +5,12 @@ const maxInt = std.math.maxInt;
5const iovec = std.os.iovec;5const iovec = std.os.iovec;
6const iovec_const = std.os.iovec_const;6const iovec_const = std.os.iovec_const;
77
8pub const CPU_SETSIZE = 256;
9pub const cpuset_t = extern struct {
10 __bits: [(CPU_SETSIZE + (@bitSizeOf(c_long) - 1)) / @bitSizeOf(c_long)]c_long,
11};
12pub const cpulevel_t = c_int;
13pub const cpuwhich_t = c_int;
14pub const id_t = i64;
15
16extern "c" fn __error() *c_int;8extern "c" fn __error() *c_int;
17pub const _errno = __error;9pub const _errno = __error;
1810
19pub extern "c" fn getdents(fd: c_int, buf_ptr: [*]u8, nbytes: usize) isize;11pub extern "c" fn getdents(fd: c_int, buf_ptr: [*]u8, nbytes: usize) isize;
20pub extern "c" fn sigaltstack(ss: ?*stack_t, old_ss: ?*stack_t) c_int;12pub extern "c" fn sigaltstack(ss: ?*stack_t, old_ss: ?*stack_t) c_int;
21pub extern "c" fn getrandom(buf_ptr: [*]u8, buf_len: usize, flags: c_uint) isize;13pub extern "c" fn getrandom(buf_ptr: [*]u8, buf_len: usize, flags: c_uint) isize;
22pub extern "c" fn getentropy(buf_ptr: [*]u8, buf_len: usize) c_int;
2314
24pub extern "c" fn pthread_getthreadid_np() c_int;15pub extern "c" fn pthread_getthreadid_np() c_int;
25pub extern "c" fn pthread_set_name_np(thread: std.c.pthread_t, name: [*:0]const u8) void;16pub extern "c" fn pthread_set_name_np(thread: std.c.pthread_t, name: [*:0]const u8) void;
...@@ -35,9 +26,6 @@ pub extern "c" fn getpid() pid_t;...@@ -35,9 +26,6 @@ pub extern "c" fn getpid() pid_t;
35pub extern "c" fn kinfo_getfile(pid: pid_t, cntp: *c_int) ?[*]kinfo_file;26pub extern "c" fn kinfo_getfile(pid: pid_t, cntp: *c_int) ?[*]kinfo_file;
36pub extern "c" fn kinfo_getvmmap(pid: pid_t, cntp: *c_int) ?[*]kinfo_vmentry;27pub extern "c" fn kinfo_getvmmap(pid: pid_t, cntp: *c_int) ?[*]kinfo_vmentry;
3728
38pub extern "c" fn cpuset_getaffinity(level: cpulevel_t, which: cpuwhich_t, id: id_t, setsize: usize, mask: *cpuset_t) c_int;
39pub extern "c" fn cpuset_setaffinity(level: cpulevel_t, which: cpuwhich_t, id: id_t, setsize: usize, mask: *const cpuset_t) c_int;
40
41pub const sf_hdtr = extern struct {29pub const sf_hdtr = extern struct {
42 headers: [*]const iovec_const,30 headers: [*]const iovec_const,
43 hdr_cnt: c_int,31 hdr_cnt: c_int,
...@@ -215,6 +203,8 @@ pub const clock_t = isize;...@@ -215,6 +203,8 @@ pub const clock_t = isize;
215pub const socklen_t = u32;203pub const socklen_t = u32;
216pub const suseconds_t = c_long;204pub const suseconds_t = c_long;
217205
206pub const id_t = i64;
207
218/// Renamed from `kevent` to `Kevent` to avoid conflict with function name.208/// Renamed from `kevent` to `Kevent` to avoid conflict with function name.
219pub const Kevent = extern struct {209pub const Kevent = extern struct {
220 /// Identifier for this event.210 /// Identifier for this event.