On Wed, 2011-02-16 at 10:22 +1100, Nathan Scott wrote:
> Hi all,
>
> We have a problem with error reporting in the native Win32
> port of PCP. The problem is described in detail here:
> http://msdn.microsoft.com/en-us/library/ms737828%28v=vs.85%29.aspx
> ... but basically, for socket and getXbyY functions, neither
> errno nor h_errno are set on failure and we need to be looking
> elsewhere.
>
> My plan of attack atm is to do a pass over all the code and
> do an audit/conversion of all open-coded uses of errno (and
> friends), as per this matrix:
>
> Macro Unix Win32
> - oserror() errno and strerror vs GetLastError and strerror
> - neterror() errno and strerror vs WSAGetLastError and strerror
> - hosterror() hstrerror and h_errno vs WSAGetLastError and strerror
>
Seems reasonable ... will also help with the thread-safe work where
exposed errno or h_errno is a recipe for badness.
> This will likely conflict with your 4.0 patches Ken (this is
> bug fix stuff, we'll need it in the 3.x stable branch in the
> relatively short term) ... I don't think there's any way to
> dodge that bullet though.
No problem.
I'm regularly pulling dev branch fixes from the official oss tree into
my tree and then merging into the pcp4 branch, so I'll resolve any
conflicts as I'm going.
|