aboutsummaryrefslogtreecommitdiff
path: root/libc/src/unix/uclibc/mips
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2019-05-24 18:07:22 -0700
committerDaniel Mueller <deso@posteo.net>2019-05-24 18:07:22 -0700
commit82cf43dd887801b8b22b8aae8c02854d921915d5 (patch)
treeb1bf3710bd07fe83e396a5db8563f3e6c5e85689 /libc/src/unix/uclibc/mips
parent06722702ea35434189d7de2b13a00209b2ebbd6d (diff)
downloadnitrocli-82cf43dd887801b8b22b8aae8c02854d921915d5.tar.gz
nitrocli-82cf43dd887801b8b22b8aae8c02854d921915d5.tar.bz2
Update libc crate to 0.2.55
This change updates the libc crate to version 0.2.55. Import subrepo libc/:libc at caf17a0641d29dc624621177f5756804dd180c13
Diffstat (limited to 'libc/src/unix/uclibc/mips')
-rw-r--r--libc/src/unix/uclibc/mips/mips32/align.rs13
-rw-r--r--libc/src/unix/uclibc/mips/mips32/mod.rs (renamed from libc/src/unix/uclibc/mips/mips32.rs)34
-rw-r--r--libc/src/unix/uclibc/mips/mips32/no_align.rs10
-rw-r--r--libc/src/unix/uclibc/mips/mips64/align.rs10
-rw-r--r--libc/src/unix/uclibc/mips/mips64/mod.rs (renamed from libc/src/unix/uclibc/mips/mips64.rs)21
-rw-r--r--libc/src/unix/uclibc/mips/mips64/no_align.rs8
6 files changed, 62 insertions, 34 deletions
diff --git a/libc/src/unix/uclibc/mips/mips32/align.rs b/libc/src/unix/uclibc/mips/mips32/align.rs
new file mode 100644
index 0000000..4a0e074
--- /dev/null
+++ b/libc/src/unix/uclibc/mips/mips32/align.rs
@@ -0,0 +1,13 @@
+s! {
+ // FIXME this is actually a union
+ #[cfg_attr(target_pointer_width = "32",
+ repr(align(4)))]
+ #[cfg_attr(target_pointer_width = "64",
+ repr(align(8)))]
+ pub struct sem_t {
+ #[cfg(target_pointer_width = "32")]
+ __size: [::c_char; 16],
+ #[cfg(target_pointer_width = "64")]
+ __size: [::c_char; 32],
+ }
+}
diff --git a/libc/src/unix/uclibc/mips/mips32.rs b/libc/src/unix/uclibc/mips/mips32/mod.rs
index dcbfcf8..410ab70 100644
--- a/libc/src/unix/uclibc/mips/mips32.rs
+++ b/libc/src/unix/uclibc/mips/mips32/mod.rs
@@ -220,20 +220,6 @@ s! {
pub mem_unit: ::c_uint,
pub _f: [::c_char; 8],
}
-
- // FIXME this is actually a union
- #[cfg_attr(all(feature = "align", target_pointer_width = "32"),
- repr(align(4)))]
- #[cfg_attr(all(feature = "align", target_pointer_width = "64"),
- repr(align(8)))]
- pub struct sem_t {
- #[cfg(target_pointer_width = "32")]
- __size: [::c_char; 16],
- #[cfg(target_pointer_width = "64")]
- __size: [::c_char; 32],
- #[cfg(not(feature = "align"))]
- __align: [::c_long; 0],
- }
}
pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
@@ -261,7 +247,6 @@ pub const SYS_mknod: ::c_long = 4000 + 14;
pub const SYS_chmod: ::c_long = 4000 + 15;
pub const SYS_lchown: ::c_long = 4000 + 16;
pub const SYS_break: ::c_long = 4000 + 17;
-pub const SYS_unused18: ::c_long = 4000 + 18;
pub const SYS_lseek: ::c_long = 4000 + 19;
pub const SYS_getpid: ::c_long = 4000 + 20;
pub const SYS_mount: ::c_long = 4000 + 21;
@@ -271,7 +256,6 @@ pub const SYS_getuid: ::c_long = 4000 + 24;
pub const SYS_stime: ::c_long = 4000 + 25;
pub const SYS_ptrace: ::c_long = 4000 + 26;
pub const SYS_alarm: ::c_long = 4000 + 27;
-pub const SYS_unused28: ::c_long = 4000 + 28;
pub const SYS_pause: ::c_long = 4000 + 29;
pub const SYS_utime: ::c_long = 4000 + 30;
pub const SYS_stty: ::c_long = 4000 + 31;
@@ -302,7 +286,6 @@ pub const SYS_fcntl: ::c_long = 4000 + 55;
pub const SYS_mpx: ::c_long = 4000 + 56;
pub const SYS_setpgid: ::c_long = 4000 + 57;
pub const SYS_ulimit: ::c_long = 4000 + 58;
-pub const SYS_unused59: ::c_long = 4000 + 59;
pub const SYS_umask: ::c_long = 4000 + 60;
pub const SYS_chroot: ::c_long = 4000 + 61;
pub const SYS_ustat: ::c_long = 4000 + 62;
@@ -325,9 +308,7 @@ pub const SYS_gettimeofday: ::c_long = 4000 + 78;
pub const SYS_settimeofday: ::c_long = 4000 + 79;
pub const SYS_getgroups: ::c_long = 4000 + 80;
pub const SYS_setgroups: ::c_long = 4000 + 81;
-pub const SYS_reserved82: ::c_long = 4000 + 82;
pub const SYS_symlink: ::c_long = 4000 + 83;
-pub const SYS_unused84: ::c_long = 4000 + 84;
pub const SYS_readlink: ::c_long = 4000 + 85;
pub const SYS_uselib: ::c_long = 4000 + 86;
pub const SYS_swapon: ::c_long = 4000 + 87;
@@ -352,7 +333,6 @@ pub const SYS_getitimer: ::c_long = 4000 + 105;
pub const SYS_stat: ::c_long = 4000 + 106;
pub const SYS_lstat: ::c_long = 4000 + 107;
pub const SYS_fstat: ::c_long = 4000 + 108;
-pub const SYS_unused109: ::c_long = 4000 + 109;
pub const SYS_iopl: ::c_long = 4000 + 110;
pub const SYS_vhangup: ::c_long = 4000 + 111;
pub const SYS_idle: ::c_long = 4000 + 112;
@@ -393,7 +373,6 @@ pub const SYS_writev: ::c_long = 4000 + 146;
pub const SYS_cacheflush: ::c_long = 4000 + 147;
pub const SYS_cachectl: ::c_long = 4000 + 148;
pub const SYS_sysmips: ::c_long = 4000 + 149;
-pub const SYS_unused150: ::c_long = 4000 + 150;
pub const SYS_getsid: ::c_long = 4000 + 151;
pub const SYS_fdatasync: ::c_long = 4000 + 152;
pub const SYS__sysctl: ::c_long = 4000 + 153;
@@ -464,7 +443,6 @@ pub const SYS_mincore: ::c_long = 4000 + 217;
pub const SYS_madvise: ::c_long = 4000 + 218;
pub const SYS_getdents64: ::c_long = 4000 + 219;
pub const SYS_fcntl64: ::c_long = 4000 + 220;
-pub const SYS_reserved221: ::c_long = 4000 + 221;
pub const SYS_gettid: ::c_long = 4000 + 222;
pub const SYS_readahead: ::c_long = 4000 + 223;
pub const SYS_setxattr: ::c_long = 4000 + 224;
@@ -624,7 +602,7 @@ extern {
sz: ::c_int) -> ::c_int;
pub fn glob64(pattern: *const ::c_char,
flags: ::c_int,
- errfunc: ::dox::Option<extern fn(epath: *const ::c_char,
+ errfunc: ::Option<extern fn(epath: *const ::c_char,
errno: ::c_int)
-> ::c_int>,
pglob: *mut glob64_t) -> ::c_int;
@@ -637,3 +615,13 @@ extern {
cpusetsize: ::size_t,
cpuset: *const ::cpu_set_t) -> ::c_int;
}
+
+cfg_if! {
+ if #[cfg(libc_align)] {
+ mod align;
+ pub use self::align::*;
+ } else {
+ mod no_align;
+ pub use self::no_align::*;
+ }
+}
diff --git a/libc/src/unix/uclibc/mips/mips32/no_align.rs b/libc/src/unix/uclibc/mips/mips32/no_align.rs
new file mode 100644
index 0000000..e32bf67
--- /dev/null
+++ b/libc/src/unix/uclibc/mips/mips32/no_align.rs
@@ -0,0 +1,10 @@
+s! {
+ // FIXME this is actually a union
+ pub struct sem_t {
+ #[cfg(target_pointer_width = "32")]
+ __size: [::c_char; 16],
+ #[cfg(target_pointer_width = "64")]
+ __size: [::c_char; 32],
+ __align: [::c_long; 0],
+ }
+}
diff --git a/libc/src/unix/uclibc/mips/mips64/align.rs b/libc/src/unix/uclibc/mips/mips64/align.rs
new file mode 100644
index 0000000..21e2190
--- /dev/null
+++ b/libc/src/unix/uclibc/mips/mips64/align.rs
@@ -0,0 +1,10 @@
+s! {
+ // FIXME this is actually a union
+ #[cfg_attr(target_pointer_width = "32",
+ repr(align(4)))]
+ #[cfg_attr(target_pointer_width = "64",
+ repr(align(8)))]
+ pub struct sem_t {
+ __size: [::c_char; 32],
+ }
+}
diff --git a/libc/src/unix/uclibc/mips/mips64.rs b/libc/src/unix/uclibc/mips/mips64/mod.rs
index e35938b..d80762e 100644
--- a/libc/src/unix/uclibc/mips/mips64.rs
+++ b/libc/src/unix/uclibc/mips/mips64/mod.rs
@@ -186,17 +186,6 @@ s! {
pub mem_unit: ::c_uint,
pub _f: [::c_char; 0],
}
-
- // FIXME this is actually a union
- #[cfg_attr(all(feature = "align", target_pointer_width = "32"),
- repr(align(4)))]
- #[cfg_attr(all(feature = "align", target_pointer_width = "64"),
- repr(align(8)))]
- pub struct sem_t {
- __size: [::c_char; 32],
- #[cfg(not(feature = "align"))]
- __align: [::c_long; 0],
- }
}
pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
@@ -212,3 +201,13 @@ pub const SYS_gettid: ::c_long = 5178; // Valid for n64
extern {
pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
}
+
+cfg_if! {
+ if #[cfg(libc_align)] {
+ mod align;
+ pub use self::align::*;
+ } else {
+ mod no_align;
+ pub use self::no_align::*;
+ }
+}
diff --git a/libc/src/unix/uclibc/mips/mips64/no_align.rs b/libc/src/unix/uclibc/mips/mips64/no_align.rs
new file mode 100644
index 0000000..ee57ea8
--- /dev/null
+++ b/libc/src/unix/uclibc/mips/mips64/no_align.rs
@@ -0,0 +1,8 @@
+s! {
+ // FIXME this is actually a union
+ pub struct sem_t {
+ __size: [::c_char; 32],
+ __align: [::c_long; 0],
+ }
+}
+