Just wanted to quote an amuzing experience I had in the single haifux 
club meeting I attended. I made a comment about something only working 
on Linux, and having to use X in order to make it Unix compatible, and 
got bemused looks from everyone around me saying "This is a Linux 
meeting". Sigh.

Some people are too narrowminded.

            Shachar


Nadav Har'El wrote:

>On Thu, Apr 04, 2002, mulix wrote about "Re: c question":
>
>>On Thu, Apr 04, 2002 at 06:17:16PM +0300, Nadav Har'El wrote:
>>      stdout = fopen("/my/logging/file"); 
>>      stderr = fopen("/my/other/logging/file");
>>
>
>Ok, I get your point. I don't remember seeing any program doing something
>like that, but I guess it's conceivable, and that using fileno() might be a
>wise idea.
>
>
>One last point though: it is not portable to assign to stdout, etc. like
>you showed above. In Linux you can do this, because stdout is defined as
>
>       extern FILE *stdout;            /* Standard output stream.  */
>
>but in other UNIX systems you can't. For example, in Solaris (8, at least),
>and in all AT&T-based systems I knew, stdout is defined as
>       #define stdout  (&__iob[1])
>
>And you obviously cannot assign to this. You may, perhaps, do
>       *stdout=*fopen(...);
>but that is really funky and again non-portable; Instead, the portably ANSI-
>C solution is to use the freopen() function.
>



=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to