From nacho.resa@gmail.com Mon Oct 26 07:24:22 2015 From: nacho.resa@gmail.com To: openldap-bugs@openldap.org Subject: Re: (ITS#8270) win32: fix conversion error Date: Mon, 26 Oct 2015 07:24:20 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0023954130603880860==" --===============0023954130603880860== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable --f46d042184850fb03c0522fcd987 Content-Type: text/plain; charset=3DUTF-8 Howard, any chance to get this in or should I change something else? Also, any chance you could have a look at "ITS#8274"? Thanks in advance! On Tue, Oct 20, 2015 at 10:37 PM, Ignacio Casal Quinteiro < nacho.resa(a)gmail.com> wrote: > > > On Tue, Oct 20, 2015 at 10:09 PM, Howard Chu wrote: > >> nacho.resa(a)gmail.com wrote: >> >>> --047d7bb03a5ac118d20522842ead >>> Content-Type: text/plain; charset=3DUTF-8 >>> >>> So I took another closer look at this issue and I went for this possible >>> solution: >>> >>> https://github.com/nice-software/lmdb/commit/03987789735141dc68ae8b2d0e5a= d52d82cc80d0 >>> >> >> That looks OK. >> >> Basically it errors out because MSVC needs stdcall on that method. >>> >> >> You realize of course, that this change actually has no effect on the >> code here? stdcall uses Pascal argument order instead of C order but it's >> moot since the function only has 1 argument. >> > > yeah... but if this fixes the error I am fine with it, after all it end > ups being just a define > > >> >> >>> Cheers. >>> >>> On Mon, Oct 19, 2015 at 2:55 PM, Ignacio Casal Quinteiro < >>> nacho.resa(a)gmail.com> wrote: >>> >>> 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/42577fe173923c1166f8382a535= 23a31479f9d43 >>>> >>>> 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 >>>>> >>>>> >>>> >>>> >>>> -- >>>> Ignacio Casal Quinteiro >>>> >>>> >>> >>> >>> >> >> -- >> -- Howard Chu >> CTO, Symas Corp. http://www.symas.com >> Director, Highland Sun http://highlandsun.com/hyc/ >> Chief Architect, OpenLDAP http://www.openldap.org/project/ >> > > > > -- > Ignacio Casal Quinteiro > --=20 Ignacio Casal Quinteiro --f46d042184850fb03c0522fcd987 Content-Type: text/html; charset=3DUTF-8 Content-Transfer-Encoding: quoted-printable
Howard, any chance to get this in or should I ch= =3D ange something else?
Also, any chance you could have a look at &qu=3D ot;ITS#8274"?

Thanks in advance!

On Tue, Oct 20, 2015 at 10:37 PM= =3D , Ignacio Casal Quinteiro <nacho.resa(a)gmail.com> wrot= e:


On Tue, Oct 20, 201= 5 =3D at 10:09 PM, Howard Chu <hyc(a)symas.com> wrote:
=3D nacho.resa(a)gmail.com wrote:
--047d7bb03a5ac118d20522842ead
Content-Type: text/plain; charset=3D3DUTF-8

So I took another closer look at this issue and I went for this possible solution:
https://githu= b.=3D com/nice-software/lmdb/commit/03987789735141dc68ae8b2d0e5ad52d82cc80d0<=3D br>

That looks OK.

Basically it errors out because MSVC needs stdcall on that method.

You realize of course, that this change actually has no effect on the code =3D here? stdcall uses Pascal argument order instead of C order but it's mo=3D ot since the function only has 1 argument.

yeah... but if this fixes the error I am fine with =3D it, after all it end ups being just a define
=3DC2=3DA0


Cheers.

On Mon, Oct 19, 2015 at 2:55 PM, Ignacio Casal Quinteiro <
nacho.resa(a)= gmail.=3D com> wrote:

Sorry! I did indeed meant to change just the windows part, for some reason<=3D br> I thought it was already ifdeffed that part.

https://githu= b.=3D com/nice-software/lmdb/commit/42577fe173923c1166f8382a53523a31479f9d43<=3D br>
This is the right patch.

On Mon, Oct 19, 2015 at 1:43 PM, Hallvard Breien Furuseth <
h.b.furus= eth@=3D 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)=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






--
=3DC2=3DA0 -- Howard Chu
=3DC2=3DA0 CTO, Symas Corp.=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2= =3DA0 =3DC2=3DA0http://www.sym= as=3D .com
=3DC2=3DA0 Director, Highland Sun=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0http://highlandsun.com= /h=3D yc/
=3DC2=3DA0 Chief Architect, OpenLDAP=3DC2=3DA0 http://www.openldap.org/pro= je=3D ct/



--
Ignacio Casal Quinte= ir=3D o



--
Ignacio Casal Quinteiro
--f46d042184850fb03c0522fcd987-- --===============0023954130603880860==--