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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] problem compiling 6.5 cvs (Linux, gcc 2.7.2, egcs 1.12)
Дата
Msg-id 13457.926433355@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] problem compiling 6.5 cvs (Linux, gcc 2.7.2, egcs 1.12)  (gjerde@icebox.org)
Ответы Re: [HACKERS] problem compiling 6.5 cvs (Linux, gcc 2.7.2, egcs 1.12)  (Oleg Bartunov <oleg@sai.msu.su>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Beta2?
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: [HACKERS] Date/Time Flaw in pg_dump ?