* lib/glthread/thread.h: Include <stdint.h>.
(gl_thread_self_pointer): Do the cast from pthread_t to 'void *' via
intptr_t.
* modules/thread (Depends-on): Add stdint.
+2023-06-25 Bruno Haible <bruno@clisp.org>
+
+ thread: Avoid compiler warnings on Solaris.
+ * lib/glthread/thread.h: Include <stdint.h>.
+ (gl_thread_self_pointer): Do the cast from pthread_t to 'void *' via
+ intptr_t.
+ * modules/thread (Depends-on): Add stdint.
+
2023-06-25 Bruno Haible <bruno@clisp.org>
strerrorname_np: Add support for Solaris 11.4/sparc.
# include <pthread.h>
+/* Get intptr_t. */
+# include <stdint.h>
+
/* On IRIX, pthread_atfork is declared in <unistd.h>, not in <pthread.h>. */
# if defined __sgi
# include <unistd.h>
# define gl_thread_self() \
(pthread_in_use () ? pthread_self () : (pthread_t) 0)
# define gl_thread_self_pointer() \
- (pthread_in_use () ? (void *) (pthread_t) pthread_self () : NULL)
+ (pthread_in_use () ? (void *) (intptr_t) (pthread_t) pthread_self () : NULL)
# endif
# define gl_thread_exit(RETVAL) \
(void) (pthread_in_use () ? (pthread_exit (RETVAL), 0) : 0)
Depends-on:
threadlib
+stdint
extern-inline
lock
windows-thread [test $gl_threads_api = windows]