From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15133 invoked by alias); 28 Jan 2009 14:26:10 -0000 Received: (qmail 15113 invoked by uid 22791); 28 Jan 2009 14:26:09 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 28 Jan 2009 14:26:02 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id CE90B3B4003C for ; Wed, 28 Jan 2009 14:25:59 +0000 (GMT) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NlTQl-9ZNvl0; Wed, 28 Jan 2009 14:25:58 +0000 (GMT) Received: (from bartv@localhost) by hermione.bartv.net (8.14.3/8.14.3/Submit) id n0SEPtUf023119; Wed, 28 Jan 2009 14:25:55 GMT Date: Wed, 28 Jan 2009 14:26:00 -0000 Message-Id: <200901281425.n0SEPtUf023119@hermione.bartv.net> From: Bart Veer To: ecos-patches@sourceware.org Subject: more main() fixes Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2009-01/txt/msg00027.txt.bz2 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 * 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 #include #include #include @@ -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 #include // Configuration header #include #include @@ -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 " " 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 #include // header for functions to test #include // 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;