From: | Lee Kindness <lkindness(at)csl(dot)co(dot)uk> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Lee Kindness <lkindness(at)csl(dot)co(dot)uk>, Denis A Ustimenko <denis(at)oldham(dot)ru>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Compiling on Solaris with Sun compiler |
Date: | 2001-10-23 09:28:57 |
Message-ID: | 15317.14425.498314.80792@elsick.csl.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 due to the macro
> > definition of 'gettext' to ''. This macro is invoked on the prototype
> > of gettext() in libintl.h (included via 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Bill Studenmund | 2001-10-23 10:34:29 | Re: [HACKERS] CREATE OR REPLACE VIEW/TRIGGER |
Previous Message | Reiner Dassing | 2001-10-23 07:01:04 | Re: Index of a table is not used (in any case) |