On 7 Aug 2001, Jeff Trawick wrote: > yes, int is better than apr_size_t > > actually, I suspect apr_socklen_t is best overall, in case socklen_t > is not int on some system? (apr_socklen_t is socklen_t if the system > defines it, int otherwise) ... > I would vote for apr_socklen_t, but I doubt it would compile without > warning everywhere (int won't either).
apr_socklen_t seems to work all around (tested on Sol 2.6, RHL7.1, FreeBSD 4.3, visually inspected on msdn for win32). But you know what? I'm an idiot and just plain can't count... it was never the len parameter that was giving me trouble on Solaris 2.6 in the first place... it was the error parameter, which is currently an int getting passed in as an int* (assuming the function expects void*). For some funky ass reason, Solaris 2.6 ifndef _XPG4_2 (and apparently Win32 as well, if msdn.microsoft.com is correct) expect it to be a char*! Obviously, you can't convert an int* to a char* without a cast, so the warning is perfectly valid. Casting it to (char *), while ugly, seems to fix the problem on all the platforms I can test. If there's any platform out there that expects something other than char* or void*, they can just deal. =-) --Cliff -------------------------------------------------------------- Cliff Woolley [EMAIL PROTECTED] Charlottesville, VA
