summary refs log tree commit diff
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2005-10-29 21:08:08 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2005-10-29 21:40:05 +1000
commitedbd7f40326f88150d193d4ffb4fd858f45a0586 (patch)
tree06caef75363e6011901ce30bfe3f1d65b8181c2f
parent[SYSTEM] Added dummy strtod implementation (diff)
downloaddash-edbd7f40326f88150d193d4ffb4fd858f45a0586.tar.gz
dash-edbd7f40326f88150d193d4ffb4fd858f45a0586.zip
[BUILTIN] Removed standalone/csh support from test
Let's remove the support for standalone support from test for the same
reason as printf.
Diffstat (limited to '')
-rw-r--r--ChangeLog1
-rw-r--r--src/bltin/test.c32
2 files changed, 1 insertions, 32 deletions
diff --git a/ChangeLog b/ChangeLog
index 04fcd3a..91f92a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,7 @@
 	* Added default definition for SSIZE_MAX.
 	* Removed standalone/csh support from printf.
 	* Added dummy strtod implementation.
+	* Removed standalone/csh support from test.
 
 2005-10-26  Herbert Xu <herbert@gondor.apana.org.au>
 
diff --git a/src/bltin/test.c b/src/bltin/test.c
index c2e83ce..9b09094 100644
--- a/src/bltin/test.c
+++ b/src/bltin/test.c
@@ -12,7 +12,6 @@
 #include <sys/types.h>
 
 #include <ctype.h>
-#include <err.h>
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
@@ -153,38 +152,11 @@ static int equalf(const char *, const char *);
 static int test_st_mode(const struct stat64 *, int);
 static int bash_group_member(gid_t);
 
-#ifndef SHELL
-static void error(const char *, ...) __attribute__((__noreturn__));
-
-static void
-error(const char *msg, ...)
-{
-	va_list ap;
-
-	va_start(ap, msg);
-	verrx(2, msg, ap);
-	/*NOTREACHED*/
-	va_end(ap);
-}
-#endif
-
-#ifdef SHELL
-int testcmd(int, char **);
-
 int
 testcmd(int argc, char **argv)
-#else
-int main(int, char *[]);
-
-int
-main(int argc, char *argv[])
-#endif
 {
 	int res;
 
-#ifndef SHELL
-	setprogname(argv[0]);
-#endif
 	if (strcmp(argv[0], "[") == 0) {
 		if (strcmp(argv[--argc], "]"))
 			error("missing ]");
@@ -516,11 +488,7 @@ bash_group_member(gid_t gid)
 		return (1);
 
 	ngroups = getgroups(0, NULL);
-#ifdef SHELL
 	group_array = stalloc(ngroups * sizeof(gid_t));
-#else
-	group_array = alloca(ngroups * sizeof(gid_t));
-#endif
 	getgroups(ngroups, group_array);
 
 	/* Search through the list looking for GID. */
pan='3' class='logmsg'> 2017-07-24Autopickup ringsJune McEnroe 2017-07-24Name dogJune McEnroe 2017-07-23Add nethackrcJune McEnroe 2017-07-23Remove useless setuid in briJune McEnroe Don't you think it would be better if the setuid bit only gave you permission to do it and didn't do it for you? 2017-07-23Clean up hnel a tiny bitJune McEnroe 2017-07-21Set window size in hnelJune McEnroe 2017-07-21Add hnelJune McEnroe 2017-07-19chmod 600 in dtchJune McEnroe