summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2016-12-31 10:03:09 -0800
committerMark Adler <madler@alumni.caltech.edu>2016-12-31 10:06:40 -0800
commitcca27e95cf2bf057b2bbea93702135da3ca7be45 (patch)
tree10eac4a38123691dfcfaf6026a7d32a702f9067e /configure
parentb7fbee215674c3399212dffba1e71323056931d9 (diff)
downloadzlib-cca27e95cf2bf057b2bbea93702135da3ca7be45.tar.gz
Avoid the need for ssize_t.
Limit read() and write() requests to sizes that fit in an int. This allows storing the return value in an int, and avoiding the need to use or construct an ssize_t type. This is required for Microsoft C, whose _read and _write functions take an unsigned request and return an int.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure22
1 files changed, 1 insertions, 21 deletions
diff --git a/configure b/configure
index e0c07b7..e974d1f 100755
--- a/configure
+++ b/configure
@@ -465,23 +465,8 @@ fi
echo >> configure.log
-# check for ssize_t
-cat > $test.c <<EOF
-#include <sys/types.h>
-ssize_t dummy = 0;
-EOF
-if try $CC -c $CFLAGS $test.c; then
- echo "Checking for ssize_t... Yes." | tee -a configure.log
- need_ssizet=0
-else
- echo "Checking for ssize_t... No." | tee -a configure.log
- need_ssizet=1
-fi
-
-echo >> configure.log
-
# find the size_t integer type, if needed
-if test $need_sizet -eq 1 -o $need_ssizet -eq 1; then
+if test $need_sizet -eq 1; then
cat > $test.c <<EOF
long long dummy = 0;
EOF
@@ -521,11 +506,6 @@ if test $need_sizet -eq 1; then
SFLAGS="${SFLAGS} -DNO_SIZE_T=${sizet}"
fi
-if test $need_ssizet -eq 1; then
- CFLAGS="${CFLAGS} -DNO_SSIZE_T=${sizet}"
- SFLAGS="${SFLAGS} -DNO_SSIZE_T=${sizet}"
-fi
-
echo >> configure.log
# check for large file support, and if none, check for fseeko()