From 0c4923016e72cc534a01e0a21376c20d8994ed0b Mon Sep 17 00:00:00 2001 From: DTB Date: Tue, 13 Aug 2024 11:56:09 -0600 Subject: [PATCH 1/3] Makefile: replace include/None.mk with /dev/null --- Makefile | 2 +- include/None.mk | 0 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 include/None.mk diff --git a/Makefile b/Makefile index 1bdd5c9..5de9618 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ PREFIX ?= /usr/local # for conditionally compiling OS features OS != uname OS_INCLUDE != test -e include/$(OS).mk && printf 'include/$(OS).mk\n' \ - || include/None.mk + || printf '/dev/null\n' # normalized prefix PREFIX_N != dirname $(PREFIX)/. diff --git a/include/None.mk b/include/None.mk deleted file mode 100644 index e69de29..0000000 -- 2.46.1 From 0fd66bff38bbb792eaaf2206e7048200cbcfd203 Mon Sep 17 00:00:00 2001 From: DTB Date: Tue, 13 Aug 2024 12:04:42 -0600 Subject: [PATCH 2/3] false(1), true(1): complete main prototype --- src/false.c | 5 +++-- src/true.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/false.c b/src/false.c index 1617b03..555a170 100644 --- a/src/false.c +++ b/src/false.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2023–2024 Emma Tebibyte + * Copyright (c) 2024 DTB * SPDX-License-Identifier: CC0 * * This work is marked with CC0 1.0. To view a copy of this license, visit @@ -10,9 +11,9 @@ # include /* pledge(2) */ #endif -int main() { +int main(void) { #ifdef __OpenBSD__ pledge(NULL, NULL); #endif -return 1; + return 1; } diff --git a/src/true.c b/src/true.c index eb16efd..0e2f91d 100644 --- a/src/true.c +++ b/src/true.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2023–2024 Emma Tebibyte + * Copyright (c) 2024 DTB * SPDX-License-Identifier: CC0 * * This work is marked with CC0 1.0. To view a copy of this license, visit @@ -10,7 +11,7 @@ # include /* pledge(2) */ #endif -int main() { +int main(void) { #ifdef __OpenBSD__ pledge(NULL, NULL); #endif -- 2.46.1 From e2c03842a30a8a338131e7952cf5287d6588a640 Mon Sep 17 00:00:00 2001 From: DTB Date: Tue, 13 Aug 2024 12:13:47 -0600 Subject: [PATCH 3/3] intcmp(1): remove extra newline --- src/intcmp.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/intcmp.rs b/src/intcmp.rs index b304ac0..a7c045d 100644 --- a/src/intcmp.rs +++ b/src/intcmp.rs @@ -34,7 +34,6 @@ use sysexits::EX_USAGE; #[cfg(target_os="openbsd")] use openbsd::{ Promises, pledge }; #[cfg(target_os="openbsd")] use strerror::StrError; - fn usage(s: &str) -> ExitCode { eprintln!("Usage: {} [-egl] integer integer...", s); ExitCode::from(EX_USAGE as u8) -- 2.46.1