Mercurial > ecos
changeset 2724:9ab1839abc2c
The getenv test is N/A if the configuration does not have an environ
variable.
| author | bartv |
|---|---|
| date | Wed, 28 Jan 2009 14:50:20 +0000 |
| parents | ceb6ac6f0ec1 |
| children | fa083e5b947e |
| files | packages/language/c/libc/stdlib/current/ChangeLog packages/language/c/libc/stdlib/current/tests/getenv.c |
| diffstat | 2 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/language/c/libc/stdlib/current/ChangeLog +++ b/packages/language/c/libc/stdlib/current/ChangeLog @@ -1,3 +1,8 @@ +2009-01-28 Bart Veer <bartv@ecoscentric.com> + + * tests/getenv.c: N/A in configurations which do not provide + environ. + 2009-01-26 Jonathan Larmour <jifl@eCosCentric.com> * tests/abs.c: Allow to run if CYGPKG_LIBC_STARTUP isn't there.
--- a/packages/language/c/libc/stdlib/current/tests/getenv.c +++ b/packages/language/c/libc/stdlib/current/tests/getenv.c @@ -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
