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

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

All,

Thank you once again for all the comments both in this issue and in 
[THRIFT-1123|https://issues.apache.org/jira/browse/THRIFT-1123]. It has really 
helped me.

I have attached a new patch which is what I currently have as regards combining 
all the comments, however it is by no means complete - it just compiles the 
client side code at the moment. I have posted it mainly for a (hopefully) quick 
code review to make sure I am not going down the wrong path.

To outline the changes:

- Platform specifics have been removed and replaced by using the Apache 
Portable Runtime (APR) v1.4.2
- Config.h has been renamed to win32_config.h and been moved into 
"build_windows/msvc##/" where ## is the compiler version.
- By using APR very few headers are now included in this new config header, 
just enough to ensure POSIX types are available.
- Tests for client, concurrency, realloc and server have been added, but do not 
yet compile. (Work in progress)

To reply to some comments:

@Christian Lavoie: {quote}why did you put (std::min) in parentheses in 
TBufferTransports.cpp ?{quote}

This is because somewhere in a windows header (can't remember which one) min 
and max have been defined as macros and as far as I am aware cannot be turned 
off. The parentheses make sure the STL min\max versions get chosen instead. A 
pain I know! 

@Dragan Okiljevic: Thank you for working on the server side of things, I really 
appreciate it. However, in switching to using APR I have probably broken your 
changes. After I have finished the client side of things, I will endeavor to 
fix the server side for you.

Again, thank you for any comments and feedback.
James

> 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.7
>
>         Attachments: thrift_msvc.patch, thrift_msvc_v0_1.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