Compare commits
No commits in common. "71d4d6ba05ee79f38ec7a3779a0e5579159b567a" and "e2c03842a30a8a338131e7952cf5287d6588a640" have entirely different histories.
71d4d6ba05
...
e2c03842a3
@ -39,7 +39,7 @@ fn main() {
|
||||
let mut d = '\u{1E}'.to_string(); /* ASCII record separator */
|
||||
let mut optind = 1;
|
||||
|
||||
#[cfg(target_os="openbsd")] {
|
||||
if cfg!(target_os="openbsd") {
|
||||
let promises = Promises::new("stdio proc exec");
|
||||
if let Err(e) = pledge(Some(promises), None) {
|
||||
eprintln!("{}: {}", argv[0], e.strerror());
|
||||
|
@ -86,7 +86,7 @@ fn main() -> ExitCode {
|
||||
return ExitCode::from(EX_USAGE as u8);
|
||||
}
|
||||
|
||||
#[cfg(target_os="openbsd")] {
|
||||
if cfg!(target_os="openbsd") {
|
||||
let promises = Promises::new("stdio");
|
||||
if let Err(e) = pledge(Some(promises), None) {
|
||||
eprintln!("{}: {}", argv[0], e.strerror());
|
||||
|
@ -42,7 +42,7 @@ fn usage(s: &str) -> ExitCode {
|
||||
fn main() -> ExitCode {
|
||||
let argv = args().collect::<Vec<String>>();
|
||||
|
||||
#[cfg(target_os="openbsd")] {
|
||||
if cfg!(target_os="openbsd") {
|
||||
let promises = Promises::new("stdio");
|
||||
if let Err(e) = pledge(Some(promises), None) {
|
||||
eprintln!("{}: {}", argv[0], e.strerror());
|
||||
|
@ -51,7 +51,7 @@ fn main() -> ExitCode {
|
||||
let argv = args().collect::<Vec<_>>();
|
||||
let usage = format!("Usage: {} [-aetu] [-i input] [-o output]", argv[0]);
|
||||
|
||||
#[cfg(target_os="openbsd")] {
|
||||
if cfg!(target_os="openbsd") {
|
||||
let promises = Promises::new("rpath stdio unveil");
|
||||
if let Err(e) = pledge(Some(promises), None) {
|
||||
eprintln!("{}: {}", argv[0], e.strerror());
|
||||
@ -77,7 +77,7 @@ fn main() -> ExitCode {
|
||||
Ok("i") => { /* add inputs */
|
||||
let input = opt.arg().unwrap();
|
||||
|
||||
#[cfg(target_os="openbsd")] {
|
||||
if cfg!(target_os="openbsd") {
|
||||
let perms = UnveilPerms::new(vec!['r']);
|
||||
if let Err(e) = unveil(Some(&input), Some(perms)) {
|
||||
eprintln!("{}: {}", argv[0], e.strerror());
|
||||
@ -91,7 +91,7 @@ fn main() -> ExitCode {
|
||||
Ok("o") => { /* add output */
|
||||
let output = opt.arg().unwrap();
|
||||
|
||||
#[cfg(target_os="openbsd")] {
|
||||
if cfg!(target_os="openbsd") {
|
||||
let perms = UnveilPerms::new(vec!['w', 'c']);
|
||||
if let Err(e) = unveil(Some(&output), Some(perms)) {
|
||||
eprintln!("{}: {}", argv[0], e.strerror());
|
||||
@ -124,7 +124,7 @@ fn main() -> ExitCode {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os="openbsd")] {
|
||||
if cfg!(target_os="openbsd") {
|
||||
if let Err(e) = unveil(None, None) {
|
||||
eprintln!("{}: {}", argv[0], e.strerror());
|
||||
return ExitCode::from(EX_OSERR as u8);
|
||||
|
@ -198,7 +198,7 @@ fn round_precise(value: &f64, precision: usize) -> f64 {
|
||||
fn main() -> ExitCode {
|
||||
let argv = args().collect::<Vec<String>>();
|
||||
|
||||
#[cfg(target_os="openbsd")] {
|
||||
if cfg!(target_os="openbsd") {
|
||||
let promises = Promises::new("stdio");
|
||||
if let Err(e) = pledge(Some(promises), None) {
|
||||
eprintln!("{}: {}", argv[0], e.strerror());
|
||||
|
@ -54,7 +54,7 @@ fn usage(s: &str) -> ExitCode {
|
||||
fn main() -> ExitCode {
|
||||
let argv = args().collect::<Vec<String>>();
|
||||
|
||||
#[cfg(target_os="openbsd")] {
|
||||
if cfg!(target_os="openbsd") {
|
||||
let promises = Promises::new("stdio");
|
||||
if let Err(e) = pledge(Some(promises), None) {
|
||||
return oserr(&argv[0], e);
|
||||
|
@ -19,7 +19,7 @@ dj_tests: dj_help dj_full dj_null # dj_skip_stdin
|
||||
dj_full: $(BIN)/dj /dev/full
|
||||
case "$$(uname)" in \
|
||||
Linux) \
|
||||
! $(BIN)/dj -Hi /dev/zero -o /dev/full 2>&1 \
|
||||
$(BIN)/dj -Hi /dev/zero -o /dev/full 2>&1 \
|
||||
| tee /dev/stderr \
|
||||
| xargs -I out test '1+0 > 0+0; 1024 > 0' = out \
|
||||
;; \
|
||||
|
@ -30,7 +30,7 @@ rpn_mul: $(BIN)/rpn
|
||||
.PHONY: rpn_div
|
||||
rpn_div: $(BIN)/rpn
|
||||
test "$$($(BIN)/rpn 12 5 /)" = 2.4
|
||||
test "$$($(BIN)/rpn 3 0 /)" = inf
|
||||
test "$$($(BIN)/rpn 3 0 /)" -eq inf
|
||||
|
||||
.PHONY: rpn_mod
|
||||
rpn_mod: $(BIN)/rpn
|
||||
|
Loading…
Reference in New Issue
Block a user