renamed to .cc files to .c and made some little changes to make them
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Tue, 21 Oct 2003 13:54:59 +0000 (13:54 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Tue, 21 Oct 2003 13:54:59 +0000 (13:54 +0000)
compilable with C compilers

git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@268 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/tests/chrootsafe.c [moved from util-vserver/tests/chrootsafe.cc with 97% similarity]
util-vserver/tests/escaperoot.c [moved from util-vserver/tests/escaperoot.cc with 98% similarity]
util-vserver/tests/forkbomb.c [moved from util-vserver/tests/forkbomb.cc with 97% similarity]
util-vserver/tests/testipc.c [moved from util-vserver/tests/testipc.cc with 100% similarity]
util-vserver/tests/testlimit.c [moved from util-vserver/tests/testlimit.cc with 100% similarity]
util-vserver/tests/testopenf.c [moved from util-vserver/tests/testopenf.cc with 100% similarity]

similarity index 97%
rename from util-vserver/tests/chrootsafe.cc
rename to util-vserver/tests/chrootsafe.c
index 2739433..42ac5fb 100644 (file)
@@ -26,7 +26,6 @@
 #ifdef HAVE_CONFIG_H
 #  include <config.h>
 #endif
-#include "compat.h"
 
 #include <stdio.h>
 #include <string.h>
@@ -40,7 +39,7 @@
 #include "compat.h"
 #include "vserver.h"
 
-int main (int argc, char *argv[])
+int main (int UNUSED argc, char *argv[])
 {
        // This test must fail
        int fd = open ("/",O_RDONLY);
similarity index 98%
rename from util-vserver/tests/escaperoot.cc
rename to util-vserver/tests/escaperoot.c
index 1357229..4a64433 100644 (file)
@@ -104,7 +104,7 @@ static void dotest (void (*f)())
        }
 }
 
-int main (int argc, char *argv[])
+int main ()
 {
        dotest (test1);
        dotest (test2);
similarity index 97%
rename from util-vserver/tests/forkbomb.cc
rename to util-vserver/tests/forkbomb.c
index a877624..af18b3f 100644 (file)
@@ -25,7 +25,7 @@
 #include <unistd.h>
 #include <stdio.h>
 
-enum MODE {MODE_SLEEP,MODE_LOOP,MODE_FORK, MODE_FORKSHELL};
+typedef enum {MODE_SLEEP,MODE_LOOP,MODE_FORK, MODE_FORKSHELL} MODE;
 
 
 static void forkbomb_userfork (MODE mode)