This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: BUG: stdin not a constant (fwd)
- To: gnu-win32 at cygnus dot com
- Subject: Re: BUG: stdin not a constant (fwd)
- From: ANAZAWA Akio <anazawa at hic-soft dot co dot jp>
- Date: Thu, 4 Dec 1997 17:21:20 +0900 (JST)
- CC: petdr at students dot cs dot mu dot oz dot au
- References: <199712040054.LAA26717@rimmer.cs.mu.OZ.AU>
Hi, Peter.
In message "BUG: stdin not a constant (fwd)"
on 97/12/04, Peter David ROSS <petdr@students.cs.mu.oz.au> writes:
Peter> The fix is to remove the initialiser and add the line which is
Peter> commented out.
Peter> However the code I am trying to port has these sort of
Peter> variables spread all over the place, and I would like to know
Peter> if there is someway I can get the compiler to treat it as a
Peter> constant.
One of very limited solution could be...
#include <stdio.h>
/* static FILE *out = stdout; */
#define out stdout
void main(void)
{
/* out = stdout; */
fprintf(out, "hello world\n");
}
Anyway, I'm worndering why Cygnus's gcc couldn't accept Peter's code.
All of other portings of gcc (and others) that I can use around here
accepted it (gcc 2.7.0 on SPARC, 2.6.3 on FreeBSD, Sun's workshop cc,
VC++ 4.2 and 5.0).
--
@___ anazawa@hic-soft.co.jp
c>//_ --- Human Interface Communications Co.,Ltd.(H.I.C.)
(_)\(_) --- Phone +81 3 5467 2401 / Fax +81 3 5467 2402
------------------------------------------------------------------------
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".