[Imap-uw] Compile problems imap-2007d

Mark Crispin markrcrispin at panda.com
Fri Dec 19 19:07:59 PST 2008


Simple answer:

If you don't have socklen_t, the getsockname() function can take an int*,
long*, or size_t* depending upon system. The problem is that assuming any
of these three will cause a compile error if the system uses one of the
other two definitions and the two definitions don't both resolve down to
int32.

In an attempt to work around this problem, the old code cast to a void*.
That worked for a long time, but broke on some 64-bit platforms.

When this happened, I got called all sorts of names for not using
socklen_t since "nobody uses a system that doesn't have socklen_t any
more". So I changed it.

So it seems that someone still uses an old system that doesn't have
socklen_t.

Like the laws of thermodynamics: can't win, can't break even, can't exit
the game... ;-)

On Fri, 19 Dec 2008, Neil Dickey wrote:

> Thanks, Oscar. I just found a copy of imap-2004g and it compiled fine, so

> you may be right. It seems odd that there wouldn't be something to indicate

> this in the FAQ, though, especially when there's such a good deal written

> there about the need for backwards compatibility. The header "What do I

> need to build this software with SSL on unix?" says only that one needs to

> compile and install OpenSSL first. There's no hint there or anywhere that

> some versions of unix are apparently no longer ported.


-- Mark --

http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.


More information about the Imap-uw mailing list