Skip to content
Commit 4cd343c4 authored by Eugene Kim's avatar Eugene Kim
Browse files

(Re)define ssize_t as make_signed<size_t>

On macOS, the previous code chose int64_t as ssize_t, and int64_t is
defined as long long, but ssize_t had been defined as long (despite also
being 8 bytes).  This caused the typedef to be non-idempotent.

make_signed<size_t> chooses the right counterpart, depending on the base
type of size_t, e.g. unsigned long -> long, unsigned long long -> long
long, which is more robust when there are distinct base integer types
with the same size.
parent ae0c2fd8
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