[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Limitations of standard C, formal interfaces, and othermusings. Was: ms-level timings
- From: David Given <dg@...>
- Date: Fri, 06 Aug 2004 02:13:33 +0100
Brian Hook wrote:
One thing to keep in mind is that the C standard differentiates
between a "hosted" and a "freestanding" implementation. You can stil
be compliant C and lack things like stdio, etc. It's effectively just
the language and some predefined symbols at that point. I'm not sure
if Lua would run in such an environment, but I don't see why it
couldn't.
I don't know if it's relevant, but the embedded system I'm using Lua on
has some interesting properties that are causing me problems: in
particular, no globals --- but the stdin, stdout and stderr symbols are
reserved and cannot be overridden.
This basically means that lbaselib.c and liolib.c don't compile. I've
had to patch the source code to remove the references to the above
symbols. This was annoying.
If you want a piece of C code to work *anywhere*, the list of
assumptions you can make is scarily small...
(Would the patch be of any use to anyone?)
--
[insert interesting .sig here]