Non-static initializers in X11R6.4

Mumit Khan khan@xraylith.wisc.edu
Sun Jan 31 23:52:00 GMT 1999


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



More information about the Cygwin mailing list