POV-Ray : Newsgroups : povray.unix : [beta] source distribution of POV-Ray 3.6 for UNIX : Re: [beta] source distribution of POV-Ray 3.6 for UNIX Server Time
8 Jul 2024 15:36:44 EDT (-0400)
  Re: [beta] source distribution of POV-Ray 3.6 for UNIX  
From: Thorsten Froehlich
Date: 3 Jul 2004 15:05:24
Message: <40e70374@news.povray.org>
In article <40e6ece2@news.povray.org> , Wolfgang Wieser <wwi### [at] gmxde>  
wrote:

> #include <sys/wait.h>
> int main(int ac, char **av)
> {
>   int rv=system("./test2");
>   printf("Result: %x %x\n", rv,WEXITSTATUS(rv));

This is not a portable ANSI/ISO C program.  It is an operating system
specific C program:  The include file "sys/wait.h" is system specific, as is
the function/macro WEXITSTATUS.  As such, your example is specific to your
operating system, of which you already stated that it has a limitation
regarding the return value range of an ANSI/ISO C program by reading the man
page of the functions/macros you are using.  Hence, your example contributed
nothing to this discussion you did not already say.  Contrary to you, I did
provide two fully portable ANSI/ISO C programs which work exactly as I said
on the operating systems I specified.

    Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.