diff --git a/src/backend/nls.mk b/src/backend/nls.mk
index e053fe508406ebadd1bcb89833a129a5b059aa34..42981290b95059099111032df1344790cca22cbe 100644
--- a/src/backend/nls.mk
+++ b/src/backend/nls.mk
@@ -1,4 +1,4 @@
-# $PostgreSQL: pgsql/src/backend/nls.mk,v 1.15 2004/08/11 09:00:27 petere Exp $
+# $PostgreSQL: pgsql/src/backend/nls.mk,v 1.16 2004/11/27 22:44:10 petere Exp $
 CATALOG_NAME	:= postgres
 AVAIL_LANGUAGES	:= af cs de es fr hr hu it nb pt_BR ru sk sv tr zh_CN zh_TW
 GETTEXT_FILES	:= + gettext-files
@@ -7,7 +7,7 @@ GETTEXT_FILES	:= + gettext-files
 GETTEXT_TRIGGERS:= errmsg errdetail errhint errcontext write_stderr yyerror
 
 gettext-files: distprep
-	find $(srcdir)/ -name '*.c' -print >$@
+	find $(srcdir)/ $(srcdir)/../port/ -name '*.c' -print >$@
 
 my-maintainer-clean:
 	rm -f gettext-files
diff --git a/src/bin/initdb/nls.mk b/src/bin/initdb/nls.mk
index acf1659c82776bd7e8abf0f3226c745ca4105dd9..56bea55121e3a4030fb295b824d3e5cff059ab29 100644
--- a/src/bin/initdb/nls.mk
+++ b/src/bin/initdb/nls.mk
@@ -1,5 +1,5 @@
-# $PostgreSQL: pgsql/src/bin/initdb/nls.mk,v 1.15 2004/11/16 22:43:48 petere Exp $
+# $PostgreSQL: pgsql/src/bin/initdb/nls.mk,v 1.16 2004/11/27 22:44:11 petere Exp $
 CATALOG_NAME	:= initdb
 AVAIL_LANGUAGES	:= cs de es fr it pt_BR ro ru sk sl sv tr zh_CN zh_TW
-GETTEXT_FILES	:= initdb.c
+GETTEXT_FILES	:= initdb.c ../../port/dirmod.c ../../port/exec.c
 GETTEXT_TRIGGERS:= _ simple_prompt
diff --git a/src/bin/pg_config/nls.mk b/src/bin/pg_config/nls.mk
index 65c285241754b826e49cf5d9875f6f55249456b1..f60857622a04ca18d94aa05e8823044d198a238c 100644
--- a/src/bin/pg_config/nls.mk
+++ b/src/bin/pg_config/nls.mk
@@ -1,5 +1,5 @@
-# $PostgreSQL: pgsql/src/bin/pg_config/nls.mk,v 1.11 2004/11/23 23:13:07 petere Exp $
+# $PostgreSQL: pgsql/src/bin/pg_config/nls.mk,v 1.12 2004/11/27 22:44:12 petere Exp $
 CATALOG_NAME	:= pg_config
 AVAIL_LANGUAGES	:= cs de es fr pt_BR ro ru sl sv tr zh_TW
-GETTEXT_FILES	:= pg_config.c
+GETTEXT_FILES	:= pg_config.c ../../port/exec.c
 GETTEXT_TRIGGERS:= _
diff --git a/src/bin/pg_ctl/nls.mk b/src/bin/pg_ctl/nls.mk
index 23f7bba9176610d9e29479094b64f1a5e099a995..a915ffbd133f89f59b84799b4f5e96ee585d27a4 100644
--- a/src/bin/pg_ctl/nls.mk
+++ b/src/bin/pg_ctl/nls.mk
@@ -1,5 +1,5 @@
-# $PostgreSQL: pgsql/src/bin/pg_ctl/nls.mk,v 1.13 2004/11/23 23:13:18 petere Exp $
+# $PostgreSQL: pgsql/src/bin/pg_ctl/nls.mk,v 1.14 2004/11/27 22:44:13 petere Exp $
 CATALOG_NAME	:= pg_ctl
 AVAIL_LANGUAGES	:= cs de es fr pt_BR ro ru sk sl sv tr zh_CN zh_TW
-GETTEXT_FILES	:= pg_ctl.c
+GETTEXT_FILES	:= pg_ctl.c ../../port/exec.c
 GETTEXT_TRIGGERS:= _ simple_prompt
diff --git a/src/bin/pg_dump/nls.mk b/src/bin/pg_dump/nls.mk
index 945ba04527d541b8937550beaa6085bbd0f8482f..54c1fcd6265aca9ee29945aabeb55e44d438063a 100644
--- a/src/bin/pg_dump/nls.mk
+++ b/src/bin/pg_dump/nls.mk
@@ -1,8 +1,9 @@
-# $PostgreSQL: pgsql/src/bin/pg_dump/nls.mk,v 1.17 2004/11/18 10:09:58 petere Exp $
+# $PostgreSQL: pgsql/src/bin/pg_dump/nls.mk,v 1.18 2004/11/27 22:44:13 petere Exp $
 CATALOG_NAME	:= pg_dump
 AVAIL_LANGUAGES	:= cs de es fr it nb pt_BR ro ru sk sl sv tr zh_CN zh_TW
 GETTEXT_FILES	:= pg_dump.c common.c pg_backup_archiver.c pg_backup_custom.c \
                    pg_backup_db.c pg_backup_files.c pg_backup_null.c \
-                   pg_backup_tar.c pg_restore.c pg_dumpall.c
+                   pg_backup_tar.c pg_restore.c pg_dumpall.c \
+                   ../../port/exec.c
 GETTEXT_TRIGGERS:= write_msg:2 die_horribly:3 exit_horribly:3 simple_prompt \
                    ExecuteSqlCommand:3 ahlog:3 _
diff --git a/src/bin/psql/nls.mk b/src/bin/psql/nls.mk
index 9ca4a7e8d32879fc7baaeda1f9afc8dcd8dc9088..6e7f56d1b674144fba75406b052d0a78ec4a43ee 100644
--- a/src/bin/psql/nls.mk
+++ b/src/bin/psql/nls.mk
@@ -1,6 +1,7 @@
-# $PostgreSQL: pgsql/src/bin/psql/nls.mk,v 1.19 2004/11/07 23:38:15 petere Exp $
+# $PostgreSQL: pgsql/src/bin/psql/nls.mk,v 1.20 2004/11/27 22:44:14 petere Exp $
 CATALOG_NAME	:= psql
 AVAIL_LANGUAGES	:= cs de es fa fr hu it nb pt_BR ro ru sk sl sv tr zh_CN zh_TW
 GETTEXT_FILES	:= command.c common.c copy.c help.c input.c large_obj.c \
-                   mainloop.c print.c startup.c describe.c sql_help.h
+                   mainloop.c print.c startup.c describe.c sql_help.h \
+                   ../../port/exec.c
 GETTEXT_TRIGGERS:= _ N_ psql_error simple_prompt
diff --git a/src/port/dirmod.c b/src/port/dirmod.c
index 0443b600e1c32fb06753a989e836bb38fb069f7c..445fd95fa14b93594a69fd6bbac8eba6d4aff741 100644
--- a/src/port/dirmod.c
+++ b/src/port/dirmod.c
@@ -10,7 +10,7 @@
  *	Win32 (NT, Win2k, XP).	replace() doesn't work on Win95/98/Me.
  *
  * IDENTIFICATION
- *	  $PostgreSQL: pgsql/src/port/dirmod.c,v 1.32 2004/10/28 22:09:31 tgl Exp $
+ *	  $PostgreSQL: pgsql/src/port/dirmod.c,v 1.33 2004/11/27 22:44:15 petere Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -40,8 +40,6 @@
 #endif
 #endif
 
-#define _(x) gettext((x))
-
 #ifndef FRONTEND
 
 /*
@@ -74,7 +72,7 @@ fe_palloc(Size size)
 
 	if ((res = malloc(size)) == NULL)
 	{
-		fprintf(stderr, _("out of memory\n"));
+		fprintf(stderr, gettext("out of memory\n"));
 		exit(1);
 	}
 	return res;
@@ -87,7 +85,7 @@ fe_pstrdup(const char *string)
 
 	if ((res = strdup(string)) == NULL)
 	{
-		fprintf(stderr, _("out of memory\n"));
+		fprintf(stderr, gettext("out of memory\n"));
 		exit(1);
 	}
 	return res;
@@ -100,7 +98,7 @@ fe_repalloc(void *pointer, Size size)
 
 	if ((res = realloc(pointer, size)) == NULL)
 	{
-		fprintf(stderr, _("out of memory\n"));
+		fprintf(stderr, gettext("out of memory\n"));
 		exit(1);
 	}
 	return res;
diff --git a/src/port/exec.c b/src/port/exec.c
index 28b25c4b7f99ac99ec5a3b1066f601ed6c573bce..19ab92a07253c641756858e1ec303bb1f879b8ce 100644
--- a/src/port/exec.c
+++ b/src/port/exec.c
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *	  $PostgreSQL: pgsql/src/port/exec.c,v 1.32 2004/11/06 23:06:29 tgl Exp $
+ *	  $PostgreSQL: pgsql/src/port/exec.c,v 1.33 2004/11/27 22:44:15 petere Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -28,8 +28,6 @@
 #include <unistd.h>
 #endif
 
-#define _(x) gettext(x)
-
 #ifndef S_IRUSR					/* XXX [TRH] should be in a header */
 #define S_IRUSR		 S_IREAD
 #define S_IWUSR		 S_IWRITE
@@ -192,7 +190,7 @@ find_my_exec(const char *argv0, char *retpath)
 
 	if (!getcwd(cwd, MAXPGPATH))
 	{
-		log_error(_("could not identify current directory: %s"),
+		log_error(gettext("could not identify current directory: %s"),
 				  strerror(errno));
 		return -1;
 	}
@@ -306,7 +304,7 @@ resolve_symlinks(char *path)
 	 */
 	if (!getcwd(orig_wd, MAXPGPATH))
 	{
-		log_error(_("could not identify current directory: %s"),
+		log_error(gettext("could not identify current directory: %s"),
 				  strerror(errno));
 		return -1;
 	}
@@ -322,7 +320,7 @@ resolve_symlinks(char *path)
 			*lsep = '\0';
 			if (chdir(path) == -1)
 			{
-				log_error(_("could not change directory to \"%s\""), path);
+				log_error(gettext("could not change directory to \"%s\""), path);
 				return -1;
 			}
 			fname = lsep + 1;
@@ -337,7 +335,7 @@ resolve_symlinks(char *path)
 		rllen = readlink(fname, link_buf, sizeof(link_buf));
 		if (rllen < 0 || rllen >= sizeof(link_buf))
 		{
-			log_error(_("could not read symbolic link \"%s\""), fname);
+			log_error(gettext("could not read symbolic link \"%s\""), fname);
 			return -1;
 		}
 		link_buf[rllen] = '\0';
@@ -349,7 +347,7 @@ resolve_symlinks(char *path)
 
 	if (!getcwd(path, MAXPGPATH))
 	{
-		log_error(_("could not identify current directory: %s"),
+		log_error(gettext("could not identify current directory: %s"),
 				  strerror(errno));
 		return -1;
 	}
@@ -358,7 +356,7 @@ resolve_symlinks(char *path)
 
 	if (chdir(orig_wd) == -1)
 	{
-		log_error(_("could not change directory to \"%s\""), orig_wd);
+		log_error(gettext("could not change directory to \"%s\""), orig_wd);
 		return -1;
 	}
 
@@ -568,13 +566,13 @@ pclose_check(FILE *stream)
 		perror("pclose failed");
 	}
 	else if (WIFEXITED(exitstatus))
-		log_error(_("child process exited with exit code %d"),
+		log_error(gettext("child process exited with exit code %d"),
 				  WEXITSTATUS(exitstatus));
 	else if (WIFSIGNALED(exitstatus))
-		log_error(_("child process was terminated by signal %d"),
+		log_error(gettext("child process was terminated by signal %d"),
 				  WTERMSIG(exitstatus));
 	else
-		log_error(_("child process exited with unrecognized status %d"),
+		log_error(gettext("child process exited with unrecognized status %d"),
 				  exitstatus);
 
 	return -1;