diff options
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/cat.c | 2 | ||||
-rw-r--r-- | coreutils/cp.c | 2 | ||||
-rw-r--r-- | coreutils/date.c | 2 | ||||
-rw-r--r-- | coreutils/dd.c | 2 | ||||
-rw-r--r-- | coreutils/df.c | 2 | ||||
-rw-r--r-- | coreutils/ls.c | 19 | ||||
-rw-r--r-- | coreutils/mkdir.c | 2 | ||||
-rw-r--r-- | coreutils/mknod.c | 2 | ||||
-rw-r--r-- | coreutils/printf.c | 2 | ||||
-rw-r--r-- | coreutils/touch.c | 2 |
10 files changed, 18 insertions, 19 deletions
diff --git a/coreutils/cat.c b/coreutils/cat.c index 38078d505..3aae6d78e 100644 --- a/coreutils/cat.c +++ b/coreutils/cat.c @@ -32,7 +32,7 @@ static void print_file( FILE *file) fflush(stdout); } -extern int cat_more_main(int argc, char **argv) +extern int cat_main(int argc, char **argv) { FILE *file; diff --git a/coreutils/cp.c b/coreutils/cp.c index 11c76825c..34c12922d 100644 --- a/coreutils/cp.c +++ b/coreutils/cp.c @@ -25,7 +25,7 @@ #include <utime.h> #include <dirent.h> -const char cp_usage[] = "cp [OPTION]... SOURCE DEST\n" +static const char cp_usage[] = "cp [OPTION]... SOURCE DEST\n" " or: cp [OPTION]... SOURCE... DIRECTORY\n" "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n" "\n" diff --git a/coreutils/date.c b/coreutils/date.c index 70d5dd5c6..51194848b 100644 --- a/coreutils/date.c +++ b/coreutils/date.c @@ -34,7 +34,7 @@ an RFC 822 complient date output for shell scripting mail commands */ -const char date_usage[] = "date [OPTION]... [+FORMAT]\n" +static const char date_usage[] = "date [OPTION]... [+FORMAT]\n" " or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]\n" "Display the current time in the given FORMAT, or set the system date.\n" "\nOptions:\n\t-R\t\toutput RFC-822 compliant date string\n" diff --git a/coreutils/dd.c b/coreutils/dd.c index ecf7e3a3d..1cf731664 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c @@ -14,7 +14,7 @@ #include <fcntl.h> #include <errno.h> -const char dd_usage[] = +static const char dd_usage[] = "Copy a file, converting and formatting according to options\n\ \n\ usage: [if=name] [of=name] [bs=n] [count=n]\n\ diff --git a/coreutils/df.c b/coreutils/df.c index a777d70f4..7a72bf8fd 100644 --- a/coreutils/df.c +++ b/coreutils/df.c @@ -5,7 +5,7 @@ #include <sys/vfs.h> #include <fstab.h> -const char df_usage[] = "df [filesystem ...]\n" +static const char df_usage[] = "df [filesystem ...]\n" "\n" "\tPrint the filesystem space used and space available.\n"; diff --git a/coreutils/ls.c b/coreutils/ls.c index 0adc35de1..a8e7e048a 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c @@ -132,7 +132,6 @@ int ls_main(int argc, char **argv) #else -#include "internal.h" /* * tiny-ls.c version 0.1.0: A minimalist 'ls' * Copyright (C) 1996 Brian Candler <B.Candler@pobox.com> @@ -175,7 +174,7 @@ int ls_main(int argc, char **argv) * 1. requires lstat (BSD) - how do you do it without? */ -#define FEATURE_USERNAME /* show username/groupnames (libc6 uses NSS) */ +//#define FEATURE_USERNAME /* show username/groupnames (libc6 uses NSS) */ #define FEATURE_TIMESTAMPS /* show file timestamps */ #define FEATURE_AUTOWIDTH /* calculate terminal & column widths */ #define FEATURE_FILETYPECHAR /* enable -p and -F */ @@ -187,8 +186,8 @@ int ls_main(int argc, char **argv) /************************************************************************/ - -#if 1 /* FIXME libc 6 */ +#include "internal.h" +#if !defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1) # include <linux/types.h> #else # include <sys/types.h> @@ -225,7 +224,7 @@ int ls_main(int argc, char **argv) /* The 9 mode bits to test */ -static const umode_t MBIT[] = { +static const mode_t MBIT[] = { S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH @@ -233,7 +232,7 @@ static const umode_t MBIT[] = { /* The special bits. If set, display SMODE0/1 instead of MODE0/1 */ -static const umode_t SBIT[] = { +static const mode_t SBIT[] = { 0, 0, S_ISUID, 0, 0, S_ISGID, 0, 0, S_ISVTX @@ -278,7 +277,7 @@ static unsigned char time_fmt = TIME_MOD; static void writenum(long val, short minwidth) { - char scratch[20]; + char scratch[128]; char *p = scratch + sizeof(scratch); short len = 0; @@ -324,7 +323,7 @@ static void tab(short col) } #ifdef FEATURE_FILETYPECHAR -static char append_char(umode_t mode) +static char append_char(mode_t mode) { if (!(opts & DISP_FTYPE)) return '\0'; @@ -343,14 +342,14 @@ static char append_char(umode_t mode) static void list_single(const char *name, struct stat *info) { - char scratch[20]; + char scratch[PATH_MAX]; short len = strlen(name); #ifdef FEATURE_FILETYPECHAR char append = append_char(info->st_mode); #endif if (display_fmt == FMT_LONG) { - umode_t mode = info->st_mode; + mode_t mode = info->st_mode; int i; scratch[0] = TYPECHAR(mode); diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c index b42899a4a..cf65f272f 100644 --- a/coreutils/mkdir.c +++ b/coreutils/mkdir.c @@ -24,7 +24,7 @@ #include <errno.h> #include <sys/param.h> -const char mkdir_usage[] = "Usage: mkdir [OPTION] DIRECTORY...\n" +static const char mkdir_usage[] = "Usage: mkdir [OPTION] DIRECTORY...\n" "Create the DIRECTORY(ies), if they do not already exist\n\n" "-m\tset permission mode (as in chmod), not rwxrwxrwx - umask\n" "-p\tno error if existing, make parent directories as needed\n"; diff --git a/coreutils/mknod.c b/coreutils/mknod.c index 95d7de360..ea2331fa3 100644 --- a/coreutils/mknod.c +++ b/coreutils/mknod.c @@ -6,7 +6,7 @@ #include <fcntl.h> #include <unistd.h> -const char mknod_usage[] = "mknod file b|c|u|p major minor\n" +static const char mknod_usage[] = "mknod file b|c|u|p major minor\n" "\tMake special files.\n" "\n" "\tb:\tMake a block (buffered) device.\n" diff --git a/coreutils/printf.c b/coreutils/printf.c index 4d4465943..02d08118b 100644 --- a/coreutils/printf.c +++ b/coreutils/printf.c @@ -136,7 +136,7 @@ static void verify __P ((char *s, char *end)); /* The value to return to the calling program. */ static int exit_status; -const char printf_usage[] = "printf format [argument...]\n"; +static const char printf_usage[] = "printf format [argument...]\n"; int printf_main(int argc, char** argv) diff --git a/coreutils/touch.c b/coreutils/touch.c index c36ffca90..d882a6319 100644 --- a/coreutils/touch.c +++ b/coreutils/touch.c @@ -28,7 +28,7 @@ #include <errno.h> -const char touch_usage[] = "touch [-c] file [file ...]\n\n" +static const char touch_usage[] = "touch [-c] file [file ...]\n\n" "\tUpdate the last-modified date on the given file[s].\n"; |