From 19cd821ddb4b6c195239870de617a99781e081ce Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 6 Oct 1993 00:24:55 +0000 Subject: merge with 3.8.3a --- src/chgrp.c | 4 ++-- src/chmod.c | 4 ++-- src/chown.c | 4 ++-- src/cp.c | 7 ++++--- src/dd.c | 4 ++-- src/df.c | 4 ++-- src/du.c | 4 ++-- src/install.c | 4 ++-- src/ln.c | 4 ++-- src/ls.c | 7 ++++--- src/mkdir.c | 4 ++-- src/mkfifo.c | 4 ++-- src/mknod.c | 4 ++-- src/mv.c | 4 ++-- src/rm.c | 4 ++-- src/rmdir.c | 4 ++-- src/touch.c | 4 ++-- 17 files changed, 38 insertions(+), 36 deletions(-) (limited to 'src') diff --git a/src/chgrp.c b/src/chgrp.c index f9118cdbd..6a6737a03 100644 --- a/src/chgrp.c +++ b/src/chgrp.c @@ -75,7 +75,7 @@ static char *groupname; /* If non-zero, display usage information and exit. */ static int show_help; -/* If non-zero, print the version on standard error. */ +/* If non-zero, print the version on standard output and exit. */ static int show_version; static struct option const long_options[] = @@ -129,7 +129,7 @@ main (argc, argv) if (show_version) { - fprintf (stderr, "%s\n", version_string); + printf ("%s\n", version_string); exit (0); } diff --git a/src/chmod.c b/src/chmod.c index 19c8cd8cd..eb3316c0e 100644 --- a/src/chmod.c +++ b/src/chmod.c @@ -61,7 +61,7 @@ static int changes_only; /* If non-zero, display usage information and exit. */ static int show_help; -/* If non-zero, print the version on standard error. */ +/* If non-zero, print the version on standard output and exit. */ static int show_version; static struct option const long_options[] = @@ -144,7 +144,7 @@ main (argc, argv) if (show_version) { - fprintf (stderr, "%s\n", version_string); + printf ("%s\n", version_string); exit (0); } diff --git a/src/chown.c b/src/chown.c index 37346aec9..6c9678137 100644 --- a/src/chown.c +++ b/src/chown.c @@ -85,7 +85,7 @@ static char *groupname; /* If non-zero, display usage information and exit. */ static int show_help; -/* If non-zero, print the version on standard error. */ +/* If non-zero, print the version on standard output and exit. */ static int show_version; static struct option const long_options[] = @@ -141,7 +141,7 @@ main (argc, argv) if (show_version) { - fprintf (stderr, "%s\n", version_string); + printf ("%s\n", version_string); exit (0); } diff --git a/src/cp.c b/src/cp.c index f6dd934e2..f0a5ce529 100644 --- a/src/cp.c +++ b/src/cp.c @@ -122,7 +122,7 @@ static uid_t myeuid; /* If non-zero, display usage information and exit. */ static int show_help; -/* If non-zero, print the version on standard error. */ +/* If non-zero, print the version on standard output and exit. */ static int show_version; static struct option const long_opts[] = @@ -262,7 +262,7 @@ main (argc, argv) if (show_version) { - fprintf (stderr, "%s\n", version_string); + printf ("%s\n", version_string); exit (0); } @@ -748,9 +748,10 @@ copy (src_path, dst_path, new_dst, device, ancestors) #ifdef S_ISLNK if (S_ISLNK (src_type)) { - char link_val[PATH_MAX + 1]; + char *link_val; int link_size; + link_val = (char *) alloca (PATH_MAX + 2); link_size = readlink (src_path, link_val, sizeof (link_val) - 1); if (link_size < 0) { diff --git a/src/dd.c b/src/dd.c index 172e66561..fd1091488 100644 --- a/src/dd.c +++ b/src/dd.c @@ -311,7 +311,7 @@ static unsigned char const ebcdic_to_ascii[] = /* If non-zero, display usage information and exit. */ static int show_help; -/* If non-zero, print the version on standard error. */ +/* If non-zero, print the version on standard output and exit. */ static int show_version; static struct option const long_options[] = @@ -342,7 +342,7 @@ main (argc, argv) if (show_version) { - fprintf (stderr, "%s\n", version_string); + printf ("%s\n", version_string); exit (0); } diff --git a/src/df.c b/src/df.c index f3bea7152..35b1896aa 100644 --- a/src/df.c +++ b/src/df.c @@ -112,7 +112,7 @@ static struct mount_entry *mount_list; /* If non-zero, display usage information and exit. */ static int show_help; -/* If non-zero, print the version on standard error. */ +/* If non-zero, print the version on standard output and exit. */ static int show_version; static struct option const long_options[] = @@ -180,7 +180,7 @@ main (argc, argv) if (show_version) { - fprintf (stderr, "%s\n", version_string); + printf ("%s\n", version_string); exit (0); } diff --git a/src/du.c b/src/du.c index 4eb59c120..4ea63f336 100644 --- a/src/du.c +++ b/src/du.c @@ -158,7 +158,7 @@ static int exit_status; /* If non-zero, display usage information and exit. */ static int show_help; -/* If non-zero, print the version on standard error. */ +/* If non-zero, print the version on standard output and exit. */ static int show_version; static struct option const long_options[] = @@ -260,7 +260,7 @@ main (argc, argv) if (show_version) { - fprintf (stderr, "%s\n", version_string); + printf ("%s\n", version_string); exit (0); } diff --git a/src/install.c b/src/install.c index e6fc16276..31a15dd1b 100644 --- a/src/install.c +++ b/src/install.c @@ -136,7 +136,7 @@ static int dir_arg; /* If non-zero, display usage information and exit. */ static int show_help; -/* If non-zero, print the version on standard error. */ +/* If non-zero, print the version on standard output and exit. */ static int show_version; static struct option const long_options[] = @@ -199,7 +199,7 @@ main (argc, argv) if (show_version) { - fprintf (stderr, "%s\n", version_string); + printf ("%s\n", version_string); exit (0); } diff --git a/src/ln.c b/src/ln.c index e2ddda982..f8cf11e52 100644 --- a/src/ln.c +++ b/src/ln.c @@ -89,7 +89,7 @@ static int hard_dir_link; /* If non-zero, display usage information and exit. */ static int show_help; -/* If non-zero, print the version on standard error. */ +/* If non-zero, print the version on standard output and exit. */ static int show_version; static struct option const long_options[] = @@ -173,7 +173,7 @@ main (argc, argv) if (show_version) { - fprintf (stderr, "%s\n", version_string); + printf ("%s\n", version_string); exit (0); } diff --git a/src/ls.c b/src/ls.c index b20b21177..947e1b5b8 100644 --- a/src/ls.c +++ b/src/ls.c @@ -361,7 +361,7 @@ static int exit_status; /* If non-zero, display usage information and exit. */ static int show_help; -/* If non-zero, print the version on standard error. */ +/* If non-zero, print the version on standard output and exit. */ static int show_version; static struct option const long_options[] = @@ -448,7 +448,7 @@ main (argc, argv) if (show_version) { - fprintf (stderr, "%s\n", version_string); + printf ("%s\n", version_string); exit (0); } @@ -1076,9 +1076,10 @@ get_link_name (filename, f) char *filename; struct file *f; { - char linkbuf[PATH_MAX + 1]; + char *linkbuf; register int linksize; + linkbuf = (char *) alloca (PATH_MAX + 2); /* Some automounters give incorrect st_size for mount points. I can't think of a good workaround for it, though. */ linksize = readlink (filename, linkbuf, sizeof (linkbuf) - 1); diff --git a/src/mkdir.c b/src/mkdir.c index f03f91f36..f5d89b7f3 100644 --- a/src/mkdir.c +++ b/src/mkdir.c @@ -48,7 +48,7 @@ static int path_mode; /* If non-zero, display usage information and exit. */ static int show_help; -/* If non-zero, print the version on standard error. */ +/* If non-zero, print the version on standard output and exit. */ static int show_version; static struct option const longopts[] = @@ -94,7 +94,7 @@ main (argc, argv) if (show_version) { - fprintf (stderr, "%s\n", version_string); + printf ("%s\n", version_string); exit (0); } diff --git a/src/mkfifo.c b/src/mkfifo.c index ce8a7924c..4b16d1254 100644 --- a/src/mkfifo.c +++ b/src/mkfifo.c @@ -39,7 +39,7 @@ char *program_name; /* If non-zero, display usage information and exit. */ static int show_help; -/* If non-zero, print the version on standard error. */ +/* If non-zero, print the version on standard output and exit. */ static int show_version; static struct option const longopts[] = @@ -83,7 +83,7 @@ main (argc, argv) if (show_version) { - fprintf (stderr, "%s\n", version_string); + printf ("%s\n", version_string); exit (0); } diff --git a/src/mknod.c b/src/mknod.c index e4e3ad2f7..74efa86b2 100644 --- a/src/mknod.c +++ b/src/mknod.c @@ -44,7 +44,7 @@ char *program_name; /* If non-zero, display usage information and exit. */ static int show_help; -/* If non-zero, print the version on standard error. */ +/* If non-zero, print the version on standard output and exit. */ static int show_version; static struct option const longopts[] = @@ -84,7 +84,7 @@ main (argc, argv) if (show_version) { - fprintf (stderr, "%s\n", version_string); + printf ("%s\n", version_string); exit (0); } diff --git a/src/mv.c b/src/mv.c index 220e14fda..5029c7a76 100644 --- a/src/mv.c +++ b/src/mv.c @@ -91,7 +91,7 @@ static uid_t myeuid; /* If non-zero, display usage information and exit. */ static int show_help; -/* If non-zero, print the version on standard error. */ +/* If non-zero, print the version on standard output and exit. */ static int show_version; static struct option const long_options[] = @@ -164,7 +164,7 @@ main (argc, argv) if (show_version) { - fprintf (stderr, "%s\n", version_string); + printf ("%s\n", version_string); exit (0); } diff --git a/src/rm.c b/src/rm.c index 3f331e437..2bd8db4ce 100644 --- a/src/rm.c +++ b/src/rm.c @@ -80,7 +80,7 @@ static int stdin_tty; /* If non-zero, display usage information and exit. */ static int show_help; -/* If non-zero, print the version on standard error. */ +/* If non-zero, print the version on standard output and exit. */ static int show_version; static struct option const long_opts[] = @@ -140,7 +140,7 @@ main (argc, argv) if (show_version) { - fprintf (stderr, "%s\n", version_string); + printf ("%s\n", version_string); exit (0); } diff --git a/src/rmdir.c b/src/rmdir.c index 6c1341ec2..7c497b4b9 100644 --- a/src/rmdir.c +++ b/src/rmdir.c @@ -43,7 +43,7 @@ static int empty_paths; /* If non-zero, display usage information and exit. */ static int show_help; -/* If non-zero, print the version on standard error. */ +/* If non-zero, print the version on standard output and exit. */ static int show_version; static struct option const longopts[] = @@ -82,7 +82,7 @@ main (argc, argv) if (show_version) { - fprintf (stderr, "%s\n", version_string); + printf ("%s\n", version_string); exit (0); } diff --git a/src/touch.c b/src/touch.c index ae5b82c12..152a27e84 100644 --- a/src/touch.c +++ b/src/touch.c @@ -95,7 +95,7 @@ static struct stat ref_stats; /* If non-zero, display usage information and exit. */ static int show_help; -/* If non-zero, print the version on standard error. */ +/* If non-zero, print the version on standard output and exit. */ static int show_version; static struct option const longopts[] = @@ -195,7 +195,7 @@ main (argc, argv) if (show_version) { - fprintf (stderr, "%s\n", version_string); + printf ("%s\n", version_string); exit (0); } -- cgit v1.2.3-70-g09d2