From cd8b0fc5f19e0369d211f01a0eb3201f69977b52 Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Tue, 8 Jun 2004 13:49:23 +0000
Subject: [PATCH] Change PGETC to PGSYSCONFDIR and PGLOCALE to PGLOCALEDIR, per
 Peter.

---
 doc/src/sgml/libpq.sgml           | 10 +++++-----
 src/interfaces/libpq/fe-connect.c |  4 ++--
 src/interfaces/libpq/fe-misc.c    |  4 ++--
 src/port/path.c                   | 12 ++++++------
 4 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index be669715c08..5b94442238a 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -1,5 +1,5 @@
 <!--
-$PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.156 2004/06/03 00:07:35 momjian Exp $
+$PostgreSQL: pgsql/doc/src/sgml/libpq.sgml,v 1.157 2004/06/08 13:49:22 momjian Exp $
 -->
 
  <chapter id="libpq">
@@ -3585,18 +3585,18 @@ sets the default mode for the genetic query optimizer.
 <listitem>
 <para>
 <indexterm>
- <primary><envar>PGETC</envar></primary>
+ <primary><envar>PGSYSCONFDIR</envar></primary>
 </indexterm>
-<envar>PGETC</envar>
+<envar>PGSYSCONFDIR</envar>
 sets the directory containing the <filename>pg_service.conf</> file.
 </para>
 </listitem>
 <listitem>
 <para>
 <indexterm>
- <primary><envar>PGLOCALE</envar></primary>
+ <primary><envar>PGLOCALEDIR</envar></primary>
 </indexterm>
-<envar>PGLOCALE</envar>
+<envar>PGLOCALEDIR</envar>
 sets the directory containing the <literal>locale</> files.
 </para>
 </listitem>
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 1e3379ef651..f741509d080 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.272 2004/06/03 00:07:38 momjian Exp $
+ *	  $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.273 2004/06/08 13:49:23 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -2387,7 +2387,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
 	 *	location to find our config files.
 	 */	
 	snprintf(serviceFile, MAXPGPATH, "%s/pg_service.conf",
-			 getenv("PGETC") ? getenv("PGETC") : SYSCONFDIR);
+			 getenv("PGSYSCONFDIR") ? getenv("PGSYSCONFDIR") : SYSCONFDIR);
 
 	if (service != NULL)
 	{
diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c
index 1d1a2795601..3a0d416f263 100644
--- a/src/interfaces/libpq/fe-misc.c
+++ b/src/interfaces/libpq/fe-misc.c
@@ -23,7 +23,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *	  $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.107 2004/06/03 00:07:38 momjian Exp $
+ *	  $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.108 2004/06/08 13:49:23 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1132,7 +1132,7 @@ libpq_gettext(const char *msgid)
 	{
 		already_bound = 1;
 		/* No relocatable lookup here because the binary could be anywhere */
-		bindtextdomain("libpq", getenv("PGLOCALE") ? getenv("PGLOCALE") : LOCALEDIR);
+		bindtextdomain("libpq", getenv("PGLOCALEDIR") ? getenv("PGLOCALEDIR") : LOCALEDIR);
 	}
 
 	return dgettext("libpq", msgid);
diff --git a/src/port/path.c b/src/port/path.c
index 1256b09a500..7e6f5b4b737 100644
--- a/src/port/path.c
+++ b/src/port/path.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  $PostgreSQL: pgsql/src/port/path.c,v 1.17 2004/06/03 00:07:38 momjian Exp $
+ *	  $PostgreSQL: pgsql/src/port/path.c,v 1.18 2004/06/08 13:49:23 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -233,7 +233,7 @@ set_pglocale_pgservice(const char *argv0, const char *app)
 {
 	char path[MAXPGPATH];
 	char my_exec_path[MAXPGPATH];
-	char env_path[MAXPGPATH + strlen("PGLOCALE=")]; /* longer than PGETC */
+	char env_path[MAXPGPATH + strlen("PGLOCALEDIR=")]; /* longer than PGSYSCONFDIR */
 
 	/* don't set LC_ALL in the backend */
 	if (strcmp(app, "postgres") != 0)
@@ -247,20 +247,20 @@ set_pglocale_pgservice(const char *argv0, const char *app)
 	bindtextdomain(app, path);
 	textdomain(app);
 
-	if (!getenv("PGLOCALE"))
+	if (!getenv("PGLOCALEDIR"))
 	{
 		/* set for libpq to use */
-		sprintf(env_path, "PGLOCALE=%s", path);
+		sprintf(env_path, "PGLOCALEDIR=%s", path);
 		putenv(env_path);
 	}
 #endif
 
-	if (!getenv("PGETC"))
+	if (!getenv("PGSYSCONFDIR"))
 	{
 		get_etc_path(my_exec_path, path);
 	
 		/* set for libpq to use */
-		sprintf(env_path, "PGETC=%s", path);
+		sprintf(env_path, "PGSYSCONFDIR=%s", path);
 		putenv(env_path);
 	}
 }
-- 
GitLab