This patch fixes up the tests in language/c/libc/i18n to cope with configurations that do not use main().
Bart 2009-01-26 Jonathan Larmour <[email protected]> * tests/ctype.c: Allow to run if CYGPKG_LIBC_STARTUP isn't there. * tests/i18nmb.c: Ditto. * tests/setlocale.c: Ditto. Index: tests/ctype.c =================================================================== RCS file: /cvs/ecos/ecos/packages/language/c/libc/i18n/current/tests/ctype.c,v retrieving revision 1.3 diff -u -p -r1.3 ctype.c --- tests/ctype.c 23 May 2002 23:07:07 -0000 1.3 +++ tests/ctype.c 28 Jan 2009 14:25:03 -0000 @@ -50,6 +50,7 @@ // INCLUDES +#include <pkgconf/system.h> #include <stdlib.h> #include <ctype.h> #include <cyg/infra/testcase.h> @@ -57,8 +58,12 @@ // FUNCTIONS +#ifndef CYGPKG_LIBC_STARTUP +void cyg_user_start(void) +#else int main( int argc, char *argv[] ) +#endif { int c; // character we use as a parameter Index: tests/i18nmb.c =================================================================== RCS file: /cvs/ecos/ecos/packages/language/c/libc/i18n/current/tests/i18nmb.c,v retrieving revision 1.5 diff -u -p -r1.5 i18nmb.c --- tests/i18nmb.c 3 Aug 2005 20:53:09 -0000 1.5 +++ tests/i18nmb.c 28 Jan 2009 14:25:21 -0000 @@ -50,6 +50,7 @@ // INCLUDES +#include <pkgconf/system.h> #include <pkgconf/libc_i18n.h> // Configuration header #include <stdlib.h> #include <locale.h> @@ -59,8 +60,12 @@ // FUNCTIONS +#ifndef CYGPKG_LIBC_STARTUP +void cyg_user_start(void) +#else int main( int argc, char *argv[] ) +#endif { #ifdef CYGFUN_LIBC_I18N_LOCALE_C_JIS @@ -668,6 +673,4 @@ main( int argc, char *argv[] ) CYG_TEST_FINISH( "Finished tests from testcase " __FILE__ " for C library " "<stdlib.h> multibyte character functions" ); - return 0; - } Index: tests/setlocale.c =================================================================== RCS file: /cvs/ecos/ecos/packages/language/c/libc/i18n/current/tests/setlocale.c,v retrieving revision 1.3 diff -u -p -r1.3 setlocale.c --- tests/setlocale.c 23 May 2002 23:07:07 -0000 1.3 +++ tests/setlocale.c 28 Jan 2009 14:25:34 -0000 @@ -50,6 +50,7 @@ // INCLUDES +#include <pkgconf/system.h> #include <locale.h> // header for functions to test #include <cyg/infra/testcase.h> // Testcase API @@ -68,8 +69,12 @@ my_strcmp(const char *s1, const char *s2 return (*s1 - *s2); } // my_strcmp() +#ifndef CYGPKG_LIBC_STARTUP +void cyg_user_start(void) +#else int main( int argc, char *argv[] ) +#endif { char *str;
