Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 2aa8d0a

Browse files
committed
Might want to initialize the gettext library, if we're going to do all that
translation work.
1 parent a465f24 commit 2aa8d0a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/bin/pg_config/pg_config.c

+8-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
1919
*
20-
* $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.8 2004/10/10 23:37:34 neilc Exp $
20+
* $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.9 2004/10/18 22:19:00 petere Exp $
2121
*
2222
*-------------------------------------------------------------------------
2323
*/
@@ -28,7 +28,7 @@
2828

2929
#define _(x) gettext((x))
3030

31-
static char *progname;
31+
static const char *progname;
3232

3333
static void
3434
help(void)
@@ -44,8 +44,8 @@ help(void)
4444
printf(_(" --libdir show location of object code libraries\n"));
4545
printf(_(" --pkglibdir show location of dynamically loadable modules\n"));
4646
printf(_(" --pgxs show location of extension makefile\n"));
47-
printf(_(" --configure show options given to 'configure' script when\n"
48-
" PostgreSQL was built\n"));
47+
printf(_(" --configure show options given to \"configure\" script when\n"
48+
" PostgreSQL was built\n"));
4949
printf(_(" --version show the PostgreSQL version, then exit\n"));
5050
printf(_(" --help show this help, then exit\n\n"));
5151
printf(_("Report bugs to <pgsql-bugs@postgresql.org>.\n"));
@@ -66,7 +66,9 @@ main(int argc, char **argv)
6666
char mypath[MAXPGPATH];
6767
char otherpath[MAXPGPATH];
6868

69-
progname = (char *) get_progname(argv[0]);
69+
set_pglocale_pgservice(argv[0], "pg_config");
70+
71+
progname = get_progname(argv[0]);
7072

7173
if (argc < 2)
7274
{
@@ -108,7 +110,7 @@ main(int argc, char **argv)
108110

109111
if (ret)
110112
{
111-
fprintf(stderr, "%s: could not locate my own executable\n", progname);
113+
fprintf(stderr, _("%s: could not find own executable\n"), progname);
112114
exit(1);
113115
}
114116

0 commit comments

Comments
 (0)