(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
Please register or sign in to comment