This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
yet another main() patch
- From: Bart Veer <bartv at ecoscentric dot com>
- To: ecos-patches at sourceware dot org
- Date: Wed, 28 Jan 2009 16:20:21 GMT
- Subject: yet another main() patch
This time for the setjmp test.
Bart
2009-01-28 Bart Veer <bartv@ecoscentric.com>
* tests/setjmp.c: allow to run if CYGPKG_LIBC_STARTUP is absent.
Index: tests/setjmp.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/language/c/libc/setjmp/current/tests/setjmp.c,v
retrieving revision 1.3
diff -u -p -r1.3 setjmp.c
--- tests/setjmp.c 23 May 2002 23:07:08 -0000 1.3
+++ tests/setjmp.c 28 Jan 2009 16:20:07 -0000
@@ -64,6 +64,7 @@
// INCLUDES
+#include <pkgconf/system.h>
#include <cyg/infra/testcase.h> // Test infrastructure header
#include <setjmp.h> // Header for what we're testing
@@ -86,8 +87,12 @@ test_fun( void )
} // test_fun();
+#ifndef CYGPKG_LIBC_STARTUP
+void cyg_user_start(void)
+#else
int
main( int argc, char *argv[] )
+#endif
{
static int static_i=0; // temporary variable
int j=0; // ditto