]> Savannah Git Hosting - gnulib.git/commitdiff
thread: pacify GCC on Solaris 10
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 5 Oct 2020 18:04:33 +0000 (11:04 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 5 Oct 2020 18:05:01 +0000 (11:05 -0700)
Problem reported by Kiyoshi KANAZAWA for grep (Bug#43666#29).
* lib/glthread/thread.h (gl_thread_self): Use ‘(pthread_t) 0’
instead of ‘(pthread_t) NULL’, to pacify GCC on Solaris 10
where pthread_t is unsigned int.

ChangeLog
lib/glthread/thread.h

index 4ec03efe43d8f953a1f80813515b8402e16835e3..875f3551ad714e7136555a3191201913b0b73e38 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2020-10-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+       thread: pacify GCC on Solaris 10
+       Problem reported by Kiyoshi KANAZAWA for grep (Bug#43666#29).
+       * lib/glthread/thread.h (gl_thread_self): Use ‘(pthread_t) 0’
+       instead of ‘(pthread_t) NULL’, to pacify GCC on Solaris 10
+       where pthread_t is unsigned int.
+
 2020-10-04  Paul Eggert  <eggert@cs.ucla.edu>
 
        c-stack: avoid AS_IF
index 4077b45187c3ec8eb4bdc3777903c70772c50633..403de34b2adba5a149b2f963aabb71a4bf0f247b 100644 (file)
@@ -232,7 +232,7 @@ extern const gl_thread_t gl_null_thread;
 extern const gl_thread_t gl_null_thread;
 # else
 #  define gl_thread_self() \
-     (pthread_in_use () ? pthread_self () : (pthread_t) NULL)
+     (pthread_in_use () ? pthread_self () : (pthread_t) 0)
 #  define gl_thread_self_pointer() \
      (pthread_in_use () ? (void *) pthread_self () : NULL)
 # endif