On 2/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
[...]
> 4) Map errno to [Get|Set]LastError() with preprocessor macros.
>         #define errno GetLastError()
>         #define __set_errno(X) SetLastError((DWORD)X)
>         #define ENOMEM ERROR_OUTOFMEMORY
>         (...)
[...]
> Conclusion:
>
> I like 4 the best, and I am going to give it a try.
>
> Any opinions/comments/requests-for-clarification/war_stories
> would be much appreciated.

You forgot one solution:

5) Win32 for WindowsCE doesn't have errno, just like it doesn't have
any getcwd() and co. If the user is porting code with mingw32ce which
uses this, either use it's own replacements or use cegcc.

I'm with 5. For me, mingw32ce is the thin wrapper around the WinCE
Win32 API, so don't try to add functionality that doesn't exist
already on the standard SDK.

The possible exception may be the implementation of the minimum
required to build a minimal C++ standard library, but I would not
worry about iostreams and such (anyone using iostreams on WinCE,
instead of using the lower level API is probably going in the wrong
direction anyway).

Also, many things weren't available on earlier WinCE versions that are
now on recent versions, so there's the risk of implementing too much
and make the programs not compatible for the future.

And, most of the missing "standard" C runtime functions are
implemented in the MFC libraries, so a latter support for MFC
applications compiled with mingw32ce could become messy if we do too
much now.

I don't mind having a separate helper library for mingw32ce but, for
me, anyone using errno with mingw32ce will always get into trouble
latter (there's no way to correctly map the errno errors with the
GetLastError() results).


Just my 2 cents,
~Nuno Lucas

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to