Re: size_t changes and 32/64-bit, kernel uio_resid type changed.
At 8:27 PM +0300 8/19/09, Jordan Gordeev wrote:
>Garance A Drosihn wrote:
>>At 9:49 PM -0700 8/18/09, Matthew Dillon wrote:
>>> size_t has been changed to unsigned long (and ssize_t to long). I may
>>> revert this prior to the release if we hit pkgsrc problems. The change
>>> will be kept for 64-bit machines.
>>>
>>> The change on 32 bit machines seems to do a pretty good job generating
>>> compiler warnings on 32-bit machines for code that will break on
>>> 64-bit machines. Because of this I think it is worth seeing how badly
>>> pkgsrc breaks with the change. If it breaks too much we will revert
>>> it on 32 bit machines.
>>
>>Isn't this explicitly wrong? Isn't ssize_t defined as holding all
>>valid values of size_t, *plus* some extra values which can be used
>>for error indications?
>>
>>To quote SUSv3:
>>
>> "The type ssize_t shall be capable of storing values at least
>> in the range [-1, {SSIZE_MAX}]"
>>
>>So are you defining SSIZE_MAX to be smaller than maximum-long?
>>
>You are mistaken.
>ssize_t is expected to be the same size as size_t.
>
>SSIZE_MAX in our case will equal LONG_MAX. What do you see as being
>wrong with that?
Ah, yeah, I see where I'm reading it wrong. Sorry for the noise.
--
Garance Alistair Drosehn = gad@gilead.netel.rpi.edu
Senior Systems Programmer or gad@freebsd.org
Rensselaer Polytechnic Institute or drosih@rpi.edu
討論串 (同標題文章)
完整討論串 (本文為第 5 之 10 篇):