From edbd7f40326f88150d193d4ffb4fd858f45a0586 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Sat, 29 Oct 2005 21:08:08 +1000 Subject: [BUILTIN] Removed standalone/csh support from test Let's remove the support for standalone support from test for the same reason as printf. --- src/bltin/test.c | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'src/bltin') 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 #include -#include #include #include #include @@ -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. */ -- cgit 1.4.1