libetpan with openssl on windows

Michael Leupold <[email protected]> Sat, 22 Apr 2006 14:12:21 +0200
Newsgroups gmane.mail.libetpan.user
Message-ID <[email protected]>
Hi,

I just compiled libetpan with openssl on windows (MSVC). Actually most things 
seem to work, but I have two issues I can't resolve:

1. mailstream_ssl.c uses fcntl in mailstream_prepare_fd to set the socket to 
non-blocking mode. Unfortunately fcntl isn't available on windows and I 
haven't found any usable replacement. So is just enclosed the function with 
defines so it only returns 0 on compiling with msvc.
As I haven't looked at the mailstream-code I wonder if this may break anything 
or if it's just detrimental to performance (or none of the two)? So far it 
seems to work...

2. mailstream_ssl.c uses close(ssl_data->fd) to close the socket on windows 
which doesn't seem to be the correct way. Looking at mailstream_socket.c, 
closesocket is used there. Changing mailstream_ssl.c accordingly works.

After making the changes, everything seems to work so far (haven't tested std 
imap with starttls though).

Regards,
Michael


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642