pcp
[Top] [All Lists]

Win32 error code issue heads up

To: pcp <pcp@xxxxxxxxxxx>
Subject: Win32 error code issue heads up
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Wed, 16 Feb 2011 10:22:45 +1100 (EST)
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

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.

Thoughts?

cheers.


-- 
Nathan

<Prev in Thread] Current Thread [Next in Thread>