Subject: Re: Non-static initializers in X11R6.4
From: [email-masked] (Mumit Khan)

9 Jan 1999 00:34:44 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
To: [email-masked]
Cc: [email-masked]

[email-masked] 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
"[email-masked]" with one line of text: "help".