A few pedantic C compilers get upset at the use of void* as a bucket to hold an arbitrary cell, even though this is often the only way to do something *and* the programmer indicated his intent with an explict castOkay. Tho, in these cases you're casting a 64-bit pointer to and from a 32-bit unsigned int. So, it's not wrong to warn about it.
Actually, it is wrong to warn; at least if you believe K&R. The whole point of explicit casting is to tell the compiler not to warn about "unsafe" casts; and there's substantial text (and precedent) about how an "unsafe" cast is done. Every compiler which gives these warnings ends up generating the correct code anyway.
Unfortunately, some people who make a programming mistake blame the compiler for not warning them the way a Pascal compiler would. Or, there are compiler authors who see the function pointer casts extension (K.5.7 in the old copy of the C specification that I have) as meaning that the compiler is obliged to issue a warning when it is used.
But, you could have each OS define what it's socklen type is, like you do with a few other config things in the Makefile. Or is that just opening a larger can of worms than you're comfortable with (despite, IMO, doing much that already for other things)?
In general, I follow the path of least resistance. There's a great many ports in c-client which I would like to retire, but dare not even though it's been many years since I could actually test c-client on such a system. After all these years, you'd think that ANSI C compilers and POSIX compliance would be universal...until you discover that someone's using system which still is in the pre-ANSI, pre-POSIX world.
As a result, I'm loathe to do something which requires a new definition added in all ports; instead, I do what is necessary to coerce the oddball that doesn't fit into fitting. It's the "don't fix what isn't broken" syndrome.
Autoconf helps in some cases but not in others. I have literally spent hours in fighting autoconf when it does the wrong thing for a particular platform. With c-client the way it is now, it's relatively easy to add an oddball and get it to work without affecting anything else. I have had little success doing the same with autoconf.
Of course, that's just me. Lots of people use autoconf and are happy with it. But they generally don't need to worry about oddball systems.
Anyway, if you can suggest something that can be done at the osdep level, I'll be very interested. Currently, the same osdep file is used for all versions of BSD/i386, OpenBSD, and NetBSD. Obviously, it would easiest if we could do something that applies to all of these.
-- Mark --
http://staff.washington.edu/mrc Science does not emerge from voting, party politics, or public debate. Si vis pacem, para bellum.
