Skip to content

Commit

Permalink
Fixed style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Hoogervorst committed Nov 15, 2024
1 parent a393299 commit 7aeabc9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
)]
#![cfg_attr(libc_deny_warnings, deny(warnings))]
// Attributes needed when building as part of the standard library
#![allow(internal_features)]
#![cfg_attr(feature = "rustc-dep-of-std", feature(link_cfg, no_core))]
// Enable extra lints:
#![cfg_attr(feature = "extra_traits", deny(missing_debug_implementations))]
Expand Down
16 changes: 7 additions & 9 deletions src/vxworks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,13 @@ pub const F_GETLK: ::c_int = 7;
pub const F_SETLK: ::c_int = 8;
pub const F_SETLKW: ::c_int = 9;
pub const F_DUPFD_CLOEXEC: ::c_int = 14;
pub const F_RDLCK: ::c_int = 1;
pub const F_WRLCK: ::c_int = 2;
pub const F_UNLCK: ::c_int = 3;
pub const LOCK_SH: ::c_int = 1;
pub const LOCK_EX: ::c_int = 2;
pub const LOCK_NB: ::c_int = 4;
pub const LOCK_UN: ::c_int = 8;

// signal.h
pub const SIG_DFL: sighandler_t = 0 as sighandler_t;
Expand Down Expand Up @@ -2022,15 +2029,6 @@ pub unsafe fn posix_memalign(
}
}

pub const LOCK_SH: ::c_int = 1;
pub const LOCK_EX: ::c_int = 2;
pub const LOCK_NB: ::c_int = 4;
pub const LOCK_UN: ::c_int = 8;

pub const F_RDLCK: ::c_int = 1;
pub const F_WRLCK: ::c_int = 2;
pub const F_UNLCK: ::c_int = 3;

pub unsafe fn flock(fd: ::c_int, operation: ::c_int) -> ::c_int {
let lock_type = match operation & !LOCK_NB {
LOCK_SH => F_RDLCK,
Expand Down

0 comments on commit 7aeabc9

Please sign in to comment.