Hi,<br><br>Vincent:<br>&gt;&gt;you didn&#39;t quoted everything or read carefully:  **If** you do<br><br>Ah yup :)...sorry I didn&#39;t read this carefully.<br><br>This makes what Peter said feasible in my opinion i.e we could set errno to 0 and thereby the loop will only be processed once and we can make do with the #ifdef at the point. For *ix platforms errno will be set in the case of an error and the code should function normally. Will make the change and test out the code.<br>
<br>Jamey:<br>&gt;&gt;Looks like _xcb_open on Win32 could fall off the end without defining a<br>
&gt;&gt;return value. Have you compiled this with warnings turned on?<br><br>Yes _xcb_open should have a return value. Will make the change.<br><br>Bye for now<br><br><br><br><div class="gmail_quote">On Thu, Apr 1, 2010 at 10:07 AM, Vincent Torri <span dir="ltr">&lt;<a href="mailto:vtorri@univ-evry.fr">vtorri@univ-evry.fr</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><br>
<br>
On Thu, 1 Apr 2010, Jeetu Golani wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi,<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Fine with me, but I thought there were platforms where you can&#39;t assign<br>
to errno--in fact, I thought Win32 was one of those platforms?<br>
</blockquote>
<br>
While mingw doesn&#39;t seem to complain if we assign errno = 0, this article on<br>
msdn suggests applications can&#39;t (or maybe shouldn&#39;t?)<br>
<br>
<a href="http://msdn.microsoft.com/en-us/library/ms737828%28VS.85%29.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/ms737828(VS.85).aspx</a><br>
<br>
&lt;Quote&gt;<br>
Furthermore, it is not possible for an application to assign a new value to<br>
errno. (In Windows Sockets, the function WSASetLastError may be used for<br>
this purpose.)<br>
&lt;/Unquote&gt;<br>
</blockquote>
<br></div>
you didn&#39;t quoted everything or read carefully:  **If** you do<br>
<br>
#define errno WSAGetLastError()<br>
<br>
then you can&#39;t set a value to errno as it&#39;s not an lvalue anymore. errno is a global variable and can, of course, be set if no strange define like above is done<br>
<br>
if you use socket functions on Windows, WSASetLastError() and WSAGetLastError() should be used to set / get errors, like errno for CRT<br><font color="#888888">
<br>
Vincent<br>
</font></blockquote></div><br>