On Fri, Jan 25, 2002 at 11:14:38PM -0500, Melvin Smith wrote:
> Nope, it isn't defined. Why I mentioned it is I was working on
> compiling for WindowsCE for an iPAQ and <errno.h> was included
> regardless of config. WinCE SDK doesn't have errno.h (I can fake it though)
> but I figured it we should have an ifdef around the include.

Bletch. Unless I'm much mistaken that means that WinCE SDK therefore isn't
a full ANSI conformant C library. [Which it is allowed to be - IIRC
compilers without libraries are "allowed"]
I can't remember all the terms for compilers that are conformant but don't
have the libraries but I am surprised that the SDK isn't a full implementation
of compiler&libraries.

Part of me therefore thinks that NOT putting an ifdef around the include
and having other systems fake errno.h if they need to.

> Basically for embedded environments I have to fudge stuff because the
> config runs, for example, on my Win2000 box where I have Microsoft
> Embedded Visual Tools, but it generates a config for Win32 (not for WinCE).
> I then was just hand patching to fix stuff.

This is the start of a more generate cross compiling problem, isn't it?

> I just wasnt sure how to address this; I added the ifdef HAS_HEADER_ERRNO
> to get a compile but if I committed this patch then everyone else's would
> break because, while 99% of systems have <errno.h>, the #define wont exist.
> 
> I guess what I _could_ do is:
> 
> #ifndef WIN32_PLATFORM_PSPC   /* PocketPC */
> #       include <errno.h>
> #endif
> 
> But I don't think this was the way to fix this.

That doesn't feel right either.

Nicholas Clark
-- 
ENOCHOCOLATE http://www.ccl4.org/~nick/CV.html

Reply via email to