summaryrefslogtreecommitdiff
path: root/package/sash/src
diff options
context:
space:
mode:
Diffstat (limited to 'package/sash/src')
-rw-r--r--package/sash/src/cmd_uclinux.c2
-rw-r--r--package/sash/src/cmds.c28
-rw-r--r--package/sash/src/date.c1
-rw-r--r--package/sash/src/free.c1
-rw-r--r--package/sash/src/libsash/utils.c4
-rw-r--r--package/sash/src/ls.c2
-rw-r--r--package/sash/src/ps.c9
-rw-r--r--package/sash/src/reboot.c7
-rw-r--r--package/sash/src/sash.c13
-rw-r--r--package/sash/src/shutdown.c12
10 files changed, 54 insertions, 25 deletions
diff --git a/package/sash/src/cmd_uclinux.c b/package/sash/src/cmd_uclinux.c
index bf66c4529..32886ebe4 100644
--- a/package/sash/src/cmd_uclinux.c
+++ b/package/sash/src/cmd_uclinux.c
@@ -19,6 +19,7 @@ char statec;
void
do_ps(argc, argv)
+ int argc;
char **argv;
{
int i;
@@ -100,6 +101,7 @@ do_ps(argc, argv)
void
do_cat(argc, argv)
+ int argc;
char **argv;
{
int fd;
diff --git a/package/sash/src/cmds.c b/package/sash/src/cmds.c
index d822d9f6d..b5c9168b3 100644
--- a/package/sash/src/cmds.c
+++ b/package/sash/src/cmds.c
@@ -13,8 +13,10 @@
#include "sash.h"
#include <sys/types.h>
+#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/time.h>
+#include <time.h>
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
@@ -28,6 +30,7 @@
void
do_echo(argc, argv)
+ int argc;
char **argv;
{
BOOL first;
@@ -45,6 +48,7 @@ do_echo(argc, argv)
void
do_pwd(argc, argv)
+ int argc;
char **argv;
{
char buf[PATHLEN];
@@ -59,6 +63,7 @@ do_pwd(argc, argv)
void
do_time(argc, argv)
+ int argc;
char ** argv;
{
struct timeval tv;
@@ -68,6 +73,7 @@ do_time(argc, argv)
void
do_cd(argc, argv)
+ int argc;
char **argv;
{
char *path;
@@ -89,6 +95,7 @@ do_cd(argc, argv)
void
do_mkdir(argc, argv)
+ int argc;
char **argv;
{
int state = 0, mode = -1;
@@ -111,6 +118,7 @@ do_mkdir(argc, argv)
void
do_sleep(argc, argv)
+ int argc;
char **argv;
{
if (argc > 1)
@@ -119,6 +127,7 @@ do_sleep(argc, argv)
void
do_mknod(argc, argv)
+ int argc;
char **argv;
{
char *cp;
@@ -164,6 +173,7 @@ do_mknod(argc, argv)
void
do_rmdir(argc, argv)
+ int argc;
char **argv;
{
while (argc-- > 1) {
@@ -176,6 +186,7 @@ do_rmdir(argc, argv)
void
do_sync(argc, argv)
+ int argc;
char **argv;
{
#ifdef CONFIG_USER_FLATFSD_FLATFSD
@@ -187,6 +198,7 @@ do_sync(argc, argv)
void
do_rm(argc, argv)
+ int argc;
char **argv;
{
while (argc-- > 1) {
@@ -199,6 +211,7 @@ do_rm(argc, argv)
void
do_chmod(argc, argv)
+ int argc;
char **argv;
{
char *cp;
@@ -226,6 +239,7 @@ do_chmod(argc, argv)
void
do_chown(argc, argv)
+ int argc;
char **argv;
{
char *cp;
@@ -267,6 +281,7 @@ do_chown(argc, argv)
void
do_chgrp(argc, argv)
+ int argc;
char **argv;
{
char *cp;
@@ -308,6 +323,7 @@ do_chgrp(argc, argv)
void
do_touch(argc, argv)
+ int argc;
char **argv;
{
char *name;
@@ -336,6 +352,7 @@ do_touch(argc, argv)
void
do_mv(argc, argv)
+ int argc;
char **argv;
{
int dirflag;
@@ -382,6 +399,7 @@ do_mv(argc, argv)
void
do_ln(argc, argv)
+ int argc;
char **argv;
{
int dirflag;
@@ -441,6 +459,7 @@ do_ln(argc, argv)
void
do_cp(argc, argv)
+ int argc;
char **argv;
{
BOOL dirflag;
@@ -470,6 +489,7 @@ do_cp(argc, argv)
void
do_mount(argc, argv)
+ int argc;
char **argv;
{
char *str;
@@ -512,6 +532,7 @@ do_mount(argc, argv)
void
do_umount(argc, argv)
+ int argc;
char **argv;
{
if (umount(argv[1]) < 0)
@@ -521,6 +542,7 @@ do_umount(argc, argv)
void
do_cmp(argc, argv)
+ int argc;
char **argv;
{
int fd1;
@@ -632,6 +654,7 @@ closefiles:
void
do_more(argc, argv)
+ int argc;
char **argv;
{
FILE *fp;
@@ -727,6 +750,7 @@ do_more(argc, argv)
void
do_exit(argc, argv)
+ int argc;
char **argv;
{
exit(0);
@@ -735,6 +759,7 @@ do_exit(argc, argv)
void
do_setenv(argc, argv)
+ int argc;
char **argv;
{
setenv(argv[1], argv[2], 1);
@@ -743,6 +768,7 @@ do_setenv(argc, argv)
void
do_printenv(argc, argv)
+ int argc;
char **argv;
{
char **env;
@@ -772,6 +798,7 @@ do_printenv(argc, argv)
void
do_umask(argc, argv)
+ int argc;
char **argv;
{
char *cp;
@@ -800,6 +827,7 @@ do_umask(argc, argv)
void
do_kill(argc, argv)
+ int argc;
char **argv;
{
char *cp;
diff --git a/package/sash/src/date.c b/package/sash/src/date.c
index c7317998b..a1a69a530 100644
--- a/package/sash/src/date.c
+++ b/package/sash/src/date.c
@@ -2,6 +2,7 @@
#include <time.h>
#include <stdio.h>
+#include <string.h>
static const char invalid_date[] = "Invalid date %s\n";
int do_date(int argc, char * argv[])
diff --git a/package/sash/src/free.c b/package/sash/src/free.c
index 281f10995..d4d4dedd3 100644
--- a/package/sash/src/free.c
+++ b/package/sash/src/free.c
@@ -21,6 +21,7 @@
void
do_free(argc, argv)
+ int argc;
char **argv;
{
int i;
diff --git a/package/sash/src/libsash/utils.c b/package/sash/src/libsash/utils.c
index a05b33aee..17ba319a4 100644
--- a/package/sash/src/libsash/utils.c
+++ b/package/sash/src/libsash/utils.c
@@ -31,6 +31,7 @@ int intflag;
*/
char *
modestring(mode)
+ int mode;
{
static char buf[12];
@@ -531,8 +532,10 @@ makeargs(cmd, argcptr, argvptr)
*/
BOOL
makestring(argc, argv, buf, buflen)
+ int argc;
char **argv;
char *buf;
+ int buflen;
{
int len;
@@ -581,6 +584,7 @@ static CHUNK * chunklist;
*/
char *
getchunk(size)
+ int size;
{
CHUNK *chunk;
diff --git a/package/sash/src/ls.c b/package/sash/src/ls.c
index 9b337aeaa..eae185240 100644
--- a/package/sash/src/ls.c
+++ b/package/sash/src/ls.c
@@ -15,6 +15,7 @@
#include <pwd.h>
#include <grp.h>
#include <time.h>
+#include <unistd.h>
#define LISTSIZE 256
@@ -212,6 +213,7 @@ static void
lsfile(name, statbuf, flags)
char *name;
struct stat *statbuf;
+ int flags;
{
char *cp;
struct passwd *pwd;
diff --git a/package/sash/src/ps.c b/package/sash/src/ps.c
index ed4226cc9..cc31d2398 100644
--- a/package/sash/src/ps.c
+++ b/package/sash/src/ps.c
@@ -18,15 +18,11 @@
#include <pwd.h>
#include <grp.h>
#include <time.h>
+#include <unistd.h>
#include <linux/major.h>
-#ifdef __UC_LIBC_
-#include <linux/types.h>
-#endif
+#include <linux/param.h>
#include <sys/time.h>
#include <sys/param.h>
-#ifdef __UC_LIBC__
-#include <mathf.h>
-#endif
char psbuf[256];
char name[40];
@@ -57,6 +53,7 @@ void dev_to_name(dev_t dev, char * ttyname)
void
do_ps(argc, argv)
+ int argc;
char **argv;
{
int i;
diff --git a/package/sash/src/reboot.c b/package/sash/src/reboot.c
index 8342ec992..ec464a041 100644
--- a/package/sash/src/reboot.c
+++ b/package/sash/src/reboot.c
@@ -27,10 +27,7 @@
#include <unistd.h>
#include <getopt.h>
-
-#if __GNU_LIBRARY__ > 5
#include <sys/reboot.h>
-#endif
int main(int argc, char *argv[])
{
@@ -83,11 +80,7 @@ int main(int argc, char *argv[])
sleep(1);
sync();
sleep(1);
-#if __GNU_LIBRARY__ > 5
reboot(0x01234567);
-#else
- reboot(0xfee1dead, 672274793, 0x01234567);
-#endif
exit(0); /* Shrug */
}
diff --git a/package/sash/src/sash.c b/package/sash/src/sash.c
index 24fbddbf7..b856362ce 100644
--- a/package/sash/src/sash.c
+++ b/package/sash/src/sash.c
@@ -239,7 +239,8 @@ char ** text3 = &text2;
char buf[CMDLEN];
int exit_code = 0;
-main(argc, argv, env)
+int main(argc, argv, env)
+ int argc;
char **argv;
char *env[];
{
@@ -577,6 +578,7 @@ command_in_path(char *cmd)
*/
static BOOL
trybuiltin(argc, argv)
+ int argc;
char **argv;
{
CMDTAB *cmdptr;
@@ -859,6 +861,7 @@ runcmd(cmd, bg, argc, argv)
#ifdef CMD_HELP
void
do_help(argc, argv)
+ int argc;
char **argv;
{
CMDTAB *cmdptr;
@@ -871,6 +874,7 @@ do_help(argc, argv)
#ifdef CMD_ALIAS
void
do_alias(argc, argv)
+ int argc;
char **argv;
{
char *name;
@@ -977,6 +981,7 @@ findalias(name)
void
do_source(argc, argv)
+ int argc;
char **argv;
{
readfile(argv[1]);
@@ -984,6 +989,7 @@ do_source(argc, argv)
/*void
do_cd(argc, argv)
+ int argc;
char **argv;
{
char *name;
@@ -997,12 +1003,15 @@ do_cd(argc, argv)
void
do_pid(argc, argv)
+ int argc;
+ char **argv;
{
printf("%d\n", getpid());
}
void
do_exec(argc, argv)
+ int argc;
char **argv;
{
while (--sourcecount >= 0) {
@@ -1019,6 +1028,7 @@ do_exec(argc, argv)
/*void
do_exit(argc, argv)
+ int argc;
char **argv;
{
if (argc>1)
@@ -1031,6 +1041,7 @@ do_exit(argc, argv)
#ifdef CMD_ALIAS
void
do_unalias(argc, argv)
+ int argc;
char **argv;
{
ALIAS *alias;
diff --git a/package/sash/src/shutdown.c b/package/sash/src/shutdown.c
index 444326483..cc5ee8763 100644
--- a/package/sash/src/shutdown.c
+++ b/package/sash/src/shutdown.c
@@ -23,10 +23,8 @@
#include <grp.h>
#include <time.h>
#include <signal.h>
-
-#if __GNU_LIBRARY__ > 5
+#include <unistd.h>
#include <sys/reboot.h>
-#endif
int
main(argc, argv)
@@ -57,17 +55,9 @@ main(argc, argv)
sleep(1);
if (strcmp(argv[1], "-h")==0) {
-#if __GNU_LIBRARY__ > 5
reboot(0xCDEF0123);
-#else
- reboot(0xfee1dead, 672274793, 0xCDEF0123);
-#endif
} else {
-#if __GNU_LIBRARY__ > 5
reboot(0x01234567);
-#else
- reboot(0xfee1dead, 672274793, 0x01234567);
-#endif
}
exit(0); /* Shrug */