[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: test-lock compilation failure on mingw
From: |
Bruno Haible |
Subject: |
Re: test-lock compilation failure on mingw |
Date: |
Thu, 9 Jun 2011 12:51:59 +0200 |
User-agent: |
KMail/1.9.9 |
Paul Eggert wrote:
> isn't there another problem here? thread.h assumes
> that NULL is an 'int', which surely isn't a portable assumption.
> Here's a proposed patch:
>
> diff --git a/lib/glthread/thread.h b/lib/glthread/thread.h
> index 5d72040..b52646d 100644
> --- a/lib/glthread/thread.h
> +++ b/lib/glthread/thread.h
> @@ -322,7 +322,7 @@ typedef int gl_thread_t;
> # define glthread_create(THREADP, FUNC, ARG) ENOSYS
> # define glthread_sigmask(HOW, SET, OSET) 0
> # define glthread_join(THREAD, RETVALP) 0
> -# define gl_thread_self() NULL
> +# define gl_thread_self() 0
> # define gl_thread_exit(RETVAL) 0
> # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0
Indeed. I'm squeezing this in:
--- lib/glthread/thread.h.orig Thu Jun 9 12:49:02 2011
+++ lib/glthread/thread.h Thu Jun 9 12:48:53 2011
@@ -344,9 +344,9 @@
# define glthread_create(THREADP, FUNC, ARG) ENOSYS
# define glthread_sigmask(HOW, SET, OSET) 0
# define glthread_join(THREAD, RETVALP) 0
-# define gl_thread_self() NULL
+# define gl_thread_self() 0
# define gl_thread_self_pointer() \
- gl_thread_self ()
+ ((void *) gl_thread_self ())
# define gl_thread_exit(RETVAL) 0
# define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0
Thanks.
--
In memoriam Johanna Kirchner <http://en.wikipedia.org/wiki/Johanna_Kirchner>