[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#8270) win32: fix conversion error



--f46d0444813d6e6086052274a949
Content-Type: text/plain; charset=UTF-8

Sorry! I did indeed meant to change just the windows part, for some reason
I thought it was already ifdeffed that part.
https://github.com/nice-software/lmdb/commit/42577fe173923c1166f8382a53523a31479f9d43

This is the right patch.

On Mon, Oct 19, 2015 at 1:43 PM, Hallvard Breien Furuseth <
h.b.furuseth@usit.uio.no> wrote:

> On 19. okt. 2015 08:57, nacho.resa@gmail.com wrote:
>
>> I do not understand, I tested also with mingw64 (...)
>>
>
> There's no LPTHREAD_START_ROUTINE type on non-Windows machines.
> You could replace 'start' with '(LPTHREAD_START_ROUTINE)(start)'
> in the _WIN32 variant of '#define THREAD_CREATE...'.
>
> However, it's still wrong to call a function via another prototype.
> Maybe that'd fall on 32-bit Windows or something, I don't know
> how LPTHREAD_START_ROUTINE is defined.  The safe way would be to
> give mdb_env_copythr() a prototype which does not need a cast.
> There is some code for that already. Maybe it can be improved.
>
> --
> Hallvard
>



-- 
Ignacio Casal Quinteiro

--f46d0444813d6e6086052274a949
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Sorry! I did indeed meant to change just the windows =
part, for some reason I thought it was already ifdeffed that part.<br><a hr=
ef=3D"https://github.com/nice-software/lmdb/commit/42577fe173923c1166f8382a=
53523a31479f9d43">https://github.com/nice-software/lmdb/commit/42577fe17392=
3c1166f8382a53523a31479f9d43</a><br><br></div>This is the right patch.<br><=
/div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Mon, Oct =
19, 2015 at 1:43 PM, Hallvard Breien Furuseth <span dir=3D"ltr">&lt;<a href=
=3D"mailto:h.b.furuseth@usit.uio.no"; target=3D"_blank">h.b.furuseth@usit.ui=
o.no</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 19. okt. 20=
15 08:57, <a href=3D"mailto:nacho.resa@gmail.com"; target=3D"_blank">nacho.r=
esa@gmail.com</a> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
I do not understand, I tested also with mingw64 (...)<br>
</blockquote>
<br>
There&#39;s no LPTHREAD_START_ROUTINE type on non-Windows machines.<br>
You could replace &#39;start&#39; with &#39;(LPTHREAD_START_ROUTINE)(start)=
&#39;<br>
in the _WIN32 variant of &#39;#define THREAD_CREATE...&#39;.<br>
<br>
However, it&#39;s still wrong to call a function via another prototype.<br>
Maybe that&#39;d fall on 32-bit Windows or something, I don&#39;t know<br>
how LPTHREAD_START_ROUTINE is defined.=C2=A0 The safe way would be to<br>
give mdb_env_copythr() a prototype which does not need a cast.<br>
There is some code for that already. Maybe it can be improved.<span class=
=3D"HOEnZb"><font color=3D"#888888"><br>
<br>
-- <br>
Hallvard<br>
</font></span></blockquote></div><br><br clear=3D"all"><br>-- <br><div clas=
s=3D"gmail_signature">Ignacio Casal Quinteiro</div>
</div>

--f46d0444813d6e6086052274a949--