summary refs log tree commit diff
path: root/src
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 /src
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 'src')
-rw-r--r--src/bltin/test.c32
1 files changed, 0 insertions, 32 deletions
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. */