public inbox for ecos-patches@sourceware.org
 help / color / mirror / Atom feed
* fix getenv.c test
@ 2009-01-28 14:50 Bart Veer
  0 siblings, 0 replies; only message in thread
From: Bart Veer @ 2009-01-28 14:50 UTC (permalink / raw)
  To: ecos-patches

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-28 14:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-28 14:50 fix getenv.c test Bart Veer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).