diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2016-12-31 10:03:09 -0800 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2016-12-31 10:06:40 -0800 |
commit | cca27e95cf2bf057b2bbea93702135da3ca7be45 (patch) | |
tree | 10eac4a38123691dfcfaf6026a7d32a702f9067e /zconf.h | |
parent | b7fbee215674c3399212dffba1e71323056931d9 (diff) | |
download | zlib-cca27e95cf2bf057b2bbea93702135da3ca7be45.tar.gz zlib-cca27e95cf2bf057b2bbea93702135da3ca7be45.tar.bz2 zlib-cca27e95cf2bf057b2bbea93702135da3ca7be45.zip |
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 'zconf.h')
-rw-r--r-- | zconf.h | 11 |
1 files changed, 0 insertions, 11 deletions
@@ -237,17 +237,6 @@ | |||
237 | # include <stddef.h> | 237 | # include <stddef.h> |
238 | typedef size_t z_size_t; | 238 | typedef size_t z_size_t; |
239 | # endif | 239 | # endif |
240 | # ifdef NO_SSIZE_T | ||
241 | typedef NO_SSIZE_T z_ssize_t; | ||
242 | # else | ||
243 | # include <stddef.h> | ||
244 | # include <sys/types.h> | ||
245 | # ifdef _MSC_VER | ||
246 | typedef intptr_t z_ssize_t; | ||
247 | # else | ||
248 | typedef ssize_t z_ssize_t; | ||
249 | # endif | ||
250 | # endif | ||
251 | # undef z_longlong | 240 | # undef z_longlong |
252 | #endif | 241 | #endif |
253 | 242 | ||