This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix getenv.c test


There is no point in testing getenv() if the configuration does not
provide an environ variable.

Bart

2009-01-28  Bart Veer  <bartv@ecoscentric.com>

	* tests/getenv.c: N/A in configurations which do not provide
	environ.

Index: tests/getenv.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/language/c/libc/stdlib/current/tests/getenv.c,v
retrieving revision 1.4
diff -u -p -r1.4 getenv.c
--- tests/getenv.c	28 Jan 2009 14:46:57 -0000	1.4
+++ tests/getenv.c	28 Jan 2009 14:49:27 -0000
@@ -54,6 +54,14 @@
 #include <stdlib.h>                 // Main header for stdlib functions
 #include <cyg/infra/testcase.h>     // Testcase API
 
+#ifdef CYGPKG_ISOINFRA
+# include <pkgconf/isoinfra.h>
+#endif
+#if !defined(CYGINT_ISO_ENVIRON) || (CYGINT_ISO_ENVIRON == 0)
+# define N_A_MSG "There is no implementation of the environ variable"
+#endif
+
+#ifndef N_A_MSG
 // GLOBALS
 
 extern char **environ;              // Standard environment definition
@@ -145,4 +153,13 @@ main( int argc, char *argv[] )
 
 } // main()
 
+#else // N_A_MSG
+externC void
+cyg_start( void )
+{
+    CYG_TEST_INIT();
+    CYG_TEST_NA( N_A_MSG);
+}
+#endif
+
 // EOF getenv.c


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]