[stunnel-users] Win CE build errors: main_execute() removed from stunnel.c file? "hwnd" link error.

Pierre DELAAGE delaage.pierre at free.fr
Fri Dec 7 08:31:03 CET 2012


Hi again Michal,
I just checked v500b3 code...

Well, I think there is some misunderstanding about winsock1 and winsock2 :

at least the purpose is to have consistant use of winsock1 H files AND 
lib, OR winsock2 H files AND lib.

Secondly, the purpose is to make use of wsock2 when and WHERE it REALLY 
exist (ie is available).

To make it more clear : winsock2 and getaddrinfo ARE AVAILABLE and 
working on WCE : the V434 code was assuming that getaddrinfo was NOT 
existing in WCE, which is just wrong.
And then, in V434, the code for common.h was containing this :

#ifdef _WIN32_WCE
#include <winsock.h>
#else
#include <winsock2.h>
#include <ws2tcpip.h>
#endif

meaning : use of wsock1 in WCE.
THAT was leading to compilation warnng about various #define that need 
-strangely- redef in winsock2, but are available in winsock1 (still 
following me ?...).

Example : this is required in common.h if using wsock2, but NOT if using 
wsock1. My 2010/11 code was fixing all this stuff.
#define ENOTSOCK WSAENOTSOCK


====

BUT today :

v500b3 common.h is JUST containing this :
#ifdef USE_WIN32
#include <winsock2.h>
#include <ws2tcpip.h>

well ok...nice...even for WCE...BUT inconsistent with EVC.MAK calling 
winsock1 LIB !!!!!!
and inconsistent with many #defines that are in fact REDEF of existing 
symbols that lead to compilation warnings.

So, I can help to make it more consistent :
use of winsock.h if using winsock.lib (ie winsock 1 !),
OR use of winsock2.h and ws2_lib (ie winsock2 !),

but not mixing winsock2.h and winsock1 lib !

===
Something else : in log.c, many, I should say "ALL", winsock X error 
codes are  HARDCODED in s_strerror() : not so good for 
maintainability...and stability of behavior (if codes are changing in 
the lib...).

I can help...but would you trust me ? :-)...

I will dive in this, this week-end,

See you soon,
Pierre


Le 06/12/2012 22:08, Michal Trojnara a écrit :
> On 2012-12-06 21:30, Pierre DELAAGE wrote:
>> My sole purpose was to replace winsock1 lib an h files with those of
>> winsock2 (see my modified common.h I sent you in 2010/11),
>> as winsock2 is available on many windows version, including 2000.
> I agree with the basic idea of using Winsock2 only.
> I'd like to retain compatibility with vanilla W2K and Wship6.dll.
> I hope these goals are not mutually exclusive.
>
> About patches: Would you be so kind to send small patches for each
> separate change?  I really need to be able to discuss them, and decide
> whether to accept or reject each of them. I refuse to apply changes I
> don't understand, so you not only need to be right, but you also need to
> convince me that you are.  8-)
>
> Thank you very much for your offer to test and fix WCE.
> Please take a look at the latest beta version:
> https://www.stunnel.org/downloads.html
> to help me improve quality of the final stunnel 5.00 release.
>
> Mike
>
>
>
> _______________________________________________
> stunnel-users mailing list
> stunnel-users at stunnel.org
> https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stunnel.org/pipermail/stunnel-users/attachments/20121207/c8c06351/attachment.html>


More information about the stunnel-users mailing list