Re: Compiling on Solaris with Sun compiler

Поиск
Список
Период
Сортировка
От Lee Kindness
Тема Re: Compiling on Solaris with Sun compiler
Дата
Msg-id 15317.14425.498314.80792@elsick.csl.co.uk
обсуждение исходный текст
Ответ на Re: Compiling on Solaris with Sun compiler  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Compiling on Solaris with Sun compiler  (Lee Kindness <lkindness@csl.co.uk>)
Список pgsql-hackers
Peter Eisentraut writes:> Lee Kindness writes:> > Touche, but the man page for the front-end (plain old cc) doesn't
list>> options and only refers to the acc man page ;)> Well, I'm stumped.  All the Solaris compilers I've ever seen did
support>and document the -Wl option.
 

Well I never submitted my patch for building using the Sun compilers
since I thought that the newer versions did support the -Wl
option - I'm using an old (version 4) Sun compiler. However it seems
that Denis it using revision 2 of the latest version 6 compiler!
> > After a simple './configure' on a stock Solaris 2.6 box the> > compilation of interfaces/ecpg/lib/execute.c fails
dueto the macro> > definition of 'gettext' to ''. This macro is invoked on the prototype> > of gettext() in libintl.h
(includedvia locale.h).> Fail how and why?
 

Well in c.h there is the following define:
#ifdef ENABLE_NLS#include <libintl.h>#else#define gettext(x) (x)#endif#define gettext_noop(x) (x)

so gettext() simply is the supplied parameter if --enable-nls is not
supplied. However ecpg/execute.c has the following includes:
#include "postgres_fe.h"#include <stdio.h>#include <locale.h>

Via postgres_fe.h gettext() gets defined as above. However locale.h
also pulls in the systems libintl.h which has the following prototype:
extern char *gettext();

which the preprocessor changes to:
extern char *();

due to the gettext define in c.h. Naturally this makes the build
fail.

Configuring with --enable-nls gets round this but I don't require that
functionality.

Regards, Lee Kindness.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] To Postgres Devs : Wouldn't changing the selectlimit
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: [GENERAL] To Postgres Devs : Wouldn't changing the