|
![](/i/fill.gif) |
Thorsten Froehlich wrote:
> In article <40e6ae1c@news.povray.org> , Wolfgang Wieser <wwi### [at] gmx de>
> wrote:
>
>> This is probably a bad idea. It looks like __STDC_VERSION__ is
>> significantly larger than 128. Some UNIX systems use only 1 byte to store
>> the exit code of a program and hence, this will fail on these systems.
>
> Then those systems are not compatible even with ANSI C. -- Too bad, we do
> not support such outdated systems!
>
Maybe you could even tell us where you found this information.
I just looked up "ANSI C Rationale 4.11",
Section "4.10.4.5 The system function" which states:
-------------------
The system function allows a program to suspend its execution temporarily in
order to run another program to completion.
Information may be passed to the called program in three ways: through
command-line argument strings, through the environment, and (most portably)
through data files. Before calling the system function, the calling
program should close all such data files.
Information may be returned from the called program in two ways: through the
implementation-defined return value (in many implementations, the
termination status code which is the argument to the exit function is
returned by the implementation to the caller as the value returned by the
system function), and (most portably) through data files.
-----------------
It mentiones an "implementation-defined return value".
So, I see no violation of the ANSI C standard when looking at the
current system() implementations in several UNIX(like) OS.
Wolfgang
Post a reply to this message
|
![](/i/fill.gif) |