summaryrefslogtreecommitdiff
path: root/src/port
diff options
context:
space:
mode:
Diffstat (limited to 'src/port')
-rw-r--r--src/port/dirmod.c10
-rw-r--r--src/port/exec.c22
2 files changed, 14 insertions, 18 deletions
diff --git a/src/port/dirmod.c b/src/port/dirmod.c
index 0443b600e1..445fd95fa1 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 28b25c4b7f..19ab92a072 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;