[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] thread: pacify GCC on Solaris 10
From: |
Paul Eggert |
Subject: |
[PATCH] thread: pacify GCC on Solaris 10 |
Date: |
Mon, 5 Oct 2020 11:05:23 -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 | 8 ++++++++
lib/glthread/thread.h | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 4ec03efe4..875f3551a 100644
--- 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
diff --git a/lib/glthread/thread.h b/lib/glthread/thread.h
index 4077b4518..403de34b2 100644
--- a/lib/glthread/thread.h
+++ b/lib/glthread/thread.h
@@ -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
--
2.25.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] thread: pacify GCC on Solaris 10,
Paul Eggert <=