Commit 90ca9471 authored by Jonas Termansen's avatar Jonas Termansen

fixup! Initial libdeflate.

parent 01eea494
Pipeline #611739 skipped
...@@ -471,25 +471,8 @@ check() { ...@@ -471,25 +471,8 @@ check() {
fi fi
} }
test_c_compiler_works() {
cat > conftest.c << EOF
#include <stdio.h>
int main(void)
{
printf("Hello, World!\n");
return 0;
}
EOF
if ! check c_compile_link "whether $1 works" $2 $3 $4 $5 $6; then
rm -f conftest.c
echo "$0: error: the compiler doesn't work"
exit 1
fi
rm -f conftest.c
}
# #
# Locate the system compiler and check if it works. # Locate the system compiler.
# #
if [ -z "$CC" ]; then if [ -z "$CC" ]; then
...@@ -518,7 +501,30 @@ if [ -z "$LIBS" ]; then ...@@ -518,7 +501,30 @@ if [ -z "$LIBS" ]; then
LIBS="" LIBS=""
fi fi
test_c_compiler_works "compiler" "$CC" "$CFLAGS" "$CPPFLAGS" "$LDFLAGS" "$LIBS" #
# Check if the system compiler works.
#
cat > conftest.c << EOF
#include <stdio.h>
int main(void)
{
printf("Hello, World!\n");
return 0;
}
EOF
if ! check c_compile_link "whether compiler works" "$CC" "$CFLAGS" "$CPPFLAGS" "$LDFLAGS" "$LIBS"; then
rm -f conftest.c
echo "$0: error: the compiler doesn't work"
exit 1
fi
rm -f conftest.c
#
# Search for the library archiver.
#
if [ -z "$AR" ]; then if [ -z "$AR" ]; then
search_tool "library archiver" AR ar "${tool_prefix}" "cc-ar gcc-ar ar" search_tool "library archiver" AR ar "${tool_prefix}" "cc-ar gcc-ar ar"
...@@ -559,6 +565,8 @@ else ...@@ -559,6 +565,8 @@ else
check_end "unknown" check_end "unknown"
fi fi
rm -f conftest.c
# #
# Determine whether _FILE_OFFSET_BITS=64 would have a good effect. # Determine whether _FILE_OFFSET_BITS=64 would have a good effect.
# #
...@@ -667,7 +675,6 @@ else ...@@ -667,7 +675,6 @@ else
fi fi
rm -f conftest.c rm -f conftest.c
# #
# Decide which targets to build by default. # Decide which targets to build by default.
# #
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
// The zlib API has serious issues with using poor datatypes like unsigned int // The zlib API has serious issues with using poor datatypes like unsigned int
// and unsigned long instead of proper types like size_t. Unsigned long // and unsigned long instead of proper types like size_t. Unsigned long
// parameters are sometimes even truncated to unsigned int. There might well be // parameters are sometimes even truncated to unsigned int. There might be
// overflow issues on buffers near UINT_MAX. Until the codebase is audited and // overflow issues on buffers near UINT_MAX. Until the codebase is audited and
// we know for sure that UINT_MAX-sized buffers are safe, let's not go anywhere // we know for sure that UINT_MAX-sized buffers are safe, let's not go anywhere
// near that size. // near that size.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment