From: khan@xraylith.wisc.edu (Mumit Khan)
Subject: Re: Non-static initializers in X11R6.4
9 Jan 1999 00:34:44 -0800
Message-ID: <199901090707.BAA09754.cygnus.gnu-win32@modi.xraylith.wisc.edu>
References: <852566F3.006E6ACA.00@D51MTA10.pok.ibm.com>
To: setera@us.ibm.com
Cc: gnu-win32@cygnus.com

setera@us.ibm.com writes:
> 
> I'm trying to build X11R6.4 on my own using Sergey's patches.  On a number
> of the programs (such as the xkb*), I get errors that I'm trying to use
> non-static initializers of the form outside the scope of a function:
> 
> FILE *yyin = stdout;
> 
> Is there any way to get the compiler to just handle these?  I would assume
> if there was code changes that they would have been Sergey's patches.

Ah, the joys of dealing with non-portable code! This is in fact a common
problem with lots of existing code (shows up in the output of older
versions of lex as well).

ANSI C doesn't guarantee that stdout/in/err are going to be manifest
constants that will allow the above construct. It however is well
formed C++ code. Perhaps Sergey can shed some light on what he did
to make it all work.

Regards,
Mumit

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
