[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Fix coreutils compilation with --disable-nls (long)
From: |
Andrew Church |
Subject: |
[PATCH] Fix coreutils compilation with --disable-nls (long) |
Date: |
Wed, 21 May 2003 01:28:58 JST |
The patch below fixes the programs in the coreutils package so that
they compile and run correctly with --disable-nls when using a libc without
locale support.
--Andrew Church
address@hidden
http://achurch.org/
---------------------------------------------------------------------------
diff -urN coreutils-5.0-orig/src/basename.c coreutils-5.0/src/basename.c
--- coreutils-5.0-orig/src/basename.c 2002-08-31 16:25:51 +0900
+++ coreutils-5.0/src/basename.c 2003-05-21 01:20:19 +0900
@@ -93,9 +93,11 @@
char *name;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/cat.c coreutils-5.0/src/cat.c
--- coreutils-5.0-orig/src/cat.c 2002-10-08 15:15:40 +0900
+++ coreutils-5.0/src/cat.c 2003-05-21 01:21:22 +0900
@@ -567,9 +567,11 @@
};
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
/* Arrange to close stdout if we exit via the
case_GETOPT_HELP_CHAR or case_GETOPT_VERSION_CHAR code. */
diff -urN coreutils-5.0-orig/src/chgrp.c coreutils-5.0/src/chgrp.c
--- coreutils-5.0-orig/src/chgrp.c 2002-08-31 16:31:05 +0900
+++ coreutils-5.0/src/chgrp.c 2003-05-21 01:18:22 +0900
@@ -163,9 +163,11 @@
struct Chown_option chopt;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/chmod.c coreutils-5.0/src/chmod.c
--- coreutils-5.0-orig/src/chmod.c 2002-12-15 23:28:38 +0900
+++ coreutils-5.0/src/chmod.c 2003-05-21 01:18:22 +0900
@@ -279,9 +279,11 @@
int c;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/chown.c coreutils-5.0/src/chown.c
--- coreutils-5.0-orig/src/chown.c 2002-08-31 16:31:04 +0900
+++ coreutils-5.0/src/chown.c 2003-05-21 01:18:22 +0900
@@ -154,9 +154,11 @@
int optc;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/chroot.c coreutils-5.0/src/chroot.c
--- coreutils-5.0-orig/src/chroot.c 2002-08-31 16:25:51 +0900
+++ coreutils-5.0/src/chroot.c 2003-05-21 01:20:19 +0900
@@ -65,9 +65,11 @@
main (int argc, char **argv)
{
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/cksum.c coreutils-5.0/src/cksum.c
--- coreutils-5.0-orig/src/cksum.c 2003-02-18 16:57:20 +0900
+++ coreutils-5.0/src/cksum.c 2003-05-21 01:21:22 +0900
@@ -302,9 +302,11 @@
int errors = 0;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/cp.c coreutils-5.0/src/cp.c
--- coreutils-5.0-orig/src/cp.c 2003-03-09 16:56:08 +0900
+++ coreutils-5.0/src/cp.c 2003-05-21 01:18:22 +0900
@@ -838,9 +838,11 @@
char *target_directory = NULL;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/csplit.c coreutils-5.0/src/csplit.c
--- coreutils-5.0-orig/src/csplit.c 2002-12-15 23:21:45 +0900
+++ coreutils-5.0/src/csplit.c 2003-05-21 01:21:22 +0900
@@ -1370,9 +1370,11 @@
#endif
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/cut.c coreutils-5.0/src/cut.c
--- coreutils-5.0-orig/src/cut.c 2003-01-10 05:15:03 +0900
+++ coreutils-5.0/src/cut.c 2003-05-21 01:21:22 +0900
@@ -639,9 +639,11 @@
int delim_specified = 0;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/date.c coreutils-5.0/src/date.c
--- coreutils-5.0-orig/src/date.c 2002-12-16 05:47:03 +0900
+++ coreutils-5.0/src/date.c 2003-05-21 01:26:16 +0900
@@ -303,9 +303,11 @@
: COMMON_SHORT_OPTIONS "I:");
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
close_stdout_set_status (2);
atexit (close_stdout);
@@ -534,14 +536,18 @@
`LANG=de date +%p' on a system with good language support. */
out[0] = '\1';
+#if defined(ENABLE_NLS)
if (rfc_format)
setlocale (LC_ALL, "C");
+#endif
done = (nstrftime (out, out_length, format, tm, 0, when.tv_nsec)
|| out[0] == '\0');
+#if defined(ENABLE_NLS)
if (rfc_format)
setlocale (LC_ALL, "");
+#endif
if (done)
break;
diff -urN coreutils-5.0-orig/src/dd.c coreutils-5.0/src/dd.c
--- coreutils-5.0-orig/src/dd.c 2002-11-10 18:52:53 +0900
+++ coreutils-5.0/src/dd.c 2003-05-21 01:18:22 +0900
@@ -1142,9 +1142,11 @@
int exit_status;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
/* Arrange to close stdout if parse_long_options exits. */
atexit (close_stdout_wrapper);
diff -urN coreutils-5.0-orig/src/df.c coreutils-5.0/src/df.c
--- coreutils-5.0-orig/src/df.c 2003-03-05 06:07:53 +0900
+++ coreutils-5.0/src/df.c 2003-05-21 01:18:22 +0900
@@ -756,9 +756,11 @@
int n_valid_args = 0;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/dircolors.c coreutils-5.0/src/dircolors.c
--- coreutils-5.0-orig/src/dircolors.c 2002-12-01 19:18:23 +0900
+++ coreutils-5.0/src/dircolors.c 2003-05-21 01:18:22 +0900
@@ -427,9 +427,11 @@
int print_database = 0;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/dirname.c coreutils-5.0/src/dirname.c
--- coreutils-5.0-orig/src/dirname.c 2002-08-31 16:25:51 +0900
+++ coreutils-5.0/src/dirname.c 2003-05-21 01:20:19 +0900
@@ -68,9 +68,11 @@
size_t len;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/du.c coreutils-5.0/src/du.c
--- coreutils-5.0-orig/src/du.c 2003-03-08 19:18:45 +0900
+++ coreutils-5.0/src/du.c 2003-05-21 01:18:22 +0900
@@ -575,9 +575,11 @@
cwd_only[1] = NULL;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/echo.c coreutils-5.0/src/echo.c
--- coreutils-5.0-orig/src/echo.c 2002-08-31 16:12:13 +0900
+++ coreutils-5.0/src/echo.c 2003-05-21 01:20:19 +0900
@@ -118,9 +118,11 @@
int allow_options = 1;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/env.c coreutils-5.0/src/env.c
--- coreutils-5.0-orig/src/env.c 2003-03-30 19:41:24 +0900
+++ coreutils-5.0/src/env.c 2003-05-21 01:20:19 +0900
@@ -144,9 +144,11 @@
int ignore_environment = 0;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/expand.c coreutils-5.0/src/expand.c
--- coreutils-5.0-orig/src/expand.c 2002-08-31 16:25:51 +0900
+++ coreutils-5.0/src/expand.c 2003-05-21 01:21:22 +0900
@@ -344,9 +344,11 @@
tab_list = NULL;
first_free_tab = 0;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/expr.c coreutils-5.0/src/expr.c
--- coreutils-5.0-orig/src/expr.c 2003-03-08 08:18:49 +0900
+++ coreutils-5.0/src/expr.c 2003-05-21 01:20:19 +0900
@@ -157,9 +157,11 @@
VALUE *v;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/factor.c coreutils-5.0/src/factor.c
--- coreutils-5.0-orig/src/factor.c 2002-11-06 05:17:08 +0900
+++ coreutils-5.0/src/factor.c 2003-05-21 01:20:19 +0900
@@ -191,9 +191,11 @@
int fail;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/false.c coreutils-5.0/src/false.c
--- coreutils-5.0-orig/src/false.c 2003-04-02 15:51:17 +0900
+++ coreutils-5.0/src/false.c 2003-05-21 01:20:19 +0900
@@ -50,9 +50,11 @@
main (int argc, char **argv)
{
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/fmt.c coreutils-5.0/src/fmt.c
--- coreutils-5.0-orig/src/fmt.c 2003-03-29 23:09:34 +0900
+++ coreutils-5.0/src/fmt.c 2003-05-21 01:21:22 +0900
@@ -320,9 +320,11 @@
int optchar;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/fold.c coreutils-5.0/src/fold.c
--- coreutils-5.0-orig/src/fold.c 2002-08-31 16:25:51 +0900
+++ coreutils-5.0/src/fold.c 2003-05-21 01:21:22 +0900
@@ -239,9 +239,11 @@
int errs = 0;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/head.c coreutils-5.0/src/head.c
--- coreutils-5.0-orig/src/head.c 2002-10-01 17:47:44 +0900
+++ coreutils-5.0/src/head.c 2003-05-21 01:21:22 +0900
@@ -283,9 +283,11 @@
int count_lines = 1;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/hostid.c coreutils-5.0/src/hostid.c
--- coreutils-5.0-orig/src/hostid.c 2002-08-31 16:31:01 +0900
+++ coreutils-5.0/src/hostid.c 2003-05-21 01:20:19 +0900
@@ -65,9 +65,11 @@
long int id;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/hostname.c coreutils-5.0/src/hostname.c
--- coreutils-5.0-orig/src/hostname.c 2002-08-31 16:25:51 +0900
+++ coreutils-5.0/src/hostname.c 2003-05-21 01:20:19 +0900
@@ -84,9 +84,11 @@
char *hostname;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/id.c coreutils-5.0/src/id.c
--- coreutils-5.0-orig/src/id.c 2003-03-28 07:39:46 +0900
+++ coreutils-5.0/src/id.c 2003-05-21 01:20:19 +0900
@@ -121,9 +121,11 @@
int just_user = 0;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/install.c coreutils-5.0/src/install.c
--- coreutils-5.0-orig/src/install.c 2002-12-15 23:35:48 +0900
+++ coreutils-5.0/src/install.c 2003-05-21 01:18:22 +0900
@@ -188,9 +188,11 @@
char **file;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/ln.c coreutils-5.0/src/ln.c
--- coreutils-5.0-orig/src/ln.c 2002-10-08 23:24:00 +0900
+++ coreutils-5.0/src/ln.c 2003-05-21 01:18:22 +0900
@@ -407,9 +407,11 @@
int dest_is_dir;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/logname.c coreutils-5.0/src/logname.c
--- coreutils-5.0-orig/src/logname.c 2002-08-31 16:25:51 +0900
+++ coreutils-5.0/src/logname.c 2003-05-21 01:20:19 +0900
@@ -64,9 +64,11 @@
int c;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/ls.c coreutils-5.0/src/ls.c
--- coreutils-5.0-orig/src/ls.c 2003-03-20 08:01:51 +0900
+++ coreutils-5.0/src/ls.c 2003-05-21 01:22:15 +0900
@@ -1036,9 +1036,11 @@
unsigned int n_files;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
@@ -3158,6 +3160,7 @@
case 'p': case 'q': case 'r': case 's': case 't':
case 'u': case 'v': case 'w': case 'x': case 'y':
case 'z': case '{': case '|': case '}': case '~':
+ case -0x5F ... -0x02:
/* These characters are printable ASCII characters. */
*q++ = *p++;
displayed_width += 1;
@@ -3238,7 +3241,7 @@
while (p < plimit)
{
- if (! ISPRINT ((unsigned char) *p))
+ if (! ISPRINT ((unsigned char) *p) && !(*p >= -0x5F && *p <= -2))
*p = '?';
p++;
}
diff -urN coreutils-5.0-orig/src/md5sum.c coreutils-5.0/src/md5sum.c
--- coreutils-5.0-orig/src/md5sum.c 2002-09-14 16:37:49 +0900
+++ coreutils-5.0/src/md5sum.c 2003-05-21 01:21:22 +0900
@@ -510,9 +510,11 @@
/* Setting values of global variables. */
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/mkdir.c coreutils-5.0/src/mkdir.c
--- coreutils-5.0-orig/src/mkdir.c 2002-09-23 16:35:27 +0900
+++ coreutils-5.0/src/mkdir.c 2003-05-21 01:18:22 +0900
@@ -89,9 +89,11 @@
int optc;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/mkfifo.c coreutils-5.0/src/mkfifo.c
--- coreutils-5.0-orig/src/mkfifo.c 2002-08-31 16:29:21 +0900
+++ coreutils-5.0/src/mkfifo.c 2003-05-21 01:18:22 +0900
@@ -81,9 +81,11 @@
int optc;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/mknod.c coreutils-5.0/src/mknod.c
--- coreutils-5.0-orig/src/mknod.c 2002-12-14 23:14:59 +0900
+++ coreutils-5.0/src/mknod.c 2003-05-21 01:18:22 +0900
@@ -94,9 +94,11 @@
mode_t node_type;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/mv.c coreutils-5.0/src/mv.c
--- coreutils-5.0-orig/src/mv.c 2002-11-17 18:34:09 +0900
+++ coreutils-5.0/src/mv.c 2003-05-21 01:18:22 +0900
@@ -379,9 +379,11 @@
char **file;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/nice.c coreutils-5.0/src/nice.c
--- coreutils-5.0-orig/src/nice.c 2002-08-31 16:25:51 +0900
+++ coreutils-5.0/src/nice.c 2003-05-21 01:20:19 +0900
@@ -89,9 +89,11 @@
int i;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/nl.c coreutils-5.0/src/nl.c
--- coreutils-5.0-orig/src/nl.c 2002-10-14 17:22:07 +0900
+++ coreutils-5.0/src/nl.c 2003-05-21 01:21:22 +0900
@@ -467,9 +467,11 @@
size_t len;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/od.c coreutils-5.0/src/od.c
--- coreutils-5.0-orig/src/od.c 2002-12-15 23:21:45 +0900
+++ coreutils-5.0/src/od.c 2003-05-21 01:21:22 +0900
@@ -1629,9 +1629,11 @@
uintmax_t pseudo_start IF_LINT (= 0);
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/paste.c coreutils-5.0/src/paste.c
--- coreutils-5.0-orig/src/paste.c 2003-01-10 02:35:51 +0900
+++ coreutils-5.0/src/paste.c 2003-05-21 01:21:22 +0900
@@ -432,9 +432,11 @@
char default_delims[2], zero_delims[3];
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/pathchk.c coreutils-5.0/src/pathchk.c
--- coreutils-5.0-orig/src/pathchk.c 2003-02-12 18:19:13 +0900
+++ coreutils-5.0/src/pathchk.c 2003-05-21 01:20:19 +0900
@@ -164,9 +164,11 @@
int optc;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/pinky.c coreutils-5.0/src/pinky.c
--- coreutils-5.0-orig/src/pinky.c 2002-10-19 16:51:45 +0900
+++ coreutils-5.0/src/pinky.c 2003-05-21 01:20:19 +0900
@@ -501,9 +501,11 @@
int n_users;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/pr.c coreutils-5.0/src/pr.c
--- coreutils-5.0-orig/src/pr.c 2002-12-15 23:35:58 +0900
+++ coreutils-5.0/src/pr.c 2003-05-21 01:21:22 +0900
@@ -861,9 +861,11 @@
: COMMON_SHORT_OPTIONS "S:");
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/printenv.c coreutils-5.0/src/printenv.c
--- coreutils-5.0-orig/src/printenv.c 2002-08-31 16:28:51 +0900
+++ coreutils-5.0/src/printenv.c 2003-05-21 01:20:19 +0900
@@ -85,9 +85,11 @@
int exit_status;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
close_stdout_set_status (2);
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/printf.c coreutils-5.0/src/printf.c
--- coreutils-5.0-orig/src/printf.c 2003-03-27 23:32:34 +0900
+++ coreutils-5.0/src/printf.c 2003-05-21 01:20:19 +0900
@@ -549,9 +549,11 @@
int args_used;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/ptx.c coreutils-5.0/src/ptx.c
--- coreutils-5.0-orig/src/ptx.c 2003-03-08 08:20:22 +0900
+++ coreutils-5.0/src/ptx.c 2003-05-21 01:21:22 +0900
@@ -1952,9 +1952,11 @@
/* Decode program options. */
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/pwd.c coreutils-5.0/src/pwd.c
--- coreutils-5.0-orig/src/pwd.c 2003-01-11 07:55:11 +0900
+++ coreutils-5.0/src/pwd.c 2003-05-21 01:20:19 +0900
@@ -61,9 +61,11 @@
char *wd;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/rm.c coreutils-5.0/src/rm.c
--- coreutils-5.0-orig/src/rm.c 2003-02-09 01:49:35 +0900
+++ coreutils-5.0/src/rm.c 2003-05-21 01:18:29 +0900
@@ -148,9 +148,11 @@
int c;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/rmdir.c coreutils-5.0/src/rmdir.c
--- coreutils-5.0-orig/src/rmdir.c 2002-09-22 15:58:42 +0900
+++ coreutils-5.0/src/rmdir.c 2003-05-21 01:18:22 +0900
@@ -171,9 +171,11 @@
int optc;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/seq.c coreutils-5.0/src/seq.c
--- coreutils-5.0-orig/src/seq.c 2003-03-20 22:16:25 +0900
+++ coreutils-5.0/src/seq.c 2003-05-21 01:20:19 +0900
@@ -340,9 +340,11 @@
char *format_str = NULL;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/shred.c coreutils-5.0/src/shred.c
--- coreutils-5.0-orig/src/shred.c 2003-03-09 00:48:35 +0900
+++ coreutils-5.0/src/shred.c 2003-05-21 01:18:22 +0900
@@ -1517,9 +1517,11 @@
int i;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/sleep.c coreutils-5.0/src/sleep.c
--- coreutils-5.0-orig/src/sleep.c 2003-03-08 23:27:39 +0900
+++ coreutils-5.0/src/sleep.c 2003-05-21 01:20:19 +0900
@@ -113,9 +113,11 @@
int fail = 0;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/split.c coreutils-5.0/src/split.c
--- coreutils-5.0-orig/src/split.c 2003-03-12 05:44:40 +0900
+++ coreutils-5.0/src/split.c 2003-05-21 01:21:22 +0900
@@ -359,9 +359,11 @@
int digits_optind = 0;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/stty.c coreutils-5.0/src/stty.c
--- coreutils-5.0-orig/src/stty.c 2002-12-18 17:53:47 +0900
+++ coreutils-5.0/src/stty.c 2003-05-21 01:20:19 +0900
@@ -751,9 +751,11 @@
int invalid_long_option = 0;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/su.c coreutils-5.0/src/su.c
--- coreutils-5.0-orig/src/su.c 2002-08-31 16:28:18 +0900
+++ coreutils-5.0/src/su.c 2003-05-21 01:20:19 +0900
@@ -469,9 +469,11 @@
struct passwd pw_copy;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
fast_startup = 0;
simulate_login = 0;
diff -urN coreutils-5.0-orig/src/sum.c coreutils-5.0/src/sum.c
--- coreutils-5.0-orig/src/sum.c 2002-12-15 23:25:59 +0900
+++ coreutils-5.0/src/sum.c 2003-05-21 01:21:22 +0900
@@ -224,9 +224,11 @@
int (*sum_func) (const char *, int) = bsd_sum_file;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/sync.c coreutils-5.0/src/sync.c
--- coreutils-5.0-orig/src/sync.c 2002-08-31 16:11:06 +0900
+++ coreutils-5.0/src/sync.c 2003-05-21 01:18:22 +0900
@@ -57,9 +57,11 @@
main (int argc, char **argv)
{
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/tac.c coreutils-5.0/src/tac.c
--- coreutils-5.0-orig/src/tac.c 2002-11-08 18:47:45 +0900
+++ coreutils-5.0/src/tac.c 2003-05-21 01:21:22 +0900
@@ -609,9 +609,11 @@
int have_read_stdin = 0;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/tail.c coreutils-5.0/src/tail.c
--- coreutils-5.0-orig/src/tail.c 2002-12-15 02:26:21 +0900
+++ coreutils-5.0/src/tail.c 2003-05-21 01:21:22 +0900
@@ -1597,9 +1597,11 @@
double sleep_interval = 1.0;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/tee.c coreutils-5.0/src/tee.c
--- coreutils-5.0-orig/src/tee.c 2002-12-15 23:21:45 +0900
+++ coreutils-5.0/src/tee.c 2003-05-21 01:20:19 +0900
@@ -81,9 +81,11 @@
int optc;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/touch.c coreutils-5.0/src/touch.c
--- coreutils-5.0-orig/src/touch.c 2002-12-21 05:09:22 +0900
+++ coreutils-5.0/src/touch.c 2003-05-21 01:18:22 +0900
@@ -281,9 +281,11 @@
int err = 0;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/tr.c coreutils-5.0/src/tr.c
--- coreutils-5.0-orig/src/tr.c 2002-10-08 16:14:11 +0900
+++ coreutils-5.0/src/tr.c 2003-05-21 01:21:22 +0900
@@ -1794,9 +1794,11 @@
struct Spec_list *s2 = &buf2;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/true.c coreutils-5.0/src/true.c
--- coreutils-5.0-orig/src/true.c 2003-01-04 06:37:24 +0900
+++ coreutils-5.0/src/true.c 2003-05-21 01:20:19 +0900
@@ -50,9 +50,11 @@
main (int argc, char **argv)
{
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/tsort.c coreutils-5.0/src/tsort.c
--- coreutils-5.0-orig/src/tsort.c 2002-08-31 16:28:02 +0900
+++ coreutils-5.0/src/tsort.c 2003-05-21 01:21:22 +0900
@@ -548,9 +548,11 @@
int opt;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/tty.c coreutils-5.0/src/tty.c
--- coreutils-5.0-orig/src/tty.c 2002-08-31 16:27:50 +0900
+++ coreutils-5.0/src/tty.c 2003-05-21 01:20:19 +0900
@@ -79,9 +79,11 @@
int optc;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
close_stdout_set_status (3);
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/uname.c coreutils-5.0/src/uname.c
--- coreutils-5.0-orig/src/uname.c 2002-12-07 00:40:55 +0900
+++ coreutils-5.0/src/uname.c 2003-05-21 01:20:19 +0900
@@ -152,9 +152,11 @@
unsigned toprint = 0;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/unexpand.c coreutils-5.0/src/unexpand.c
--- coreutils-5.0-orig/src/unexpand.c 2003-01-08 19:49:14 +0900
+++ coreutils-5.0/src/unexpand.c 2003-05-21 01:21:22 +0900
@@ -410,9 +410,11 @@
bool obsolete_tablist = false;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/uniq.c coreutils-5.0/src/uniq.c
--- coreutils-5.0-orig/src/uniq.c 2002-08-31 16:25:51 +0900
+++ coreutils-5.0/src/uniq.c 2003-05-21 01:23:41 +0900
@@ -400,10 +400,12 @@
file[0] = file[1] = "-";
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
hard_LC_COLLATE = hard_locale (LC_COLLATE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/uptime.c coreutils-5.0/src/uptime.c
--- coreutils-5.0-orig/src/uptime.c 2002-08-31 16:25:51 +0900
+++ coreutils-5.0/src/uptime.c 2003-05-21 01:21:14 +0900
@@ -74,9 +74,13 @@
if (b == buf)
{
/* The following sscanf must use the C locale. */
+#if defined(ENABLE_NLS)
setlocale (LC_NUMERIC, "C");
+#endif
res = sscanf (buf, "%lf", &upsecs);
+#if defined(ENABLE_NLS)
setlocale (LC_NUMERIC, "");
+#endif
if (res == 1)
uptime = (time_t) upsecs;
}
@@ -209,9 +213,11 @@
{
int optc, longind;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/users.c coreutils-5.0/src/users.c
--- coreutils-5.0-orig/src/users.c 2002-08-31 16:25:51 +0900
+++ coreutils-5.0/src/users.c 2003-05-21 01:20:19 +0900
@@ -134,9 +134,11 @@
{
int optc, longind;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/wc.c coreutils-5.0/src/wc.c
--- coreutils-5.0-orig/src/wc.c 2002-11-06 05:30:16 +0900
+++ coreutils-5.0/src/wc.c 2003-05-21 01:21:22 +0900
@@ -525,9 +525,11 @@
int nfiles;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/who.c coreutils-5.0/src/who.c
--- coreutils-5.0-orig/src/who.c 2003-02-06 05:54:33 +0900
+++ coreutils-5.0/src/who.c 2003-05-21 01:20:19 +0900
@@ -622,9 +622,11 @@
int assumptions = 1;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/whoami.c coreutils-5.0/src/whoami.c
--- coreutils-5.0-orig/src/whoami.c 2002-08-31 16:25:51 +0900
+++ coreutils-5.0/src/whoami.c 2003-05-21 01:20:19 +0900
@@ -70,9 +70,11 @@
int c;
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
diff -urN coreutils-5.0-orig/src/yes.c coreutils-5.0/src/yes.c
--- coreutils-5.0-orig/src/yes.c 2002-08-31 16:27:43 +0900
+++ coreutils-5.0/src/yes.c 2003-05-21 01:20:19 +0900
@@ -67,9 +67,11 @@
main (int argc, char **argv)
{
program_name = argv[0];
+#if defined(ENABLE_NLS)
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#endif
atexit (close_stdout);
- [PATCH] Fix coreutils compilation with --disable-nls (long),
Andrew Church <=