]> Savannah Git Hosting - gnulib.git/commitdiff
lock tests: Skip test when no multithreading is enabled.
authorBruno Haible <bruno@clisp.org>
Sun, 15 Dec 2019 19:05:24 +0000 (20:05 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 15 Dec 2019 19:05:24 +0000 (20:05 +0100)
* tests/test-rwlock1.c: Skip the test when no multithreading is enabled.

ChangeLog
tests/test-rwlock1.c

index ab13542ec04d3653825e296e8efec9215ce3f3d7..39ba464ba3daf822729e1dcdd634e82cede03b72 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-12-15  Bruno Haible  <bruno@clisp.org>
+
+       lock tests: Skip test when no multithreading is enabled.
+       * tests/test-rwlock1.c: Skip the test when no multithreading is enabled.
+
 2019-12-14  Bruno Haible  <bruno@clisp.org>
 
        locale, duplocale, localename: Fix last patch.
index 097a60f95894d2409fc6eeafc52d2e3def48a550..ca87fea5272c766e048f7dd16ea3a02f126d3c8f 100644 (file)
@@ -21,6 +21,8 @@
 
 #include <config.h>
 
+#if USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS || USE_WINDOWS_THREADS
+
 #include "glthread/lock.h"
 
 #include <errno.h>
@@ -151,3 +153,18 @@ main ()
       sleep (1);
     }
 }
+
+#else
+
+/* No multithreading available.  */
+
+#include <stdio.h>
+
+int
+main ()
+{
+  fputs ("Skipping test: multithreading not enabled\n", stderr);
+  return 77;
+}
+
+#endif