]> Savannah Git Hosting - gnulib/maint-tools.git/commitdiff
test-programs: Update rwlock-type/.
authorBruno Haible <bruno@clisp.org>
Wed, 7 Aug 2024 22:34:11 +0000 (00:34 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 7 Aug 2024 22:34:11 +0000 (00:34 +0200)
test-programs/rwlock-type/test-pthread-rwlock-type.c

index 31ae957dfb21e2a3bc67a2da87b79fad07c82145..0ba330c89cdf2ec4f00aa6612d1f8c3a8658e32a 100644 (file)
@@ -57,7 +57,7 @@ get_effective_type (pthread_rwlock_t *lock)
 int
 main ()
 {
-#if __GLIBC__ >= 2
+#if __GLIBC__ >= 2 && defined __linux__
 
   /* Find the effective type of a PREFER_READER lock.  */
   const char *type_p_reader;
@@ -117,7 +117,7 @@ main ()
     type_def = get_effective_type (&lock);
   }
 
-#if __GLIBC__ >= 2
+#if __GLIBC__ >= 2 && defined __linux__
   printf ("PREFER_READER               -> type = %s\n", type_p_reader);
   printf ("PREFER_WRITER               -> type = %s\n", type_p_writer);
   printf ("PREFER_WRITER_NONRECURSIVE  -> type = %s\n", type_p_writer_nonrec);
@@ -125,7 +125,7 @@ main ()
 #endif
   printf ("Default                     -> type = %s\n", type_def);
 
-#if __GLIBC__ >= 2
+#if __GLIBC__ >= 2 && defined __linux__
   ASSERT (strcmp (type_default, type_def) == 0);
 #endif