On Fri, Nov 7, 2014 at 11:07 PM, Brent Cook <bust...@gmail.com> wrote:
>
>> On Nov 7, 2014, at 8:21 AM, Dongsheng Song <dongsheng.s...@gmail.com> wrote:
>>
>> I need some code changes for Windows support.
>> e.g.
>>
>> --- a/src/lib/libssl/src/crypto/bio/bss_dgram.c
>> +++ b/src/lib/libssl/src/crypto/bio/bss_dgram.c
>> @@ -57,13 +57,17 @@
>>  *
>>  */
>>
>> +#ifdef _WIN32
>> +#include <ws2tcpip.h>
>> +#else
>> #include <sys/socket.h>
>> -#include <sys/time.h>
>> -
>> #include <netinet/in.h>
>> +#include <netdb.h>
>> +#endif
>> +
>> +#include <sys/time.h>
>>
>> #include <errno.h>
>> -#include <netdb.h>
>> #include <stdio.h>
>> #include <string.h>
>> #include <unistd.h>
>
> Thanks for the first set of patches on the portable tree!
>
> I would think the #ifdef _WIN32 is probably the lesser of two evils.
>
> Hopefully this will be largely confined to bio and the openssl app?
>

yes, I can generate openssl.exe with my local patches.
I use #ifdef _WIN32 to guard headres, socket functions, signal
functions, tty functions.
fork is more painful, so I defined OPENSSL_NO_SPEED. maybe I'll write
a Windows version speed_main.

> You'll also need to audit file descriptor usage carefully, so they
> are closed properly:
>

Thanks.

Reply via email to