Fix MacOS and POSIX semaphores related issues

Recently got a MacBook Pro and decided to check how things build on
MacOS. Discovered that POSIX unnamed semaphores weren't implemented, so
I reimplemented them with conditional variable and mutex.

Additionally, fixed scripts and CMake on MacOS
This commit is contained in:
2025-04-25 22:38:33 +03:00
parent 27ad496ca6
commit 48ddd91dd4
6 changed files with 189 additions and 21 deletions

View File

@@ -12,6 +12,8 @@ if [ ! -f $1 ]; then
exit 1
fi
echo "Checking file" $1
# Message about trailing space before EOL
eolerrors=$(grep -n "\s$" "$1" | cut -f1 -d: | while read -r line; do
@@ -22,7 +24,7 @@ done)
# Message about non-empty last-line
linecount=$(($(wc -l "$1" | cut -f1 -d " ") + 1))
linecount=$(($(wc -l "$1" | xargs | cut -f1 -d " ") + 1))
lastline=$(tail -n "+$linecount" $1)
llerrors=$(if [ "$lastline" ]; then