Re: [HACKERS] problem compiling 6.5 cvs (Linux, gcc 2.7.2, egcs 1.12)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: gjerde(at)icebox(dot)org
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] problem compiling 6.5 cvs (Linux, gcc 2.7.2, egcs 1.12)
Date: 1999-05-11 14:35:55
Message-ID: 13457.926433355@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

gjerde(at)icebox(dot)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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 1999-05-11 14:42:13 Re: [HACKERS] Date/Time Flaw in pg_dump ?
Previous Message Tom Lane 1999-05-11 14:20:06 Re: [HACKERS] Beta2?