Mercurial > ecos-v3_0-branch
changeset 1846:93cd84593c28
* io/fileio/tests/socket.c: Allow building without kernel config.
| author | jani |
|---|---|
| date | Wed, 17 Nov 2004 15:12:05 +0000 |
| parents | b2d28c01ca0a |
| children | a80eae1bfe75 |
| files | packages/io/fileio/current/ChangeLog packages/io/fileio/current/tests/socket.c |
| diffstat | 2 files changed, 20 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/io/fileio/current/ChangeLog +++ b/packages/io/fileio/current/ChangeLog @@ -1,3 +1,7 @@ +2004-11-17 Jani Monoses <jani@iv.ro> + + * tests/socket.c: Allow building without kernel config. + 2004-11-14 Andrew Lunn <andrew.lunn@ascom.ch> * tests/fileio1.c: Start the test using cyg_user_start so that
--- a/packages/io/fileio/current/tests/socket.c +++ b/packages/io/fileio/current/tests/socket.c @@ -53,6 +53,21 @@ // //========================================================================== +#include <pkgconf/system.h> +#include <pkgconf/isoinfra.h> + +#ifndef CYGINT_ISO_PTHREAD_IMPL +# define NA_MSG "POSIX threads needed to run test" +#elif !defined CYGPKG_NET +# define NA_MSG "NET package needed to run test" +#elif !defined CYGPKG_POSIX_SIGNALS +# define NA_MSG "POSIX signals package needed to run test" +#endif + +#include <cyg/infra/testcase.h> + +#ifndef NA_MSG + #include <pkgconf/hal.h> #include <pkgconf/kernel.h> #include <pkgconf/io_fileio.h> @@ -66,8 +81,6 @@ #include <cyg/infra/testcase.h> -#if defined(CYGPKG_NET) && defined(CYGPKG_POSIX) - #include <unistd.h> #include <fcntl.h> #include <sys/stat.h> @@ -342,7 +355,7 @@ int main( int argc, char **argv ) { CYG_TEST_INIT(); - CYG_TEST_NA("socket"); + CYG_TEST_NA(NA_MSG); } #endif
