RE: [xml] Building on Win32



Hello.

I dispute your assertion that I corrected this wrongly.

Good ;-) I am happy whenever people give me the chance to revise what I
do.

First point.  The test reading
      #if defined(EAGAIN) && EAGAIN != EWOULDBLOCK
was taken from elsewhere in the same file.  EAGAIN is a SYSVish error
code whereas EWOULDBLOCK is a BSDish code.  Not all systems 
might define
EAGAIN (though this is unlikely).  The wise thing is to check 
for it - at
worst it is unnecessary, however it never hurts.  Also, on 
some systems
EAGAIN and EWOULDBLOCK are the same value (e.g. Linux), so 
the test makes
sense anyway and it might as well be the one elsewhere in the code.

Okay, this one holds, as far I am concerned.
 
Second point.  On WIN 32 sockets are implemented in a 
seperate DLL and they
have their own set of error numbers defined in winsock2.h 
which are entirely
unrelated to the codes in errno.h which are for the C runtime 
library.  The
error code from socket_errno() cannot be compared against 
values from errno.h
on WIN 32 although they can on Un*x.

I am now recalling that I even wrote something about this in the
comments of he patch which is attached to the first 'Win32 Facelift'
post. Incredible, how fast I am forgetting things. Back then I had a
conflict between ENAMETOOLONG and ENOTEMPTY.

Finally on WIN32 select() is provided by winsock, not the C runtime so
comparing against errno after calling select is wrong anyway 
- it should
be socket_errno() - and this value cannot be compared with EINTR on
WIN 32 (see above).

Perfectly right. Well, I must say I was a bit too fast with the
assertion about your patch being right or not. Another five negative
points for me. Now, either forgive me, or let me die a warrior, by my
own blade, in honour.

If it is OK, I would retract my tasteless assertion and claim the patch
you submitted is OK. I shall undo what I did to have errno.h included.

Ciao
Igor




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]