diff packages/compat/posix/current/tests/timer1.c @ 177:4c750ce71ae3

Merge from eCos master repository on 2001-08-10-19:22:57-BST
author jlarmour
date Fri, 10 Aug 2001 19:27:55 +0000
parents eb9fd8c04db3
children e0c0827131d1
line wrap: on
line diff
--- a/packages/compat/posix/current/tests/timer1.c
+++ b/packages/compat/posix/current/tests/timer1.c
@@ -23,7 +23,7 @@
 //                                                                          
 // The Initial Developer of the Original Code is Red Hat.                   
 // Portions created by Red Hat are                                          
-// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.                             
+// Copyright (C) 1998, 1999, 2000, 2001 Red Hat, Inc.      
 // All Rights Reserved.                                                     
 // -------------------------------------------                              
 //                                                                          
@@ -39,14 +39,30 @@
 //####DESCRIPTIONEND####
 //==========================================================================
 
+#include <cyg/infra/testcase.h>
+#include <pkgconf/posix.h>
+
+#ifndef CYGPKG_POSIX_SIGNALS
+#define NA_MSG "No POSIX signals"
+#elif !defined(CYGPKG_POSIX_TIMERS)
+#define NA_MSG "No POSIX timers"
+#endif
+
+#ifdef NA_MSG
+void
+cyg_start(void)
+{
+    CYG_TEST_INIT();
+    CYG_TEST_NA(NA_MSG);
+}
+#else
+
 #include <sys/types.h>
 #include <pthread.h>
 #include <signal.h>
 #include <semaphore.h>
 #include <time.h>
 
-#include <cyg/infra/testcase.h>
-
 //--------------------------------------------------------------------------
 // Thread stack.
 
@@ -312,5 +328,7 @@ int main(int argc, char **argv)
     CYG_TEST_PASS_FINISH( "timer1" );
 }
 
+#endif
+
 //--------------------------------------------------------------------------
 // end of timer1.c