RE: size of size_t (diff angle)

2020-02-27 Thread zeurkous
Haai, "Claudio Jeker" wrote: >>> Now if SIZE_MAX is the highest address is a different thing. >>> On OpenBSD 0..SIZE_MAX will cover the address room (in most cases >>> it covers actually more then what is possible). The highest valid >>> address is in most cases less than SIZE_MAX. >> >> Yes, the

Re: size of size_t (diff angle)

2020-02-27 Thread Claudio Jeker
On Thu, Feb 27, 2020 at 02:07:36PM +0100, zeurk...@volny.cz wrote: > Haai, > > "Claudio Jeker" wrote: > > This has not much to do with OpenBSD. > > On the contrary: these issues touch the fundaments of UNIX programming. > > > As for OpenBSD, it only runs on two types of machines: ILP32 and I32L

RE: size of size_t (diff angle)

2020-02-27 Thread zeurkous
Haai, "Claudio Jeker" wrote: > This has not much to do with OpenBSD. On the contrary: these issues touch the fundaments of UNIX programming. > As for OpenBSD, it only runs on two types of machines: ILP32 and I32LP64. > Any other type of machine that is not covered by these two types will > not

Re: size of size_t (diff angle)

2020-02-27 Thread Claudio Jeker
This has not much to do with OpenBSD. As for OpenBSD, it only runs on two types of machines: ILP32 and I32LP64. Any other type of machine that is not covered by these two types will not run OpenBSD. In both cases size_t is defined as unsigned long which is the same as uintptr_t and the same size a

RE: size of size_t (diff angle)

2020-02-26 Thread zeurkous
Haai, "Marc Espie" wrote: >>> You're looking at the wrong type. size_t is very good for what it does. >> >> Yes; meproblem is with the 'what it does' part. > > It represents memory sizes. It works on anything with a sane > memory model. The way meunderstands it, it's just an offset, plain and si

Re: size of size_t (diff angle)

2020-02-26 Thread Marc Espie
On Wed, Feb 26, 2020 at 11:01:56PM +0100, zeurk...@volny.cz wrote: > Haai, > > "Marc Espie" wrote: > > On Tue, Feb 25, 2020 at 08:56:06AM +0100, zeurk...@volny.cz wrote: > > > > You're looking at the wrong type. size_t is very good for what it does. > > Yes; meproblem is with the 'what it does'

RE: size of size_t (diff angle)

2020-02-26 Thread zeurkous
Haai, "Marc Espie" wrote: > On Tue, Feb 25, 2020 at 08:56:06AM +0100, zeurk...@volny.cz wrote: > > You're looking at the wrong type. size_t is very good for what it does. Yes; meproblem is with the 'what it does' part. > Try uintptr_t Are you proposing a change to struct iovec? --zeur

RE: size of size_t (diff angle)

2020-02-26 Thread zeurkous
Haai, "Anders Andersson" wrote: > On Tue, Feb 25, 2020 at 12:14 PM wrote: >> >> First of all, let us reflect upon the definition of size_t in C99. >> >> > size_t >> > which is the unsigned integer type of the result of the sizeof >> > operator; >> >> That's not very specific. It kind-of implies

Re: size of size_t (diff angle)

2020-02-26 Thread Marc Espie
On Tue, Feb 25, 2020 at 08:56:06AM +0100, zeurk...@volny.cz wrote: > Haai, > > The definition of size_t keeps biting me. > > Some background: in nnx, me's been using the equiv of caddr_t for > counts. This works well; yet, while writing against existing code that > uses size_t, an issue has surfa

Re: size of size_t (diff angle)

2020-02-25 Thread Anders Andersson
On Tue, Feb 25, 2020 at 12:14 PM wrote: > > Haai, > > The definition of size_t keeps biting me. > > Some background: in nnx, me's been using the equiv of caddr_t for > counts. This works well; yet, while writing against existing code that > uses size_t, an issue has surfaced. > > First of all, let

size of size_t (diff angle)

2020-02-25 Thread zeurkous
Haai, The definition of size_t keeps biting me. Some background: in nnx, me's been using the equiv of caddr_t for counts. This works well; yet, while writing against existing code that uses size_t, an issue has surfaced. First of all, let us reflect upon the definition of size_t in C99. >