summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorEric Andersen2000-06-19 17:25:40 +0000
committerEric Andersen2000-06-19 17:25:40 +0000
commitb610615be9aedfac07d1e01f12575707fa3a227c (patch)
treeb94c0d6a506d1ef77f79df246a26d504c84b7110 /coreutils
parentdbb3019d0de410960feac649a0b9320ae245cca1 (diff)
downloadbusybox-b610615be9aedfac07d1e01f12575707fa3a227c.zip
busybox-b610615be9aedfac07d1e01f12575707fa3a227c.tar.gz
Updates to a number of apps to remove warnings/compile errors under libc5.
Tested under both libc5 and libc6 and all seems well with these fixes. -Erik
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/basename.c2
-rw-r--r--coreutils/cat.c2
-rw-r--r--coreutils/cut.c2
-rw-r--r--coreutils/date.c3
-rw-r--r--coreutils/df.c2
-rw-r--r--coreutils/dirname.c2
-rw-r--r--coreutils/du.c4
-rw-r--r--coreutils/echo.c2
-rw-r--r--coreutils/head.c4
-rw-r--r--coreutils/hostid.c2
-rw-r--r--coreutils/id.c2
-rw-r--r--coreutils/ln.c2
-rw-r--r--coreutils/logname.c2
-rw-r--r--coreutils/mkdir.c2
-rw-r--r--coreutils/mkfifo.c3
-rw-r--r--coreutils/mknod.c2
-rw-r--r--coreutils/pwd.c2
-rw-r--r--coreutils/rm.c2
-rw-r--r--coreutils/rmdir.c2
-rw-r--r--coreutils/sleep.c4
-rw-r--r--coreutils/sort.c4
-rw-r--r--coreutils/sync.c2
-rw-r--r--coreutils/tail.c2
-rw-r--r--coreutils/tee.c4
-rw-r--r--coreutils/test.c2
-rw-r--r--coreutils/touch.c2
-rw-r--r--coreutils/tty.c2
-rw-r--r--coreutils/uname.c2
-rw-r--r--coreutils/uniq.c4
-rw-r--r--coreutils/usleep.c2
-rw-r--r--coreutils/uudecode.c2
-rw-r--r--coreutils/uuencode.c2
-rw-r--r--coreutils/wc.c2
-rw-r--r--coreutils/whoami.c2
34 files changed, 40 insertions, 42 deletions
diff --git a/coreutils/basename.c b/coreutils/basename.c
index 78265a5..ac371d2 100644
--- a/coreutils/basename.c
+++ b/coreutils/basename.c
@@ -60,6 +60,6 @@ extern int basename_main(int argc, char **argv)
s[m-n] = '\0';
}
printf("%s\n", s);
- exit(TRUE);
+ return(TRUE);
}
diff --git a/coreutils/cat.c b/coreutils/cat.c
index 561b24f..8004434 100644
--- a/coreutils/cat.c
+++ b/coreutils/cat.c
@@ -61,7 +61,7 @@ extern int cat_main(int argc, char **argv)
}
print_file(file);
}
- exit(TRUE);
+ return(TRUE);
}
/*
diff --git a/coreutils/cut.c b/coreutils/cut.c
index 89a934e..7b183e8 100644
--- a/coreutils/cut.c
+++ b/coreutils/cut.c
@@ -307,7 +307,7 @@ int cut_main(int argc, char **argv)
cut();
}
- exit(exit_status);
+ return(exit_status);
}
/* cut - extract columns from a file or stdin. Author: Michael J. Holme
diff --git a/coreutils/date.c b/coreutils/date.c
index 8e584ce..9e8e3f3 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -273,6 +273,5 @@ int date_main(int argc, char **argv)
strftime(t_buff, 200, date_fmt, &tm_time);
printf("%s\n", t_buff);
- exit(TRUE);
-
+ return(TRUE);
}
diff --git a/coreutils/df.c b/coreutils/df.c
index 07e61d8..ba3227f 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -108,7 +108,7 @@ extern int df_main(int argc, char **argv)
endmntent(mountTable);
}
- exit(TRUE);
+ return(TRUE);
}
/*
diff --git a/coreutils/dirname.c b/coreutils/dirname.c
index ce3cd6f..847842e 100644
--- a/coreutils/dirname.c
+++ b/coreutils/dirname.c
@@ -45,5 +45,5 @@ extern int dirname_main(int argc, char **argv)
if (s && *s)
*s = '\0';
printf("%s\n", (s)? *argv : ".");
- exit(TRUE);
+ return(TRUE);
}
diff --git a/coreutils/du.c b/coreutils/du.c
index 9c69997..b8e296d 100644
--- a/coreutils/du.c
+++ b/coreutils/du.c
@@ -181,10 +181,10 @@ int du_main(int argc, char **argv)
}
}
- exit(0);
+ return(0);
}
-/* $Id: du.c,v 1.19 2000/05/10 05:05:45 erik Exp $ */
+/* $Id: du.c,v 1.20 2000/06/19 17:25:39 andersen Exp $ */
/*
Local Variables:
c-file-style: "linux"
diff --git a/coreutils/echo.c b/coreutils/echo.c
index b31f222..4659e4b 100644
--- a/coreutils/echo.c
+++ b/coreutils/echo.c
@@ -96,7 +96,7 @@ echo_main(int argc, char** argv)
if (! nflag)
putchar('\n');
fflush(stdout);
- exit( 0);
+ return( 0);
}
/*-
diff --git a/coreutils/head.c b/coreutils/head.c
index f4ebe05..f42f483 100644
--- a/coreutils/head.c
+++ b/coreutils/head.c
@@ -109,7 +109,7 @@ int head_main(int argc, char **argv)
}
}
}
- exit(0);
+ return(0);
}
-/* $Id: head.c,v 1.10 2000/05/12 19:41:47 erik Exp $ */
+/* $Id: head.c,v 1.11 2000/06/19 17:25:39 andersen Exp $ */
diff --git a/coreutils/hostid.c b/coreutils/hostid.c
index 9e503e5..f1010a6 100644
--- a/coreutils/hostid.c
+++ b/coreutils/hostid.c
@@ -26,5 +26,5 @@
extern int hostid_main(int argc, char **argv)
{
printf("%lx\n", gethostid());
- exit(TRUE);
+ return(TRUE);
}
diff --git a/coreutils/id.c b/coreutils/id.c
index 23bbc16..69dfe26 100644
--- a/coreutils/id.c
+++ b/coreutils/id.c
@@ -89,7 +89,7 @@ extern int id_main(int argc, char **argv)
my_getpwnam(user), user, my_getgrnam(group), group);
- exit(0);
+ return(0);
}
diff --git a/coreutils/ln.c b/coreutils/ln.c
index 3714822..2233a1d 100644
--- a/coreutils/ln.c
+++ b/coreutils/ln.c
@@ -136,7 +136,7 @@ extern int ln_main(int argc, char **argv)
exit FALSE;
}
}
- exit TRUE;
+ return( TRUE);
}
/*
diff --git a/coreutils/logname.c b/coreutils/logname.c
index 7c6153f..4b4483c 100644
--- a/coreutils/logname.c
+++ b/coreutils/logname.c
@@ -42,5 +42,5 @@ extern int logname_main(int argc, char **argv)
exit(TRUE);
}
fprintf(stderr, "no login name\n");
- exit(FALSE);
+ return(FALSE);
}
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c
index 9664986..b18c949 100644
--- a/coreutils/mkdir.c
+++ b/coreutils/mkdir.c
@@ -112,5 +112,5 @@ extern int mkdir_main(int argc, char **argv)
argc--;
argv++;
}
- exit TRUE;
+ return( TRUE);
}
diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c
index 46b1343..f701a97 100644
--- a/coreutils/mkfifo.c
+++ b/coreutils/mkfifo.c
@@ -65,7 +65,6 @@ extern int mkfifo_main(int argc, char **argv)
if (mkfifo(*argv, mode) < 0) {
perror("mkfifo");
exit(255);
- } else {
- exit(TRUE);
}
+ return(TRUE);
}
diff --git a/coreutils/mknod.c b/coreutils/mknod.c
index 8f411a3..ac96817 100644
--- a/coreutils/mknod.c
+++ b/coreutils/mknod.c
@@ -98,6 +98,6 @@ int mknod_main(int argc, char **argv)
if (mknod(argv[0], mode, dev) != 0)
fatalError("%s: %s\n", argv[0], strerror(errno));
- exit (TRUE);
+ return (TRUE);
}
diff --git a/coreutils/pwd.c b/coreutils/pwd.c
index 146ef33..87553b3 100644
--- a/coreutils/pwd.c
+++ b/coreutils/pwd.c
@@ -34,5 +34,5 @@ extern int pwd_main(int argc, char **argv)
fatalError("pwd: %s\n", strerror(errno));
printf("%s\n", buf);
- exit(TRUE);
+ return(TRUE);
}
diff --git a/coreutils/rm.c b/coreutils/rm.c
index b1cda3a..2067d87 100644
--- a/coreutils/rm.c
+++ b/coreutils/rm.c
@@ -112,5 +112,5 @@ extern int rm_main(int argc, char **argv)
}
}
}
- exit(TRUE);
+ return(TRUE);
}
diff --git a/coreutils/rmdir.c b/coreutils/rmdir.c
index 61d7f2a..0751808 100644
--- a/coreutils/rmdir.c
+++ b/coreutils/rmdir.c
@@ -44,5 +44,5 @@ extern int rmdir_main(int argc, char **argv)
exit(FALSE);
}
}
- exit(TRUE);
+ return(TRUE);
}
diff --git a/coreutils/sleep.c b/coreutils/sleep.c
index 13f07c0..c7ab32d 100644
--- a/coreutils/sleep.c
+++ b/coreutils/sleep.c
@@ -39,6 +39,6 @@ extern int sleep_main(int argc, char **argv)
if (sleep(atoi(*(++argv))) != 0) {
perror("sleep");
exit(FALSE);
- } else
- exit(TRUE);
+ }
+ return(TRUE);
}
diff --git a/coreutils/sort.c b/coreutils/sort.c
index 1edc7d1..93062fa 100644
--- a/coreutils/sort.c
+++ b/coreutils/sort.c
@@ -301,7 +301,7 @@ int sort_main(int argc, char **argv)
list_release(&list);
}
- exit(0);
+ return(0);
}
-/* $Id: sort.c,v 1.16 2000/05/12 19:41:47 erik Exp $ */
+/* $Id: sort.c,v 1.17 2000/06/19 17:25:40 andersen Exp $ */
diff --git a/coreutils/sync.c b/coreutils/sync.c
index 33c7922..db35d72 100644
--- a/coreutils/sync.c
+++ b/coreutils/sync.c
@@ -33,5 +33,5 @@ extern int sync_main(int argc, char **argv)
#endif
);
}
- exit(sync());
+ return(sync());
}
diff --git a/coreutils/tail.c b/coreutils/tail.c
index 2027d92..3189d20 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -400,7 +400,7 @@ extern int tail_main(int argc, char **argv)
exit_status |= tail_file(argv[i], n_units);
}
- exit(exit_status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
+ return(exit_status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
diff --git a/coreutils/tee.c b/coreutils/tee.c
index a78edc0..c9b5410 100644
--- a/coreutils/tee.c
+++ b/coreutils/tee.c
@@ -130,7 +130,7 @@ int tee_main(int argc, char **argv)
/* Don't bother to close files Exit does that
* automagically, so we can save a few bytes */
/* free(FileList); */
- exit(0);
+ return(0);
}
-/* $Id: tee.c,v 1.10 2000/05/12 19:41:47 erik Exp $ */
+/* $Id: tee.c,v 1.11 2000/06/19 17:25:40 andersen Exp $ */
diff --git a/coreutils/test.c b/coreutils/test.c
index 0a16e93..36da4db 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -235,7 +235,7 @@ test_main(int argc, char** argv)
if (*t_wp != NULL && *++t_wp != NULL)
syntax(*t_wp, "unknown operand");
- exit( res);
+ return( res);
}
static void
diff --git a/coreutils/touch.c b/coreutils/touch.c
index 1364bb7..f52bb02 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -81,5 +81,5 @@ extern int touch_main(int argc, char **argv)
argv++;
}
- exit(TRUE);
+ return(TRUE);
}
diff --git a/coreutils/tty.c b/coreutils/tty.c
index 3a318eb..f3c7fb7 100644
--- a/coreutils/tty.c
+++ b/coreutils/tty.c
@@ -46,5 +46,5 @@ extern int tty_main(int argc, char **argv)
else
puts("not a tty");
}
- exit(isatty(0) ? TRUE : FALSE);
+ return(isatty(0) ? TRUE : FALSE);
}
diff --git a/coreutils/uname.c b/coreutils/uname.c
index 981ac69..b7c88ec 100644
--- a/coreutils/uname.c
+++ b/coreutils/uname.c
@@ -156,7 +156,7 @@ int uname_main(int argc, char **argv)
print_element(PRINT_MACHINE, name.machine);
print_element(PRINT_PROCESSOR, processor);
- exit(TRUE);
+ return(TRUE);
}
/* If the name element set in MASK is selected for printing in `toprint',
diff --git a/coreutils/uniq.c b/coreutils/uniq.c
index 0cccbd5..64acf04 100644
--- a/coreutils/uniq.c
+++ b/coreutils/uniq.c
@@ -184,7 +184,7 @@ int uniq_main(int argc, char **argv)
subject_last(&s);
subject_study(&s);
- exit(0);
+ return(0);
}
-/* $Id: uniq.c,v 1.10 2000/05/12 19:41:47 erik Exp $ */
+/* $Id: uniq.c,v 1.11 2000/06/19 17:25:40 andersen Exp $ */
diff --git a/coreutils/usleep.c b/coreutils/usleep.c
index 34008a6..da6cca9 100644
--- a/coreutils/usleep.c
+++ b/coreutils/usleep.c
@@ -38,5 +38,5 @@ extern int usleep_main(int argc, char **argv)
}
usleep(atoi(*(++argv))); /* return void */
- exit(TRUE);
+ return(TRUE);
}
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c
index 4216e33..752497c 100644
--- a/coreutils/uudecode.c
+++ b/coreutils/uudecode.c
@@ -346,5 +346,5 @@ int uudecode_main (int argc,
}
while (optind < argc);
}
- exit(exit_status);
+ return(exit_status);
}
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c
index 91136b3..97801aa 100644
--- a/coreutils/uuencode.c
+++ b/coreutils/uuencode.c
@@ -240,5 +240,5 @@ int uuencode_main (int argc,
errorMsg("Write error\n");
exit FALSE;
}
- exit TRUE;
+ return( TRUE);
}
diff --git a/coreutils/wc.c b/coreutils/wc.c
index 57bc713..bad03f7 100644
--- a/coreutils/wc.c
+++ b/coreutils/wc.c
@@ -166,5 +166,5 @@ int wc_main(int argc, char **argv)
print_counts(total_lines, total_words, total_chars,
max_length, "total");
}
- exit(TRUE);
+ return(TRUE);
}
diff --git a/coreutils/whoami.c b/coreutils/whoami.c
index da58479..950f52f 100644
--- a/coreutils/whoami.c
+++ b/coreutils/whoami.c
@@ -45,5 +45,5 @@ extern int whoami_main(int argc, char **argv)
}
fprintf(stderr, "%s: cannot find username for UID %u\n", argv[0],
(unsigned) uid);
- exit(FALSE);
+ return(FALSE);
}