Re: [Mingw-w64-public] [PATCH 2/2] Ensure wait timeouts are respected

2019-03-01 Thread Liu Hao
在 2019/3/2 1:16, LRN 写道: > On 01.03.2019 17:19, Liu Hao wrote: >> Wouldn't this be better, saving a call to `_pthread_get_tick_count()` ? >> >> >> (the compound assignment operator seems incorrect). >> > > New version is attached. > > > > +result = WaitForSingleObject ((HANDLE) handle,

Re: [Mingw-w64-public] [PATCH] Add Microsoft OLE DB driver for SQL server

2019-03-01 Thread Ruslan Garipov
> This can be verified by printing the size of the enclosing struct > using GCC with our header, then comparing it with the result using > MSVC and Microsoft header. Nifty :-) Actually I've believed that **declaration** of nested structures is just a declaration, and no code/data will be

Re: [Mingw-w64-public] [PATCH 2/2] Ensure wait timeouts are respected

2019-03-01 Thread LRN
On 01.03.2019 17:19, Liu Hao wrote: > Wouldn't this be better, saving a call to `_pthread_get_tick_count()` ? > > > (the compound assignment operator seems incorrect). > New version is attached. From 0d93a97765716b5b642bf39663c5162af3f8ebf5 Mon Sep 17 00:00:00 2001 From:

Re: [Mingw-w64-public] [PATCH 2/2] Ensure wait timeouts are respected

2019-03-01 Thread LRN
On 01.03.2019 17:19, Liu Hao wrote: > 在 2019/3/1 19:08, LRN 写道: >> New version is attached. >> > >> >> +result = WaitForMultipleObjects ((DWORD) count, (HANDLE *) handles, >> all, (DWORD) wait_time); >> +current_time = _pthread_get_tick_count (); >> +if (current_time >= end_time ||

Re: [Mingw-w64-public] [PATCH] Add Microsoft OLE DB driver for SQL server

2019-03-01 Thread Liu Hao
在 2019/3/1 15:14, Ruslan Garipov 写道: >> It looks like we have ended up in a bug there > > I don't know :-(  To summarize: MSVC, Intel C++ and GCC on Microsoft > Windows fail to compile that sample C code.  But clang for Microsoft > Windows does compile the code (just like GCC for Linux-based

Re: [Mingw-w64-public] [PATCH 2/2] Ensure wait timeouts are respected

2019-03-01 Thread Liu Hao
在 2019/3/1 19:08, LRN 写道: > New version is attached. > > > +result = WaitForMultipleObjects ((DWORD) count, (HANDLE *) handles, all, > (DWORD) wait_time); > +current_time = _pthread_get_tick_count (); > +if (current_time >= end_time || result != WAIT_TIMEOUT) > + break;

Re: [Mingw-w64-public] [PATCH 1/2] Round up when converting nanoseconds to milliseconds

2019-03-01 Thread Liu Hao
在 2019/3/1 19:08, LRN 写道: > > New version is attached. > > > OK, pushed this one. -- Best regards, LH_Mouse ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Re: [Mingw-w64-public] [PATCH] Remove support for --disable-secure-api.

2019-03-01 Thread Jacek Caban
On 28/02/2019 21:23, Martin Storsjö wrote: On Thu, 28 Feb 2019, Liu Hao wrote: 在 2019/2/28 22:57, Jacek Caban 写道: It could be useful a long time ago for avoiding using APIs that were new and not always present back then. Also, back then, most compatibility functions that we have now were

Re: [Mingw-w64-public] [PATCH 2/2] Ensure wait timeouts are respected

2019-03-01 Thread LRN
On 01.03.2019 9:13, Liu Hao wrote: > 在 2019/3/1 下午1:34, LRN 写道: >> On 01.03.2019 5:53, Liu Hao wrote: >> >> GetTickCount64() then, i guess? >> > > `GetTIckCount64()` for Vista and above or `QueryPerformanceCounter()` > for XP. I really don't care about XP, since MSYS2 has officially dropped > XP

Re: [Mingw-w64-public] [PATCH 1/2] Round up when converting nanoseconds to milliseconds

2019-03-01 Thread LRN
On 01.03.2019 5:48, Liu Hao wrote: > 在 2019/3/1 上午2:09, LRN 写道: >> If the caller provides ts_nsec in struct timespec, >> we lose precision when converting that time to milliseconds >> for our WaitFor*() calls. Make sure we round *up* when doing that >> conversion, as otherwise the wait time will