Mercurial > ecos
changeset 2722:736e08f2890d
Update tests to work in configurations that do not use main()
| author | bartv |
|---|---|
| date | Wed, 28 Jan 2009 14:26:17 +0000 |
| parents | 96d09dbb245e |
| children | ceb6ac6f0ec1 |
| files | packages/language/c/libc/i18n/current/ChangeLog packages/language/c/libc/i18n/current/tests/ctype.c packages/language/c/libc/i18n/current/tests/i18nmb.c packages/language/c/libc/i18n/current/tests/setlocale.c |
| diffstat | 4 files changed, 21 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/language/c/libc/i18n/current/ChangeLog +++ b/packages/language/c/libc/i18n/current/ChangeLog @@ -1,3 +1,9 @@ +2009-01-26 Jonathan Larmour <jifl@eCosCentric.com> + + * tests/ctype.c: Allow to run if CYGPKG_LIBC_STARTUP isn't there. + * tests/i18nmb.c: Ditto. + * tests/setlocale.c: Ditto. + 2007-07-02 Gary Thomas <gary@mlbassoc.com> * src/locale.cxx: Add (char *) casts to make GCC/4.2.x happy.
--- a/packages/language/c/libc/i18n/current/tests/ctype.c +++ b/packages/language/c/libc/i18n/current/tests/ctype.c @@ -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
--- a/packages/language/c/libc/i18n/current/tests/i18nmb.c +++ b/packages/language/c/libc/i18n/current/tests/i18nmb.c @@ -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; - }
--- a/packages/language/c/libc/i18n/current/tests/setlocale.c +++ b/packages/language/c/libc/i18n/current/tests/setlocale.c @@ -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;
