<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Jiehua,<br>
Please review the instructions on my webpage : in particular use my
compilation scripts, and look inside them to know the syntax.<br>
It is quite simple : makece X86 for stunnel.<br>
For openssl, run the command "mywcebuild X86".<br>
<br>
It works.<br>
Pierre<br>
<br>
<br>
Le 10/01/2011 17:40, Li, Jiehua a écrit :
<blockquote
cite="mid:2B69AAAC769E17428E58E34EDCD929EDDED5@USMAIL2K10-01.us.micros.int"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 11 (filtered
medium)">
<o:smarttagtype
namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="City"><o:smarttagtype
namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
pre
{margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:906263183;
mso-list-type:hybrid;
mso-list-template-ids:1636220426 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<div class="Section1">
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Dear Pierre and Dear Stunnel Users,<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">We are trying to build stunnel for WinCE on X86 processor. After reviewing messages on the board, I found your article published in late November. I’ve downloaded packages from your personal website at <a moz-do-not-send="true" href="http://delaage.pierre.free.fr/">http://delaage.pierre.free.fr/</a><o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">These packages include:<o:p></o:p></span></font></pre>
<pre style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><span style="">1.<font size="1" face="Times New Roman"><span style="font: 7pt "Times New Roman";"> </span></font></span></span></font><!--[endif]-->Precompiled wcecompat library <o:p></o:p></pre>
<pre style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; color: windowtext;"><span style="">2.<font size="1" face="Times New Roman"><span style="font: 7pt "Times New Roman";"> </span></font></span></span></font><!--[endif]-->Source code for <font color="black"><span style="color: windowtext;"><a moz-do-not-send="true" href="http://delaage.pierre.free.fr/contrib/openssl/wce/openssl100a_WCEpatched3.zip"><font color="black"><span style="color: windowtext; text-decoration: none;">openssl v100a for WCE</span></font></a>. <o:p></o:p></span></font></pre>
<pre style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; color: windowtext;"><span style="">3.<font size="1" face="Times New Roman"><span style="font: 7pt "Times New Roman";"> </span></font></span></span></font><!--[endif]--><font color="black"><span style="color: windowtext;">Source code for <a moz-do-not-send="true" href="http://delaage.pierre.free.fr/contrib/stunnel/wce/stunnel434_WCEpatched2X86.zip"><font color="black"><span style="color: windowtext; text-decoration: none;">stunnel v434 for WCE</span></font></a>.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; color: windowtext;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; color: windowtext;">I was hoping to the get the precompiled openssl library files, but it seems there are only library files for ARM processor under the folder of “out32dll_ARMV4” and there’s no precompiled version for X86. So I tried to compile the openssl downloaded from your website for the X86 processor after customizing a few parameters (OSVERSION, PLATFORM, WCEROOT, SDKROOT, WCECOMPAT) as you suggested. But the compilation failed, I got error messages as below. I’m also including all options for cl.exe in the email as well. I wonder if you have seen similar issues before. Any suggestion is appreciated. Thanks for the help.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; color: windowtext;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; color: windowtext;">Regards,
Jiehua<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"> cl.exe /Fotmp32dll_x86\cryptlib.obj -Iinc32 -Itmp32dll_x86 /MC /O1 /Oi<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"> /W3 /WX /GF /Gy /nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LE<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">AN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT -D_WIN32<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">_WCE=420 -DUNDER_CE=420 -DWCE_PLATFORM_STANDARDSDK_420 -Dx86 -D_ -IC:\STunnel\wc<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">ecompat12_patched2X86\patchedX86/include -DOPENSSL_NO_RC5 -DOPENSSL_NO_MD2 -DOPE<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">NSSL_NO_KRB5 -DOPENSSL_NO_JPAKE -DOPENSSL_NO_STATIC_ENGINE /Zi /Fdtmp32dll_x86/l<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">ib -D_WINDLL -D_DLL -DOPENSSL_BUILD_SHLIBCRYPTO -c .\crypto\cryptlib.c<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Command line warning D4002 : ignoring unknown option '/MC'<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">cryptlib.c<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">C:\Program Files\Windows CE Tools\WCE420\STANDARDSDK_420\include\x86\winnt.h(301<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">9) : error C2061: syntax error : identifier 'PCONTEXT'<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">C:\Program Files\Windows CE Tools\WCE420\STANDARDSDK_420\include\x86\winnt.h(302<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">0) : error C2059: syntax error : '}'<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">C:\Program Files\Windows CE Tools\WCE420\STANDARDSDK_420\include\x86\winbase.h(1<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">481) : error C2061: syntax error : identifier 'LPCONTEXT'<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">C:\Program Files\Windows CE Tools\WCE420\STANDARDSDK_420\include\x86\winbase.h(1<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">481) : error C2059: syntax error : ';'<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">C:\Program Files\Windows CE Tools\WCE420\STANDARDSDK_420\include\x86\winbase.h(2<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">222) : error C2146: syntax error : missing ')' before identifier 'lpContext'<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">C:\Program Files\Windows CE Tools\WCE420\STANDARDSDK_420\include\x86\winbase.h(2<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">222) : error C2081: 'LPCONTEXT' : name in formal parameter list illegal<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">C:\Program Files\Windows CE Tools\WCE420\STANDARDSDK_420\include\x86\winbase.h(2<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">222) : error C2061: syntax error : identifier 'lpContext'<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">C:\Program Files\Windows CE Tools\WCE420\STANDARDSDK_420\include\x86\winbase.h(2<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">222) : error C2059: syntax error : ';'<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">C:\Program Files\Windows CE Tools\WCE420\STANDARDSDK_420\include\x86\winbase.h(2<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">223) : error C2059: syntax error : ')'<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">C:\Program Files\Windows CE Tools\WCE420\STANDARDSDK_420\include\x86\winbase.h(2<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">230) : error C2143: syntax error : missing ')' before '*'<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">C:\Program Files\Windows CE Tools\WCE420\STANDARDSDK_420\include\x86\winbase.h(2<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">230) : error C2143: syntax error : missing '{' before '*'<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">C:\Program Files\Windows CE Tools\WCE420\STANDARDSDK_420\include\x86\winbase.h(2<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">231) : error C2059: syntax error : ')'<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">NMAKE : fatal error U1077: 'cl.exe' : return code '0x2'<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Stop.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">----------------------------------------------------------------------------------------<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Dear Michal, Dear all,<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">I have continued to work on my WCE version of stunnel 4.34, after having <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">received some request for help to compile for other TARGET CPU than ARM,<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">typically WCE/X86.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">That led me to a few more compilation bug fixes and some improvments in <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">makefiles, proper usage of winsock2 library, automatisation and <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">management of "make/build" process<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">for multiple targets WCE (ARM|X86...) and Win32 (with MS VC and <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Gnu-mingw32 !).<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">I added also, as a practical feature, the inclusion of <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">"version/copyright" properties in the exe files, properties that are <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">displayable in the Windows Explorer or by right-clicking on the exefile.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">This is not only a "beautifying" feature: this allows automatic version <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">checking by external tools without having to run the stunnel program, <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">particularly useful when the targetcpu does not match the host cpu...<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">I also worked to have "as close as possible" evc.mak, vc.mak, and <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">mingw.mak files.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">A lot of work and test-fail-adapt cycles have been performed to have a <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">common code working with the various flavors of C-PREPROCESSORS !<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">because there are subtle differences between MS EVC, MS VC, Borland BCC <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">and GNU-GCC preprocessors.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">THE ATTACHMENT has been sent in zip format, because it contains a few <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">scripts and other files that exceed the 100KB limit of the mailing list.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">it contains the files :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">version.h : contains the #define version numbers, major and minor<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">version.rc : version displayable by Windows Explorer property sheet<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">makew32.bat : an helper for build wih MS VC<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Michal:<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">patched2X86.txt : a FULL diff -cr between your last 4.34 official <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">version and my last patched<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">patched2X86_incr.txt : an INCREMENTAL diff -cr between my previous <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">patched version sent on 27/09/2010 and the present one.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">For the impatient, my patched version of stunnel 4.34 is available here :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><a moz-do-not-send="true" href="http://delaage.pierre.free.fr/contrib/stunnel/wce/stunnel434_WCEpatched2X86.zip">http://delaage.pierre.free.fr/contrib/stunnel/wce/stunnel434_WCEpatched2X86.zip</a><o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">IT COVERS both WCE and Win32 versions of stunnel.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">NEW FILES have been added to the sources: see attachments:<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">- version.h is NOW the CENTRAL point to define major and minor versions <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">of stunnel (NO MORE definition is makefile, which is logical : you <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">modify the version of the product, without necessarily modifying the <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">production process).<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">- version.rc is the resource file required by windows as the repository <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">of the stunnel.exe properties displayed in Windows Explorer.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Compiled with evc for wce or with VC for win32, this works perfectly.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">But compiled and linked with gcc, those properties are unfortunately not <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">displayed by Windows Explorer, although embedded in the exe file. I have <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">established that it is a bug in "gnu-link" stage.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">- makew32 : the equivalent of makece for Win32, which avoid repetitive <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">and error prone pollution of env vars when repetitively compiling for <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">w32. It is very useful in frequent recompilation at dev/test time.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">*** SOME PRACTICAL INFO :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">- now to compile, or clean up things, for a particular WCE TARGET CPU : <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">just type things like :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">makece ARMV4, eg for ARMV4 CPU<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">makece ARMV4 clean<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">makece X86, eg for ARMV4 CPU<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">makece X86clean<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">===> this create ../bin/ARMV4/stunnel.exe and ../obj/ARMV4/all objs <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">files, or the like with X86 cpu and so on.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">See list of all supported target cpu in evc.mak. ARMV4 and X86 go well; <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">more cpu may be checked by experts vs compilation flags...<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">This is very practical to compile for various targets without modifying, <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">deleting, renaming, anything and with no side effects between targets.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">- For Win32, yes for Windows PC, just type :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">makew32<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">makew32 clean<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">===> this create ../bin/W32/stunnel.exe and ../obj/W32/all objs files.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">This tool uses MS-VC 2008 express as compiler/linker.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">- For Win32, but with MINGW32 tools (and GNU-WIN32 coreutils !!!), just <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">type :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">mingw32-make -f mingw.mak<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">mingw32-make -f mingw.mak clean<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">===> this create ../bin/MGW32/stunnel.exe and ../obj/MGW32/objs files.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">GOODIE: I have tricked the mingw.mak to work EITHER on a Windows <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">compilation HOST MACHINE, OR a LINUX/UN*X compilation HOST.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">On windows mingw.mak properly checks and warns about potential missing <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">of gnu-win32 tools.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Note: the make.bat file is just a shortcut for mingw32-make -f mingw.mak.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">*** MODIFICATIONS of FILES :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">So, since my previous version of the patch, here are my adds :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">1/ evc.mak :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">1.1/linking with a recompiled version of Essemer/wcecompat:<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">this library has been customized to compile in SEPARATE folders for <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">MULTIPLE targets.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">So path to proper libs have been changed.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">My customized version of wcecompat is available here :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><a moz-do-not-send="true" href="http://delaage.pierre.free.fr/contrib/wcecompat/wcecompat12_patched2X86.zip">http://delaage.pierre.free.fr/contrib/wcecompat/wcecompat12_patched2X86.zip</a><o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">IT HAS ALSO been adapted to have separate folders for distinct targets <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">pre-compiled versions.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Please note that this philosophy is shared with openssl.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">1.2/ linking with winsock2 library instead of winsock1: at first to be <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">consistent with the C code, and second because winsock2 is more close to <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">socket standard than ws1.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">1.3/ linking with COREDLL.lib and CORELIBC.lib ONLY: whatever /MC or /MT <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">or other flag you put for CLxxx command, the set of default libs <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">expected to be linked is WRONG.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">This is a bug of CLxxx tools, inconsitent with MS doc.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">SO we have to overwrite the default lib list by always the same ones.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">You can verify that this is the right way to do it by searching for a <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">libc.lib in various evc/libs : you will NOT find any although clxxx /? <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">talks about it.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">1.3/ change in VERSION management : now there is a version.h and <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">version.rc souce file for this.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">One that wants to change version has just to edit version.h and then <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">version info will be propagated as usual in resource.h, AND also<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">in the exe itself to be displayable in Windows Explorer.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Now people will have a simple mean to check the version of stunnel.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Michal: have you noticed that there was a vestige "version.h" file <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">mentioned in vc.mak !<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">now it makes sense in evc.mak, vc.mak and mingw.mak, for wce or win32 <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">targets.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">1.4/ link /machine : IX86 is improper with WCE, it is X86.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">1.5/ Multiple WCE CPU targets supported by giving targetcpu on the make <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">command line like this :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">makece ARMV4 all<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">targetcpu is now mandatory.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">makece without options, as usual, will show the new syntax (very simple).<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">1.6/ improved clean target with some rmdirs and proper redirection of <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">error messages.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">proper use of make flags -@.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">1.7/ added explicit "inference rules" that are compatible MS nmake/ <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Borland make,<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">to be sure of the proper options, and to manage multiple subdirs <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">management matching TARGETCPU.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Now stunnel.exe is build in stunnel/bin/TARGETCPU subdir<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">objs are build in stunnel/obj/TARGETCPU<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">I really think it is practical and good policy : on my host machine I <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">have been able to test efficiently at the same time<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">three flavors of stunnel : win32, wce/arm, wce/x86 without <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">erasing/renaming/recompiling each time and wondering for what platform <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">was my stunnel.Exe built for.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">1.8/ HOST flag put in $(DEFINES) for CC and RC to add more info to exe <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">info property shhet in Windows Explorer "this stunnel is for THIS type <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">of target"<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">2/ makece.bat:<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">protection against pollution of environment when makece is repeatedly <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">run with the same targetcpu.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">+ Env is updated only when one is switching targetcpu.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">This is not perfect, but a step in the good direction.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">To understand what I mean, perform "set" to see all the env vars after <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">each makece call...<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">PRACTICALLY : you can type makece ARMV4 and then makece X86 in the same <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">command line window, without polluting "too much" the environment,<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">only when changing target. No need, reasonably, to have multiple command <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">line windows opened.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">3/ vc.mak: for win32<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">"multiple target" support by putting w32 obj and exe files in obj/w32 <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">and bin/w32 subdirs, version.rc support, winsock2 lib integration.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">crypt32 was missing .lib SUFFIX !<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">improper use of winsock1 : it is better to take winsock2 lib, and it is <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">what the code requires (#includes...) !<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">version management through version.h /.rc instead of /DVERSION<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">general logic now close to that of WCE evc.mak, as can be (evc and vc <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">are very close in their syntax, flags...).<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">HOST flag to add more info to exe info property sheet in Windows <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Explorer "this stunnel is for THIS type of target"<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">4/ created a makew32.bat script<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">as a wrapper to setenv vars for MSVC 2008 Express, and nmake call.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">This has to be improved in the future: presently it cannot be called <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">after a previous compilation for WCE :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">pollution of PATH and INCLUDE env vars requires to reopen a shell via <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">cmd.exe.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">One day I will check if there a simple way to clean env vars from some <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">path (not so simple).<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">5/ adapted mingw.mak to link with WINSOCK 2 (!!) and use of <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">version.rc/.h + general processing made similar to that of vc.mak.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">I tested with mingw for windows and it works. Someone should test with <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">gcc under linux, this should work...<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">HOST flag to add more info to exe info property sheet in Windows <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Explorer "this stunnel is for THIS type of target"<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Some rewriting to have a mingw.mak close to vc.mak, to ease maintenance...<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">I checked gnu make syntax, and it is close to ms nmake and borland make, <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">except for ifdef directives and inference rules syntax, unfortunately.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">I am somehow skilled in this boring exercise of comparing various make <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">tools and syntax.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">MINGW.MAK bugs: incorrect reference to "Makefile.w32", incorrect INC <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">path for openssl/win32 (this is NOT "outinc" but "inc32"! since a long <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">time).<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">NOTE : to compile on windows I commented "-l zdll" lib in the mingw.mak.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Michal, may you restore it if it is useful (I do not see why anyway).<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Added a testenv pseudo-target to check for gnu-win32 proper installation.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Added some tricks to enable proper execution with the same makefile <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">either on a Windows HOST or a Linux HOST.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">When I say host, I mean "production machine" , and NOT TARGET machine <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">which is always win32 with mingw.mak.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">6/ make.bat: this script is ONLY meaningful with mingw.mak and MINGW32 <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">gnu environment.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Due to various improvments I MADE in mingw.mak, mingw.mak is now only <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">compatible with mingw32-make,<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">and not just "make.exe", which is Borland make on Windows...<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">TODO : I did not deal with stunnel making for linux, and/or rpm packaging.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">But I guess that makefile.in etc...should be updated...<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Anyway, on linux, NOT including version.rc is not a problem, as this <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">file is useless in that target environment.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">But I think that having ../obj/UNX and ../bin/UNX folders should be a <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">good practice...<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">7/ common.h :<o:p></o:p></span></font></pre>
<pre><st1:city w:st="on"><st1:place w:st="on"><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Eureka</span></font></st1:place></st1:city> ! I finally understood and cleaned up the mess around the <o:p></o:p></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">redefinition of various Socket Error codes.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">This comes from the fact that, previously, those codes were defined in <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">MS winsock1 header files, but disappeared in winsock2 header files (they <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">are commented)<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Apparently, stunnel code was including winsock1 for w32 but winsock2 for <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">WCE, although winsock2 is in fact available on both platforms.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">So I decided to move to winsock2 for WCE, and re-declaring (again) SOME <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">of those constants.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Some clean up of the makefile has been done also to REALLY link to ws2 <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">lib instead of ws1 (because there was also a confusion there!).<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">8/ ctx.c : htons is requesting "short". so a cast was required to avoid <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">warnings from the compiler.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">9/ resolver.c : here we are:<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">many routines have been reimplemented when they are in fact available in <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">winsock2 both for w32 AND WCE.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Michal: I expect that you review this with particular attention.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">In fact I have modified the logic of "masking" local_routines when <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">already defined in winsock2.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">the previous code was HIDING winsock2 instead of the local_routines.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">It seemed not logical.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">It is important to note that the three routines "getaddrinfo, <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">freeaddrinfo, getnameinfo" are FOR INSTANT used only in resolver.c,<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">BUT the previous code was preventing them from being used by other modules.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Now, with my code, it is possible.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">My code also avoid compilation warnings (because, as getaddrinfo REALLY <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">exist in win32, such a "#define getaddrinfo localgetaddrinfo"<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">inevitably raises a warning of the compiler for redef of an existing <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">symbol; and hence it reveals a problem of conflict..., while my solution <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">avoids all this pitfalls).<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Removed also the restriction "AND IPV6" on win32 conditional #IF: <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">winsock2 supports ipv6.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Michal: a review on these conditional #IF should be useful...<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">I wanted to add that those routines are also parts of the POSIX standard <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">API, so they are available almost everywhere...<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">so I hardly understand their purpose today.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">10/ version.h :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">I have used some preprocessor tricks to have a VERSION string correctly <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">defined BOTH with MS evc preprocessor, MS vc preprocessor:<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">AND GNU preprocessor.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">those preprocessors have some differences...particularly when called <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">from a rc compiler through a "pipe" like gnu windres.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">In ms VC and EVC the rc preprocessing is NOT the same as that of the <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">compiler...<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Now it works with every build system, and either in .c compilation or <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">.rc compilation.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">USEFUL : openssl team is desperately ignoring any WCE patch, so if you <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">want an openssl 100a source tree compatible with WCE,<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">just download mine there :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><a moz-do-not-send="true" href="http://delaage.pierre.free.fr/contrib/openssl/wce/openssl100a_WCEpatched3.zip">http://delaage.pierre.free.fr/contrib/openssl/wce/openssl100a_WCEpatched3.zip</a><o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">FYI, my patch to openssl is registered here : <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><a moz-do-not-send="true" href="http://rt.openssl.org/index.html?q=2350">http://rt.openssl.org/index.html?q=2350</a> (login guest/password guest).<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">TODO : gui.c contains code to dynamically load ws2 getaddrinfo<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">why not rely only on static linking for that, as ws2 is available <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">everywhere since w95 and wce4.1 ?<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">we have to harmonize the code there with resolver.c and various makefiles<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">In resolver.c: code remains to load dynamically ws2 getaddrinfo etc..at <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">run-time only on win32, and not in CE while it is ALSO available!<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">I suggest to have "static" linking to ws2.lib both in w32 and wce . but <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">more code has to be modified to be definitely clean and clear.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">When I say "static linking" I mean "Load-Time Dynamic Linking", ie link <o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">with ws2.lib stub at build time, not "link with static lib"...<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">I thank you for your good work and attention,<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Yours sincerely,<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Pierre Delaage<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">Le 27/09/2010 00:40, Pierre DELAAGE a écrit :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> Dear All,<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> Please find enclosed a patch in "diff -cr orig patched" format,<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> applying to stunnel4.34 as found here <a moz-do-not-send="true" href="ftp://stunnel.mirt.net/stunnel/">ftp://stunnel.mirt.net/stunnel/</a>.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> This patch mainly addresses compilation and unicode issues for Windows<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> CE targets + ONE critical issue preventing stunnel to service anything<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> (!).<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> I use MS EVC 4sp2 compiler with WCE 420 SDK, on a vista host platform.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> Once debugged the code works fine on WM6 HTC smartphones.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> Should work on WM5.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> It needs a windows CE openssl lib (I recompiled MY patched version of<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> openssl 1.0.0a successfully: I will have to log a patch to those<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> gentlemen, hoping that they are open to integrate it, something not so<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> obvious in the past).<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> I will later post here a link to my patch for openssl 100a pointing to<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> the openssl mailing list. THIS OPENSSL PATCH IS ESSENTIAL : with my<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> older version of openssl 098pre_j for wce, stunnel does not work<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> anymore (it crashes after first cnx).<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> The present stunnel patch addresses the following issues :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> *************<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> I] COMPILATION FAILURES<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> 1/ on common.h "EINVAL redefinition" :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> in fact the compile options WX (see evc.mak) does not tolerate any<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> warning :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> The MS evc420 compiler ALWAYS issues a warning on this symbol<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> redefinition.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> Michal and I are dealing with it since month...<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> But, considering that NEITHER Exxx error codes are used in stunnel,<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> I suggest that in fact ALL these redef should be suppressed.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> TODO: In the future a proper rewrite of code in log.c, where hardcoded<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> values of WSA error codes are used instead of symbolic constant, will<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> have to be done.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> 2/ client.c<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> CreateProcess is a UNICODE function: code was ascii only.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> Code has been adapted to work in unicode.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> 3/ evc.mak<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> path to new openssl lib has been redefined.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> proper location for the libs in openssl tree has been set in the<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> make-install block (although this block is presently USELESS and needs<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> a complete rewrite).<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> 4/ gui.c<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> All code using hmainmenu is OFF under winCE.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> So some new lines involving it were not compiling.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> 5/ options.c<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> linger_val.l_linger and linger_val.l_onoff require ushort values.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> Strict type checking of the compiler required a proper cast to ushort<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> of the r-values.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> stralloc uses "strdup":<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> on Win32 and winCE strdup is _strdup (!).<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> 6/ prototypes.h :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> _beginthread was defined as returning an int, an a long in sthread.c.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> After some checking in various documentations, long is the correct type,<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> in particular because _beginthread can return the special error value<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> "-1L". So that unsigned types are illogical.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> This simplifies the code in some locations, by saving some -now<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> useless- casts.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> 7/ sthread.c<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> create_client: suppressed some useless cast to (long) for beginthread.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> *************<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> II] OPERATIONAL ERRORS (at run-time)<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> This is a reminder of previous notification to the mailing list :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> due to beginthread improper code and/or use,<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> It is presently IMPOSSIBLE for stunnel 434 to be used in production on<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> WCE:<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> it is just unable to service any...service.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> Nothing happens if, for example, you use it to connect to an https<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> server. No log either !<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> I corrected the code with both Michal patch to gui.c and mine to<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> sthread.c:<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> gui.c (Michal patch) :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> _beginthread was called with 0 as stacksize which, cumulated to an<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> improper coding of sthread/beginthread, led to FAILURE of service<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> thread creation.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> sthread.c:<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> _beginthread : now supports "0" stacksize value, leading to default<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> linker stack size (1MB by default unless specified differently on the<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> linker command line, something we do not yet perform but could).<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> *************<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> III] MINOR IMPROVMENT<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> _beginthread: added a log on critical event of "failure" to create a<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> service thread. because I think it is a critical event, isn't it?<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> I hope you will find this patch useful.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> Thank you for your excellent work,<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> Yours sincerely,<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> Pierre Delaage<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> Note : I use stunnel to establish a simple "vpn" between smartphones and<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> a corporate linux server mainly for HTTPS/POPS/SMTPS support.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> Stunnel is very relevant in that matter, over solutions based on SSH<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> (although we use also ssh), from a communication cost point of view :<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> ssh establishes permanent socket between client and server, so that the<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> communication is charged by the mobile network provider : and these<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> charges are very expensive.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> On the contrary stunnel only establishes ssl sockets on demand so that<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> financial charges are limited to strict necessary.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> Please note that stunnel brings "client based certificate<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> authentication" to POP/SMTP mobile mail user agents which only<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> BASICALLY supports SSL with server authentication, but NO client<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> authentication, such as M$ Outlook for <st1:city w:st="on"><st1:place w:st="on">Mobile</st1:place></st1:city> (unless you pay for an<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> exchange server and exchange client licence).<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> Here again stunnel is very relevant.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> Note 2 : the strdup and unicode bug fixes should benefit also to the<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">> win32 (for PC) stunnel version for PC.<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><a moz-do-not-send="true" href="http://marc.info/?l=stunnel-users&m=129002593426045&q=p3"><b><span style="font-weight: bold;">["stunnel434patch20101117.zip" (application/x-zip-compressed)]</span></b></a><o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">_______________________________________________<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;">stunnel-users mailing list<o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><a class="moz-txt-link-abbreviated" href="mailto:stunnel-users@mirt.net">stunnel-users@mirt.net</a><o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><a moz-do-not-send="true" href="http://stunnel.mirt.net/mailman/listinfo/stunnel-users">http://stunnel.mirt.net/mailman/listinfo/stunnel-users</a><o:p></o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font size="2" color="black" face="Courier New"><span style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><b><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-weight: bold;">[<a moz-do-not-send="true" href="http://marc.info/?l=stunnel-users&m=129001288405228&w=2">prev in list</a>] [<a moz-do-not-send="true" href="http://marc.info/?l=stunnel-users&m=129010241218147&w=2">next in list</a>] [<a moz-do-not-send="true" href="http://marc.info/?l=stunnel-users&m=128554087819713&w=2">prev in thread</a>] [</span></font></b><b><font color="silver"><span style="color: silver; font-weight: bold;">next in thread</span></font>] </b><o:p></o:p></pre>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span
style="font-size: 12pt;"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="text-align: center;"
align="center"><font size="3" face="Times New Roman"><span
style="font-size: 12pt;"><a moz-do-not-send="true"
href="http://marc.info/?q=configure">Configure</a> |
<a moz-do-not-send="true"
href="http://marc.info/?q=about">About</a> | <a
moz-do-not-send="true"
href="http://marc.info/?q=news"> News</a> |<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
</div>
</o:smarttagtype></o:smarttagtype></blockquote>
<br>
</body>
</html>