Re: Work for developers
On Mon, Aug 31, 1998 at 09:53:37PM -0500, John Goerzen wrote:
> Stephen Zander <gibreel@pobox.com> writes:
>
> > >>>>> "John" == John Goerzen <jgoerzen@complete.org> writes:
> > John> What exactly is the problem?
> >
> > John> stdin should always be present before it starts running your
> > John> code, and there's no const up there.
> >
> > Under glibc2.1, stdin isn't a variable. it's a function call, a la
> > errno in glibc2.0.
>
> Whoa, that seems to be rather stupid. But in any case, still, you can
> initialize variables to function calls, no?
Not in a global. Something like:
FILE *output = stderr;
main()
{}
There is a way to do it, which involves GCC constructors; I don't
recall it off the top of my head.
Dan
Reply to: