use only __linux__

This commit is contained in:
lizzie 2026-06-01 19:37:41 +00:00 • committed by crueter
parent 48945f7082
commit 2a2bf05e41
4 changed files with 12 additions and 10 deletions

View file

@ -5,6 +5,8 @@
# tools/../
ROOTDIR=$(CDPATH='' cd -- "$(dirname -- "$0")/../" && pwd)
BUILD_DIR="$ROOTDIR"/build
SRC_DIR="$ROOTDIR"/src
die() {
echo "-- $*" >&2
@ -31,14 +33,14 @@ EOF
while :; do
case "$1" in
once)
find "$ROOTDIR/src" -type f -name "*.h" -exec grep -L "#pragma once" {} +
find "$SRC_DIR" -type f -name "*.h" -exec grep -L "#pragma once" {} +
break
;;
osdef)
find "$ROOTDIR/src" -type f -name "*.h" -exec grep -nw "ANDROID" {} +
find "$ROOTDIR/src" -type f -name "*.h" -exec grep -nw "_WIN64" {} +
find "$ROOTDIR/src" -type f -name "*.h" -exec grep -nw "__linux" {} +
find "$ROOTDIR/src" -type f -name "*.h" -exec grep -nw "__unix" {} +
find "$SRC_DIR" -type f -name "*.h" \
-exec grep -nw "ANDROID\|_WIN64\|__linux\|__unix\|APPLE\|__APPLE" {} + || echo
find "$SRC_DIR" -type f -name "*.h" -exec grep -nw "ifdef linux\|(linux)" {} + || echo
find "$SRC_DIR" -type f -name "*.h" -exec grep -nw "ifdef unix\|(unix)" {} + || echo
break
;;
*) usage ;;