[ 
https://issues.apache.org/jira/browse/THRIFT-1031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105952#comment-13105952
 ] 

James Dickson commented on THRIFT-1031:
---------------------------------------

@alexandre

Thank you for your comments, I mostly agree, however to make some further 
points:

PosixThreadFactory & TNonblockingServer - I will take a look at what you have 
and integrate those today (16th Sept).

TSocket:

I have taken a look at what you have, and whilst it is indeed minimal, the main 
reason for re-implementing it for Windows was in response to David's proposal 
of creating TAprSocket, except I wasn't really a fan of using APR as it is yet 
another dependency to include. By using #'defs as you have done I kind of feel 
it is going down the route of trying to fit a square peg into a round hole 
(maybe I am being pedantic!).

I think so long as the windows implementation of the TSocket interface fulfills 
the obligations and behavior of that interface then my preference would be to 
have an all windows implementation. Whilst what I have currently is merely a 
duplication with the non windows code ported over, eventually I would like to 
implement an entire windows version.

Errno:
Note that a windows specific implementation would also fix the errno issue as 
it would be possible to use WSAGetLastError directly as well as the windows 
error codes without the special care currently required in your version.

I have also taken a look at your implementation of "fcntl" and it doesn't seem 
to follow the specification here, mainly throwing an integer value of -99 isn't 
specified: http://pubs.opengroup.org/onlinepubs/009695399/functions/fcntl.html

I'd really like this patch to be integrated into the main trunk, so if there is 
anything more I can do to make this happen please let me know. 

> Patch to compile Thrift for vc++ 9.0 and 10.0
> ---------------------------------------------
>
>                 Key: THRIFT-1031
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1031
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Library
>         Environment: Windows XP 32bit, vc++ 9.0, 10.0
>            Reporter: James Dickson
>            Priority: Trivial
>             Fix For: 0.8
>
>         Attachments: thrift_msvc.patch, thrift_msvc_v0_1.patch, 
> thrift_msvc_v0_2.patch, thrift_msvc_v0_3.patch, thrift_msvc_v0_4.patch, 
> thrift_msvc_v0_5.patch
>
>
> At our company we need clients running on Windows being able to connect to 
> our linux servers running hypertable. The attached patch enables the parts 
> needed by Hypertable to be compiled on Windows using either the VC++ 9.0 or 
> 10.0 compilers.
> Having read previous posts about ports using boost::asio we found these to be 
> too intrusive for our needs. This version uses pthreads_win32 and winsock2 
> and is as designed to be as un-intrusive as is possible to the original unix 
> code base. It is mostly #defines between unix sockets and winsock2 sockets. 
> We also tried to follow the folder structuring of the C# runtime that has 
> visual studio solutions to be consistent.
> More details are in the README as not all the functionality of the original 
> unix code base is available to windows users. We will add the missing 
> functionality, we just wanted to share what we had as for a Windows based 
> client for us it is sufficient.
> The patch is based on the latest revision in SVN, we would love feedback and 
> any code reviews. If there is any possibility of this being added to the main 
> trunk then that would be much appreciated, however we don't expect that.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to