[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
OS/2 Patches (4)
From: |
Andreas Buening |
Subject: |
OS/2 Patches (4) |
Date: |
Mon, 04 Nov 2002 20:55:14 +0100 |
Hello!
Here's the last part:
---------------------------
--- old/gettext-0.11.5/src/msgfilter.c Tue Apr 23 11:33:34 2002
+++ gnu/gettext-0.11.5/src/msgfilter.c Sat Oct 19 21:05:48 2002
@@ -37,7 +37,7 @@
#endif
/* Get fd_set. */
-#ifdef _AIX
+#if defined(_AIX) || defined(__EMX__)
# include <sys/select.h>
#endif
---------------------------
It's a bad idea to redefine symbols from a library in a program,
program_name, to be exactly. I renamed it to local_program_name.
---------------------------
--- old/gettext-0.11.5/tests/tstgettext.c Mon Apr 29 17:25:22 2002
+++ gnu/gettext-0.11.5/tests/tstgettext.c Sat Oct 12 23:39:50 2002
@@ -48,7 +48,7 @@
int do_expand;
/* Name the program is called with. */
-const char *program_name;
+const char *local_program_name;
/* Long options. */
static const struct option long_options[] =
@@ -89,9 +89,9 @@
do_expand = 0;
/* Set program name for message texts. */
- program_name = argv[0];
- if (strncmp (program_name, "lt-", 3) == 0)
- program_name += 3;
+ local_program_name = argv[0];
+ if (strncmp (local_program_name, "lt-", 3) == 0)
+ local_program_name += 3;
#ifdef HAVE_SETLOCALE
/* Set locale via LC_ALL. */
@@ -156,7 +156,7 @@
/* Version information is requested. */
if (do_version)
{
- printf ("%s (GNU %s) %s\n", basename (program_name), PACKAGE, VERSION);
+ printf ("%s (GNU %s) %s\n", basename (local_program_name), PACKAGE,
VERSION);
/* xgettext: no-wrap */
printf (_("Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
@@ -264,14 +264,14 @@
{
if (status != EXIT_SUCCESS)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
- program_name);
+ local_program_name);
else
{
/* xgettext: no-wrap */
printf (_("\
Usage: %s [OPTION] [[TEXTDOMAIN] MSGID]\n\
or: %s [OPTION] -s [MSGID]...\n\
-"), program_name, program_name);
+"), local_program_name, local_program_name);
printf ("\n");
/* xgettext: no-wrap */
printf (_("\
---------------------------
--- old/gettext-0.11.5/lib/progname.c Tue Oct 30 11:08:14 2001
+++ gnu/gettext-0.11.5/lib/progname.c Sat Oct 19 17:07:44 2002
@@ -30,7 +30,7 @@
/* String containing name the program is called with.
To be initialized by main(). */
-const char *program_name;
+const char *program_name = NULL;
/* Set program_name, based on argv[0]. */
void
---------------------------
---------------------------
--- old/gettext-0.11.5/tests/tstngettext.c Mon Apr 29 17:25:22 2002
+++ gnu/gettext-0.11.5/tests/tstngettext.c Sat Oct 12 23:41:16 2002
@@ -39,7 +39,7 @@
#define _(str) gettext (str)
/* Name the program is called with. */
-char *program_name;
+char *local_program_name;
/* Long options. */
static const struct option long_options[] =
@@ -77,7 +77,7 @@
const char *domaindir = getenv ("TEXTDOMAINDIR");
/* Set program name for message texts. */
- program_name = argv[0];
+ local_program_name = argv[0];
#ifdef HAVE_SETLOCALE
/* Set locale via LC_ALL. */
@@ -130,7 +130,7 @@
/* Version information is requested. */
if (do_version)
{
- printf ("%s (GNU %s) %s\n", basename (program_name), PACKAGE, VERSION);
+ printf ("%s (GNU %s) %s\n", basename (local_program_name), PACKAGE,
VERSION);
/* xgettext: no-wrap */
printf (_("Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
@@ -201,7 +201,7 @@
{
if (status != EXIT_SUCCESS)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
- program_name);
+ local_program_name);
else
{
/* xgettext: no-wrap */
@@ -212,7 +212,7 @@
-V, --version display version information and exit\n\
MSGID MSGID-PLURAL translate MSGID (singular) / MSGID-PLURAL
(plural)\n\
COUNT choose singular/plural form based on this
value\n"),
- program_name);
+ local_program_name);
/* xgettext: no-wrap */
printf (_("\
\n\
---------------------------
I don't know who maintains the lib subdirectory. However, it's
still a bad idea not to initializes global variables.
---------------------------
--- old/gettext-0.11.5/lib/progname.c Tue Oct 30 11:08:14 2001
+++ gnu/gettext-0.11.5/lib/progname.c Sat Oct 19 17:07:44 2002
@@ -30,7 +30,7 @@
/* String containing name the program is called with.
To be initialized by main(). */
-const char *program_name;
+const char *program_name = NULL;
/* Set program_name, based on argv[0]. */
void
---------------------------
Please reply any comments directly to me because I haven't
subscribed to any gettext mailing list.
Bye,
Andreas
- OS/2 Patches (4),
Andreas Buening <=
- Re: OS/2 Patches (4), Neal H. Walfield, 2002/11/04
- Re: OS/2 Patches (4), Andreas Buening, 2002/11/05
- Re: OS/2 Patches (4), Neal H. Walfield, 2002/11/05
- Re: OS/2 Patches (4), Bruno Haible, 2002/11/06
- Re: OS/2 Patches (4), Andreas Buening, 2002/11/06
- Re: OS/2 Patches (4), Paul Eggert, 2002/11/07
- Re: OS/2 Patches (4), Bruno Haible, 2002/11/07
Re: OS/2 Patches (4), Bruno Haible, 2002/11/11