|
|
|
@ -18,6 +18,10 @@ pub const xcb = @cImport({
|
|
|
|
|
@cInclude("xcb/xcb.h");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
pub const c_size = u64;
|
|
|
|
|
pub const c_uid = u32;
|
|
|
|
|
pub const c_gid = u32;
|
|
|
|
|
pub const c_time = c_long;
|
|
|
|
|
pub const tm = extern struct {
|
|
|
|
|
tm_sec: c_int,
|
|
|
|
|
tm_min: c_int,
|
|
|
|
@ -33,8 +37,8 @@ pub const passwd = extern struct {
|
|
|
|
|
pw_name: [*:0]u8,
|
|
|
|
|
pw_passwd: [*:0]u8,
|
|
|
|
|
|
|
|
|
|
pw_uid: u32,
|
|
|
|
|
pw_gid: u32,
|
|
|
|
|
pw_uid: c_uid,
|
|
|
|
|
pw_gid: c_gid,
|
|
|
|
|
pw_gecos: [*:0]u8,
|
|
|
|
|
pw_dir: [*:0]u8,
|
|
|
|
|
pw_shell: [*:0]u8,
|
|
|
|
@ -64,20 +68,20 @@ pub const O_RDWR: c_uint = 0x02;
|
|
|
|
|
|
|
|
|
|
pub extern "c" fn fileno(stream: *std.c.FILE) c_int;
|
|
|
|
|
pub extern "c" fn sysconf(name: c_int) c_long;
|
|
|
|
|
pub extern "c" fn time(second: ?*c_long) c_long;
|
|
|
|
|
pub extern "c" fn localtime(timer: *const c_long) *tm;
|
|
|
|
|
pub extern "c" fn strftime(str: [*:0]u8, maxsize: u64, format: [*:0]const u8, timeptr: *const tm) u64;
|
|
|
|
|
pub extern "c" fn time(second: ?*c_time) c_time;
|
|
|
|
|
pub extern "c" fn localtime(timer: *const c_time) *tm;
|
|
|
|
|
pub extern "c" fn strftime(str: [*:0]u8, maxsize: c_size, format: [*:0]const u8, timeptr: *const tm) c_size;
|
|
|
|
|
pub extern "c" fn setenv(name: [*:0]const u8, value: [*:0]const u8, overwrite: c_int) c_int;
|
|
|
|
|
pub extern "c" fn getenv(name: [*:0]const u8) [*:0]u8;
|
|
|
|
|
pub extern "c" fn putenv(name: [*:0]u8) c_int;
|
|
|
|
|
pub extern "c" fn clearenv() c_int;
|
|
|
|
|
pub extern "c" fn getuid() u32;
|
|
|
|
|
pub extern "c" fn getuid() c_uid;
|
|
|
|
|
pub extern "c" fn getpwnam(name: [*:0]const u8) ?*passwd;
|
|
|
|
|
pub extern "c" fn endpwent() void;
|
|
|
|
|
pub extern "c" fn setusershell() void;
|
|
|
|
|
pub extern "c" fn getusershell() [*:0]u8;
|
|
|
|
|
pub extern "c" fn endusershell() void;
|
|
|
|
|
pub extern "c" fn initgroups(user: [*:0]const u8, group: u32) c_int;
|
|
|
|
|
pub extern "c" fn initgroups(user: [*:0]const u8, group: c_gid) c_int;
|
|
|
|
|
pub extern "c" fn chdir(path: [*:0]const u8) c_int;
|
|
|
|
|
pub extern "c" fn execl(path: [*:0]const u8, arg: [*:0]const u8, ...) c_int;
|
|
|
|
|
|
|
|
|
|