Skip to content
Snippets Groups Projects
Verified Commit 40d01d9d authored by jD91mZM2's avatar jD91mZM2
Browse files

Convert printf internals to iterator

parent c2c8806f
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env bash
SUPRESS_ALL_THE_ERRORS=yes
set -e
include="$(realpath "$1")"
......@@ -7,6 +9,10 @@ include="$(realpath "$1")"
cargo build --release --manifest-path cbindgen/Cargo.toml
cbindgen="$(realpath target/release/cbindgen)"
if [ "$SUPRESS_ALL_THE_ERRORS" = "yes" ]; then
echo -e "\e[91mNote: Warnings by cbindgen are suppressed in include.sh.\e[0m"
fi
jobs=()
for config in src/header/*/cbindgen.toml
do
......@@ -15,10 +21,16 @@ do
if [ "${name:0:1}" != "_" ]
then
header="$include/${name/_//}.h"
pushd "$dir"
"$cbindgen" -c cbindgen.toml -o "$header" mod.rs &
pushd "$dir" > /dev/null
echo "$dir"
cbindgen_cmd='"$cbindgen" -c cbindgen.toml -o "$header" mod.rs'
if [ "$SUPRESS_ALL_THE_ERRORS" = "yes" ]; then
eval "$cbindgen_cmd" 2>&1 | (grep "^ERROR" -A 3 || true) &
else
eval "$cbindgen_cmd" &
fi
jobs+=($!)
popd
popd > /dev/null
fi
done
......
This diff is collapsed.
......@@ -151,8 +151,6 @@ impl Pal for Sys {
mut argv: *const *mut c_char,
mut envp: *const *mut c_char,
) -> c_int {
use alloc::vec::Vec;
let mut file = match File::open(path, fcntl::O_RDONLY | fcntl::O_CLOEXEC) {
Ok(file) => file,
Err(_) => return -1,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment