<br>&gt;&gt;#ifndef _WIN32 inside #if USE_POLL seems redundant. USE_POLL<br>
&gt;&gt;shouldn&#39;t be defined on Win32.<br>
<br>
&gt;&gt;Hmm Win32 doesn&#39;t have the poll function and uses WSAPoll instead so<br>
&gt;&gt;we&#39;ll need to somehow #ifdef the poll function. Pls let me know alternate<br>
&gt;&gt;mechanisms to achieve this.<br>
<br>I just realized that if USE_POLL isn&#39;t defined on Win32 then #ifndef _WIN32 is indeed<br>redundant. Will make the necessary change a little later in the day.<br><br>- Jeetu<br>
<a href="http://www.ebrain.in/" target="_blank">http://www.ebrain.in</a><br>
- An open (GPL) platform to discover and run software off someone in the<br>
meshed network pool and use it on your own device.<br>
<br>
twitter:  @0topcat0 and @ebrainpool<br>
<br><br><br><br><div class="gmail_quote">On Wed, Mar 31, 2010 at 10:06 AM, Jeetu Golani <span dir="ltr">&lt;<a href="mailto:jeetu.golani@gmail.com">jeetu.golani@gmail.com</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;">
<br>
Hi,<br>
<div class="im"><br>
&gt;&gt;You appear to have accidentally dropped a number of headers in<br>
&gt;&gt;xcb_util.c, including &lt;fcntl.h&gt; and &lt;netinet/tcp.h&gt;, so libxcb doesn&#39;t<br>
&gt;&gt;compile any more on *ix.<br>
<br>
</div>Ouch...sorry have included them back in the code.<br>
<div class="im"><br>
&gt;&gt;#ifndef _WIN32 inside #if USE_POLL seems redundant. USE_POLL<br>
shouldn&#39;t be defined on Win32.<br>
<br>
</div>Hmm Win32 doesn&#39;t have the poll function and uses WSAPoll instead so<br>
we&#39;ll need to somehow #ifdef the poll function. Pls let me know alternate<br>
mechanisms to achieve this.<br>
<div class="im"><br>
&gt;&gt;The do-while around select in xcb_in.c might not be required on Win32,<br>
&gt;&gt;but does it hurt?<br>
<br>
</div>Win32 doesn&#39;t have the EINTR error code flag and uses WSAEINTR instead<br>
so we will have to #ifdef this region or change it somehow.<br>
<br>
Pls let me know what other changes need to be made here and any thoughts<br>
on the above.<br>
<div class="im"><br>
Bye for now<br>
Jeetu<br>
<a href="http://www.ebrain.in" target="_blank">http://www.ebrain.in</a><br>
- An open (GPL) platform to discover and run software off someone in the<br>
meshed network pool and use it on your own device.<br>
<br>
twitter:  @0topcat0 and @ebrainpool<br>
<br>
<br>
<br>
</div><div><div></div><div class="h5">On Wednesday 31 March 2010, Peter Harris wrote:<br>
&gt; On 2010-03-30 15:32, Jeetu Golani wrote:<br>
&gt; &gt; I have updated the Win32 port to the current (few weeks old) tree of xcb.<br>
&gt; &gt; Have conducted a few rudimentary tests and it seems to perform all right.<br>
&gt;<br>
&gt; Looks good. I appear to be down to nits, none of which are critical as<br>
&gt; far as I can see. Thanks for working on this.<br>
&gt;<br>
&gt; You appear to have accidentally dropped a number of headers in<br>
&gt; xcb_util.c, including &lt;fcntl.h&gt; and &lt;netinet/tcp.h&gt;, so libxcb doesn&#39;t<br>
&gt; compile any more on *ix.<br>
&gt;<br>
&gt; SOCKET on Win32 is currently defined to intptr_t, which is wider than<br>
&gt; int on 64-bit systems. We can probably get away with leaving fd as an<br>
&gt; int, for the sake of keeping the code at least somewhat sane. (Neither<br>
&gt; breaking the ABI on *ix nor #ifdefing the type on Win32 are particularly<br>
&gt; appealing, from what I can see). Note that Win32, unlike posix, does not<br>
&gt; just allocate FDs one by one starting from stderr, so it&#39;s more likely<br>
&gt; that some app will run in to this than a *ix person might think. But I<br>
&gt; believe current implementations of Windows try to keep SOCKETs below<br>
the<br>
&gt; 31-bit barrier most of the time.<br>
&gt;<br>
&gt; #ifndef _WIN32 inside #if USE_POLL seems redundant. USE_POLL<br>
shouldn&#39;t<br>
&gt; be defined on Win32.<br>
&gt;<br>
&gt; The do-while around select in xcb_in.c might not be required on Win32,<br>
&gt; but does it hurt? I&#39;d rather avoid as many #ifdefs as possible. In the<br>
&gt; same vein, Remi already suggested using send/recv everywhere (even on<br>
&gt; *ix). What do you think?<br>
&gt;<br>
&gt; There&#39;s trailing whitespace in a few places. &quot;git diff --color&quot; to see<br>
&gt;  them.<br>
&gt;<br>
&gt; _XCB_WINDEFS_H -- identifiers starting with underscore followed by<br>
&gt; another underscore or a capital letter are reserved in C (7.1.3). I&#39;ve<br>
&gt; already lost this battle, as the rest of xcb already stomps on this<br>
&gt; namespace, but I thought I&#39;d point it out.<br>
&gt;<br>
&gt; What does the rest of the list think? Is it better to use a name that<br>
&gt; resembles the rest of the names in XCB, or should we try to avoid the<br>
&gt; reserved namespace going forward?<br>
&gt;<br>
&gt; Peter Harris<br>
&gt;<br>
<br>
</div></div></blockquote></div><br>