You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Jason A. Dour" <ja...@bcc.louisville.edu> on 1997/08/07 18:21:50 UTC

WinCE porting tips...

-----BEGIN PGP SIGNED MESSAGE-----

Well, I garnered a few Windows CE porting tips from WinCE developers...

I forget who (Ben I think) who was interested in porting Apache to WinCe,
but I thought I'd share the information I got with them.

Jason
# Jason A. Dour <ja...@bcc.louisville.edu>                            1101
# Programmer Analyst II; Department of Radiation Oncology; Univ. of Lou.
# Finger for URLs, PGP public key, geek code, PJ Harvey info, et cetera.

- ---------- Forwarded message ----------
Date: Thu, 31 Jul 1997 12:54:36 -0700
From: Paul Meyer <pm...@Oceania.com>
Reply-To: Windows CE Talk List <Wi...@WindowsCE.com>
To: 'Windows CE Talk List' <Wi...@WindowsCE.com>
Subject: RE: [CE] Porting information...

If your Win32 port is intended to work on Win95, and the engineers
weren't thinking ahead to future work, they probably are building it
using the ANSI Windows API calls (because Win95 stubs the Unicode ones)
and using either MBCS Windows calls for string handling or (even worse)
the C library string handling functions. Since CE is Unicode-only (and
doesn't even stub the ANSI ones), the Win95 code is unlikely to compile,
let alone work, for CE.

If your engineers are doing all the right, international-friendly things
involving character sets, the comparatively minor problem that many
other redundant API calls have been eliminated remains. For example, in
Win32 you can draw a line onto an HDC in a couple of ways: Use MoveTo()
and LineTo() (or MoveToEx() and LineTo()), or set up an array of points
and call Polyline(). In CE, MoveTo() and LineTo() are not available so
you must use Polyline. Another example: to create a GDI font handle in
Win32 you can set up a LOGFONT structure and call CreateFontIndirect(),
or you can call CreateFont(), which has a really long parameter list
consisting exactly of all the members of a LOGFONT. In CE, CreateFont()
doesn't exist so you have to use CreateFontIndirect().

Anyway, porting a carefully-written internationalizable, Unicode-aware
Win32 program to CE is pretty easy. Porting something hacked into Win32
from Win16 to get the Win95 logo would be much much trickier.

Ironically, porting a CE app back to NT is generally trivial except for
some tweaking to turn your commandbar into a menu bar and a button bar.
Writing an app to compile for 95, NT, and CE from the start is also very
easy if you watch your Ps and Qs.

- ------------
Paul Meyer          | John Carey's Vorlon T-shirt:
wk: pem@oceania.com | "Always been there. Always done that."
hm: pem@nothingbutnet.net



- ---------- Forwarded message ----------
Date: Thu, 31 Jul 1997 16:27:16 -0400 (EDT)
From: "Danny W." <dw...@acm.poly.edu>
To: jad@bcc.louisville.edu
Cc: dan@panoramic.com
Subject: Re: [CE] Porting information...

...and when the skies parted and all was calm, Jason A. Dour spoke:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> 
> Hello all,
> 
> I've been lurking the list for a day or so...  My Velo1 is arriving
> tomorrow -- I got to use one while setting it up for on of my co-workers,
> and I almost didn't want to give it back!  As a geek and writer, I found
> that little monster to be a better companion than my seven year old
> "notebook."  8)

Yup, its a nifty little thing...
 
> I've already asked fellow Apache Group members about the possibility of
> porting Apache to CE (even if only a scaled down super-simple version).
> The AG has recently been working on porting to 95/NT, so I was wondering
> how viable a CE port would be...  Since the Win32 calls would largely
> already be in place, would it be a matter of reviewing all of them to
> ensure they are within the CE framework?  How different is CE from 95/NT? 
> Apache doesn't use any GDI calls, so it's largely all disk and network I/O
> calls.  Can anyone give me any information whatsoever regarding the
> possible mountain or molehill this could be?  I'm mainly curious at this
> point...nothing will happen until I and other AG members can allot free
> time to work on this. 

The only restrictions you will have on the port is that you will have to
convert all your string functions & strings to Unicode, and you might have
to convert your file calls if you're using fopen()-type calls.   Size
of the executable might be an issue (but not as far as porting).  If there's
no flaky stuff being done on the 95/NT version, then you should have
minimal hassle, especially if there's no GDI calls.

Would be interesting to see what the performance would be for Apache on CE
(ApaCE?).
 
 -Dan

- --
Daniel Wyszynski
Lead Developer
Panoramic Software
http://www.panoramic.com

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBM+n2IZo1JaC71RLxAQEmbwQAm2V7dmkkr6XMg3cOQA17z3l2lfLiprvl
S1yjfjppKluFG0I6waSJGznU5zui5kEvt2/DRLYlofPsDvPFyTVg1B0UDTUIJtrU
PkMoLotuVkjGvha2xfCZe3NMFUaeEO6QgmEzwGBaF+INjwCib/BZLvdCD5fZJTE0
nJVLmjjaQ+s=
=JCTL
-----END PGP SIGNATURE-----


Re: WinCE porting tips...

Posted by Dean Gaudet <dg...@arctic.org>.
Port glibc first ;)

Dean

On Thu, 7 Aug 1997, Alexei Kosut wrote:

> On Thu, 7 Aug 1997, Jason A. Dour wrote:
> 
> > Well, I garnered a few Windows CE porting tips from WinCE developers...
> > 
> > I forget who (Ben I think) who was interested in porting Apache to WinCe,
> > but I thought I'd share the information I got with them.
> 
> Hmm. So the summary is basically "You can't use ANSI characters, only the
> Unicode Win32 functions work. Oh, and by the way, most of the ANSI C and
> Unix-compatibility functions aren't there either."
> 
> In other words, there is no way in heck Apache will ever run on Windows
> CE.
> 
> -- Alexei Kosut <ak...@organic.com>
> 
> 


Re: WinCE porting tips...

Posted by Alexei Kosut <ak...@organic.com>.
On Thu, 7 Aug 1997, Jason A. Dour wrote:

> Well, I garnered a few Windows CE porting tips from WinCE developers...
> 
> I forget who (Ben I think) who was interested in porting Apache to WinCe,
> but I thought I'd share the information I got with them.

Hmm. So the summary is basically "You can't use ANSI characters, only the
Unicode Win32 functions work. Oh, and by the way, most of the ANSI C and
Unix-compatibility functions aren't there either."

In other words, there is no way in heck Apache will ever run on Windows
CE.

-- Alexei Kosut <ak...@organic.com>