Commit 6c03febd authored by Yonggang Luo's avatar Yonggang Luo
Browse files

Fixes the generator related things.

parent 35a42441
......@@ -5,3 +5,12 @@ style = "Tag"
[enum]
prefix_with_name = true
[export]
include = [
"user_regs_struct",
"user_fpsimd_struct",
"elf_gregset_t",
"elf_greg_t",
"elf_fpregset_t",
]
......@@ -18,13 +18,3 @@ pub struct user_fpsimd_struct {
pub type elf_greg_t = c_ulong;
pub type elf_gregset_t = [c_ulong; 34];
pub type elf_fpregset_t = user_fpsimd_struct;
#[no_mangle]
pub extern "C" fn _cbindgen_only_generates_structs_if_they_are_mentioned_which_is_dumb_aarch64_user(
a: user_regs_struct,
b: user_fpsimd_struct,
c: elf_gregset_t,
d: elf_greg_t,
e: elf_fpregset_t,
) {
}
......@@ -2,8 +2,8 @@
use crate::{header::sys_socket::sa_family_t, platform::types::*};
pub type in_addr_t = u32;
pub type in_port_t = u16;
pub type in_addr_t = uint32_t;
pub type in_port_t = uint16_t;
#[repr(C)]
#[derive(Debug, Clone, Copy, Default)]
......@@ -53,8 +53,8 @@ pub const IPPROTO_IPV6: u8 = 0x29;
pub const IPPROTO_RAW: u8 = 0xff;
pub const IPPROTO_MAX: u8 = 0xff;
pub const INADDR_ANY: u32 = 0; // Can't use in_addr_t alias because cbindgen :(
pub const INADDR_BROADCAST: u32 = 0xFFFF_FFFF; // Can't use core::u32::MAX because cbindgen :(
pub const INADDR_ANY: in_addr_t = 0; // Can't use in_addr_t alias because cbindgen :(
pub const INADDR_BROADCAST: u32 = u32::MAX;
pub const INADDR_NONE: u32 = 0xFFFF_FFFF;
pub const INADDR_LOOPBACK: u32 = 0x7F00_0001;
......
......@@ -11,3 +11,4 @@ prefix_with_name = true
[defines]
"target_os = linux" = "__linux__"
"target_os = redox" = "__redox__"
"target_os = windows" = "_WIN32"
......@@ -2,3 +2,4 @@ use crate::platform::types::*;
pub const CLOCK_REALTIME: c_int = 1;
pub const CLOCK_MONOTONIC: c_int = 4;
pub const CLOCK_PROCESS_CPUTIME_ID: clockid_t = 2;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment