[Xcb] Win32 port - pls review

Jeetu Golani jeetu.golani at gmail.com
Wed Mar 31 21:29:20 PDT 2010


Hi,

> Fine with me, but I thought there were platforms where you can't assign
> to errno--in fact, I thought Win32 was one of those platforms?

While mingw doesn't seem to complain if we assign errno = 0, this article on 
msdn suggests applications can't (or maybe shouldn't?)

http://msdn.microsoft.com/en-us/library/ms737828(VS.85).aspx

<Quote>
Furthermore, it is not possible for an application to assign a new value to 
errno. (In Windows Sockets, the function WSASetLastError may be used for 
this purpose.)
</Unquote>

Bye for now

On Wednesday 31 March 2010, Peter Harris wrote:
> On 2010-03-31 13:49, Jamey Sharp wrote:
> > On Wed, Mar 31, 2010 at 09:51:33AM -0700, Barton C Massey wrote:
> >> In message <201003312215.43723.jeetu.golani at gmail.com> you 
wrote:
> >>> a) xcb should initialize errno to 0 before calling select for all it's
> >>> variants - *ix  and Win32.
> >>
> >> You often want (a) for the *ix case anyway; I'd just go
> >> there.
> >
> > Fine with me, but I thought there were platforms where you can't assign
> > to errno--in fact, I thought Win32 was one of those platforms?
> 
> errno "expands to a modifiable lvalue" since at least C89, so even MS's
> "stuck in 1990" environment supports it.
> 
> It wouldn't surprise me to learn that MS's errno wasn't modifiable in
> the 1980s, though.
> 
> You can't assign errno on WinCE, but that's because WinCE doesn't even
> have errno (due to it being a minimal "freestanding" environment).
> 
> Peter Harris
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20100401/205a77ca/attachment.htm>


More information about the Xcb mailing list