Re: [HACKERS] problem compiling 6.5 cvs (Linux, gcc 2.7.2, egcs 1.12) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] problem compiling 6.5 cvs (Linux, gcc 2.7.2, egcs 1.12)
Date
Msg-id 13457.926433355@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] problem compiling 6.5 cvs (Linux, gcc 2.7.2, egcs 1.12)  (gjerde@icebox.org)
Responses Re: [HACKERS] problem compiling 6.5 cvs (Linux, gcc 2.7.2, egcs 1.12)
List pgsql-hackers
gjerde@icebox.org writes:
> But with redhat 6.0(egcs 1.1.2, glibc 2.1) I'm having one problem.
> psql doesn't compile :)
> psql.c:152: initializer element is not constant
> which is 
> static FILE * cur_cmd_source = stdin;

> I don't believe I have ever seen that error, and I don't know why it has
> problems with that line.

You have a broken compiler IMHO --- on any reasonable system, stdin
should be a load-time constant address, and load-time constants are
required by the standard to be acceptable initializers for statics.
Either stdin is defined in a very peculiar way, or the compiler is
incapable of handling non-compile-time-constant initializers.  In
either case it's gonna fail on a lot more things than just Postgres.

However, it's easy enough to work around it (as you noted in your
followup).  I'll commit the change.


Re Oleg's original complaint: I'm not seeing any problem with a
CVS fileset that I pulled afresh on Saturday morning.  I think
he somehow got a corrupted copy...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Beta2?
Next
From: Thomas Lockhart
Date:
Subject: Re: [HACKERS] Date/Time Flaw in pg_dump ?