On Mon, May 19, 2014 at 06:16:06PM -0400, Christos Zoulas wrote: > On May 19, 11:28pm, kle...@kleink.org (Klaus Klein) wrote: > -- Subject: Re: CVS commit: src/sys/arch > > | What's the purpose of this? ssize_t is meant to be "a count of > | bytes or an error indication", so having SSIZE_MIN doesn't make > | sense. Nor does its only in-tree, broken use in libevent; searching > | outside our tree I wasn't able to come up with a use of EV_SSIZE_MIN > | except for the aforementioned regression test. > > The purpose of this is to make it easier to query the range of the type. > (ssize_t)-1 would work too.
But having SSIZE_MIN at all is at odds with the scope of ssize_t (I've quoted the definition above). > | (I'll be the first to admit I'm somewhat late in voicing my concerns, > | but I was ... busy. *sigh*) > > Heh. It would have been easier if that was a bit sooner, so I could > remember the exact situation. From what I can remember, I searched for > it, I saw that others had it too (linux, etc.) so I decided to add it. I now see this change coincides with external/bsd/libevent/dist/include/event2/util.h rev. 1.2. Actually no: glibc as no such thing. Googling for it I've found several applications jumping through hoops to define some kind of SSIZE_MIN without ever using it afterwards. libevent's regression test might be its lone user. Since the netbsd-6 branch precedes this change I propose the timely removal of SSIZE_MIN and resurrection of a suitable version of the kludge libevent used before. (I doubt the removal of EV_SSIZE_MIN would cause much grief except for the regression test; I won't mind asking the libevent maintainers about that constant.) - Klaus