1
0
Fork 0

Adding upstream version 3.1.0+dfsg.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-05 08:00:08 +01:00
parent 64dbec996d
commit cfcebb1a7d
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
569 changed files with 205393 additions and 0 deletions

44
compat/check_includes.sh Executable file
View file

@ -0,0 +1,44 @@
#!/usr/bin/env bash
RETVAL=0
# params - paths to the source files to search
SRC="$*"
# param FUNC - name of the function in compat to check
check_compat_func () {
FILES=`grep -rE "([^[:alnum:]]|^)$1\([^\)]+\)" --include=\*.{c,h} $SRC | cut -d: -f1 | uniq`
for f in $FILES; do
grep -q "#include \"compat.h\"" $f
if [ $? -ne 0 ]; then
echo "Missing #include \"compat.h\" in file $f for function $1()"
RETVAL=$((RETVAL+1))
fi
done
}
check_compat_macro () {
FILES=`grep -rE "([^[:alnum:]]|^)$1([^[:alnum:]]|$)" --include=\*.{c,h} $SRC | cut -d: -f1 | uniq`
for f in $FILES; do
grep -q "#include \"compat.h\"" $f
if [ $? -ne 0 ]; then
echo "Missing #include \"compat.h\" in file $f for macro $1"
RETVAL=$((RETVAL+1))
fi
done
}
check_compat_func vdprintf
check_compat_func asprintf
check_compat_func vasprintf
check_compat_func getline
check_compat_func strndup
check_compat_func strnstr
check_compat_func strdupa
check_compat_func strchrnul
check_compat_func get_current_dir_name
check_compat_func pthread_mutex_timedlock
check_compat_func UNUSED
check_compat_macro _PACKED
exit $RETVAL