daily update
[external/binutils.git] / sim / testsuite / sim / cris / c / rtsigprocmask1.c
index 0eee768..7cc7c5c 100644 (file)
@@ -13,6 +13,7 @@
 #include <unistd.h>
 #include <signal.h>
 #include <pthread.h>
+#include <errno.h>
 
 static void *
 process (void *arg)
@@ -38,8 +39,13 @@ main (void)
     abort ();
 
   /* An invalid parameter 1 should cause this to halt the simulator.  */
-  pthread_sigmask (SIG_BLOCK + SIG_UNBLOCK + SIG_SETMASK,
-                  NULL, &sigs);
+  retcode
+    = pthread_sigmask (SIG_BLOCK + SIG_UNBLOCK + SIG_SETMASK, NULL, &sigs);
+  /* Direct return of the error number; i.e. not using -1 and errno,
+     is the actual documented behavior.  */
+  if (retcode == ENOSYS)
+    printf ("ENOSYS\n");
+
   printf ("xyzzy\n");
   return 0;
 }