libxbps: implement xbps_file_exec() with posix_spawn().

This commit is contained in:
Juan RP
2012-05-30 14:45:47 +02:00
parent c93d1637ae
commit 5aa05f4c72
9 changed files with 138 additions and 182 deletions

22
configure vendored
View File

@@ -305,6 +305,28 @@ if [ -n "$BUILD_PIE" ]; then
fi
fi
#
# Check for posix_spawn (required).
#
func=posix_spawn
printf "Checking for $func() ... "
cat <<EOF > _$func.c
#include <stdio.h>
#include <spawn.h>
int main(void) {
posix_spawn(NULL, NULL, NULL, NULL, NULL, NULL);
return 0;
}
EOF
if $XCC _${func}.c -o _${func} 2>/dev/null; then
rm -f _$func.c _$func
echo "yes."
else
echo "not found! $func is required by xbps, exiting..."
rm -f _$func.c _$func
exit 1
fi
#
# Check for vasprintf().
#