From nacho.resa@gmail.com Mon Oct 19 12:55:47 2015 From: nacho.resa@gmail.com To: openldap-bugs@openldap.org Subject: Re: (ITS#8270) win32: fix conversion error Date: Mon, 19 Oct 2015 12:55:46 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7891987346436600084==" --===============7891987346436600084== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable --f46d0444813d6e6086052274a949 Content-Type: text/plain; charset=3DUTF-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/42577fe173923c1166f8382a53523a31= 479f9d43 This is the right patch. On Mon, Oct 19, 2015 at 1:43 PM, Hallvard Breien Furuseth < h.b.furuseth(a)usit.uio.no> wrote: > On 19. okt. 2015 08:57, nacho.resa(a)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 > --=20 Ignacio Casal Quinteiro --f46d0444813d6e6086052274a949 Content-Type: text/html; charset=3DUTF-8 Content-Transfer-Encoding: quoted-printable
Sorry! I did indeed meant to change just the windows = =3D part, for some reason I thought it was already ifdeffed that part.
https://github.com/nice-software/lmdb/commit/42577fe17392=3D 3c1166f8382a53523a31479f9d43

This is the right patch.
<=3D /div>

On Mon, Oc= t =3D 19, 2015 at 1:43 PM, Hallvard Breien Furuseth <h.b.furuseth(a)u= sit.ui=3D o.no> wrote:
On 19. okt. 20=3D 15 08:57, nac= ho.r=3D esa(a)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)=3D '
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.=3DC2=3DA0 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-- --===============7891987346436600084==--