This patch fixes two of the infrastructure tests to work in
configurations that do not have main() as an entry point.

Bart

2009-01-26  Jonathan Larmour  <[email protected]>

        * tests/diag_sprintf1.c: Rename main() to cyg_user_start so this
        works in all configs.
        * tests/diag_sprintf2.c: Ditto.

Index: tests/diag_sprintf1.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/infra/current/tests/diag_sprintf1.c,v
retrieving revision 1.1
diff -u -p -r1.1 diag_sprintf1.c
--- tests/diag_sprintf1.c       9 Feb 2005 10:19:58 -0000       1.1
+++ tests/diag_sprintf1.c       28 Jan 2009 12:35:52 -0000
@@ -240,8 +241,7 @@ static void test(CYG_ADDRWORD data)
 
 } // test()
 
-int
-main(int argc, char *argv[])
+void cyg_user_start(void)
 {
     CYG_TEST_INIT();
 
@@ -250,8 +250,6 @@ main(int argc, char *argv[])
     CYG_TEST_INFO("These test individual features separately");
 
     test(0);
-
-    return 0;
-} // main()
+} // cyg_user_start()
 
 // EOF diag_sprintf1.c
Index: tests/diag_sprintf2.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/infra/current/tests/diag_sprintf2.c,v
retrieving revision 1.1
diff -u -p -r1.1 diag_sprintf2.c
--- tests/diag_sprintf2.c       9 Feb 2005 10:19:58 -0000       1.1
+++ tests/diag_sprintf2.c       28 Jan 2009 12:36:22 -0000
@@ -143,8 +144,8 @@ test( CYG_ADDRWORD data )
 
 } // test()
 
-int
-main(int argc, char *argv[])
+void
+cyg_user_start(void)
 {
     CYG_TEST_INIT();
 
@@ -153,8 +154,6 @@ main(int argc, char *argv[])
     CYG_TEST_INFO("These test combinations of diag_sprintf() features");
 
     test(0);
-
-    return 0;
-} // main()
+} // cyg_user_start()
 
 // EOF diag_sprintf2.c

Reply via email to