aboutsummaryrefslogtreecommitdiff
path: root/libc/src/cloudabi/mod.rs
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/cloudabi/mod.rs
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/cloudabi/mod.rs')
-rw-r--r--libc/src/cloudabi/mod.rs20
1 files changed, 15 insertions, 5 deletions
diff --git a/libc/src/cloudabi/mod.rs b/libc/src/cloudabi/mod.rs
index df11de0..8191967 100644
--- a/libc/src/cloudabi/mod.rs
+++ b/libc/src/cloudabi/mod.rs
@@ -1,5 +1,3 @@
-use dox::Option;
-
pub type int8_t = i8;
pub type int16_t = i16;
pub type int32_t = i32;
@@ -122,8 +120,18 @@ pub const PTHREAD_STACK_MIN: ::size_t = 1024;
pub const SOCK_DGRAM: ::c_int = 128;
pub const SOCK_STREAM: ::c_int = 130;
+#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum FILE {}
+impl ::Copy for FILE {}
+impl ::Clone for FILE {
+ fn clone(&self) -> FILE { *self }
+}
+#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum fpos_t {} // TODO: fill this out with a struct
+impl ::Copy for fpos_t {}
+impl ::Clone for fpos_t {
+ fn clone(&self) -> fpos_t { *self }
+}
extern {
pub fn isalnum(c: c_int) -> c_int;
@@ -271,7 +279,7 @@ extern {
) -> ::c_int;
pub fn pthread_key_create(
key: *mut pthread_key_t,
- dtor: Option<unsafe extern fn(*mut ::c_void)>,
+ dtor: ::Option<unsafe extern fn(*mut ::c_void)>,
) -> ::c_int;
pub fn pthread_key_delete(key: pthread_key_t) -> ::c_int;
pub fn pthread_setspecific(
@@ -306,13 +314,15 @@ cfg_if! {
}
cfg_if! {
- if #[cfg(core_cvoid)] {
- pub use core::ffi::c_void;
+ if #[cfg(libc_core_cvoid)] {
+ pub use ::ffi::c_void;
} else {
// Use repr(u8) as LLVM expects `void*` to be the same as `i8*` to help
// enable more optimization opportunities around it recognizing things
// like malloc/free.
#[repr(u8)]
+ #[allow(missing_copy_implementations)]
+ #[allow(missing_debug_implementations)]
pub enum c_void {
// Two dummy variants so the #[repr] attribute can be used.
#[doc(hidden)]