+# ifdef PTW32_VERSION
+ /* In pthreads-win32, pthread_t is a struct with a pointer field 'p' and
+ other fields. */
+# define gl_thread_self() \
+ (pthread_in_use () ? pthread_self () : gl_null_thread)
+# define gl_thread_self_pointer() \
+ (pthread_in_use () ? pthread_self ().p : NULL)
+extern const gl_thread_t gl_null_thread;
+# else
+# define gl_thread_self() \
+ (pthread_in_use () ? (void *) pthread_self () : NULL)
+# define gl_thread_self_pointer() \
+ gl_thread_self ()
+# endif