This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: BUG: stdin not a constant (fwd)


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".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]