diff options
author | Eric Blake <eblake@redhat.com> | 2016-07-13 14:35:43 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2016-07-14 12:38:49 -0600 |
commit | 6795ef7d3793ca3e8528a56e41d5322c57d58a3c (patch) | |
tree | c7e01c024932bd03378bb0113c209f57cc3e37ce /winsup/cygwin/release/2.0.3 | |
parent | 87076a3a83cbe146c968d3498f806eb8399ef16e (diff) | |
download | cygnal-6795ef7d3793ca3e8528a56e41d5322c57d58a3c.tar.gz cygnal-6795ef7d3793ca3e8528a56e41d5322c57d58a3c.tar.bz2 cygnal-6795ef7d3793ca3e8528a56e41d5322c57d58a3c.zip |
Fix 32-bit SSIZE_MAX
POSIX requires that SSIZE_MAX have the same type as ssize_t, but
on 32-bit, we were defining it as a long even though ssize_t
resolves to an int. It also requires that SSIZE_MAX be usable
via preprocessor #if, so we can't cheat and use a cast.
If this were newlib, I'd have had to hack _intsup.h to probe the
qualities of size_t (via gcc's __SIZE_TYPE__), similar to how we
already probe the qualities of int8_t and friends, then cross our
fingers that ssize_t happens to have the same rank (most systems
do, but POSIX permits a system where they differ such as size_t
being long while ssize_t is int). Unfortunately gcc gives us
neither __SSIZE_TYPE__ nor __SSIZE_MAX__. On the other hand, our
limits.h is specific to cygwin, so we can just shortcut to the
correct results rather than being generic to all possible ABI.
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'winsup/cygwin/release/2.0.3')
0 files changed, 0 insertions, 0 deletions