Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Duplicate definition of LOCALEDIR

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Duplicate definition of LOCALEDIR
Date: 2006-05-23 01:25:42
Message-ID: 200605230125.k4N1Pgg01876@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Tom Lane wrote:
> Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> > The odd thing is that there are two paths defined, $localedir and
> > $exp_localedir, which are not the same and pg_config.h gets one and
> > pg_config_paths.h gets the other.
> 
> It looks to me like $localedir is literally "${prefix}/share/locale",
> while exp_localedir has the full path (ie, the expanded contents of
> $prefix).  Better be careful about assuming they are redundant.
> 
> The correct solution to this might be to rename the downstream
> variables to make it clearer what's what.

The pg_config_paths.h file was added by me to give files access to
configure paths, in part to allow relocation of install files.

Looking at LOCALEDIR in the two include files, I realize one uses prefix
while another optionally uses $ac_default_prefix, but if LOCALEDIR were
different in the two cases, "NONE" would be prepended to one of them.

I have attached a patch that removes the LOCALEDIR from pg_config.h, and
changed fe-misc.c to make use of the pg_config_paths.h define.  I think
this is appropriate only for CVS HEAD.

We have not seen warnings about the two defines only because they are
always define the same.

-- 
  Bruce Momjian   http://candle.pha.pa.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

In response to

Responses

pgsql-hackers by date

Next:From: Jeff FrostDate: 2006-05-23 03:59:30
Subject: Re: does wal archiving block the current client connection?
Previous:From: Bruno Wolff IIIDate: 2006-05-22 23:57:42
Subject: Re: group by points

pgsql-patches by date

Next:From: Qingqing ZhouDate: 2006-05-23 10:28:39
Subject: Trivial fix of printing pointer
Previous:From: Andrew DunstanDate: 2006-05-22 22:57:18
Subject: Re: plperl - make $_TD global

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group