http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55741
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-12-20 12:59:08 UTC --- (In reply to comment #5) > (In reply to comment #4) > > The point of http://gcc.gnu.org/viewcvs?view=revision&revision=193769 was > > that > > std::this_thread::sleep_for() is always available, even without > > --enable-libstdcxx-time=yes, so the default configuration needs to > > bootstrap. > > Well, patch has one issue about used type. Sleep expects 'unsigned long' as > argument. Ah thanks, I didn't know what type DWORD is. > Rest of suggested patch works. Great, thanks. So if I change the type to unsigned long and commit it, can I say you tested it? I don't like committing changes I can't test myself! Or if you want to commit it then it's pre-approved by me. > The reason I mentioned --enable > option is that nanosleep isn't detected proper by configure test in case that > nanosleep is a function provided by POSIX-library pthread. This is the same on all platforms. I would like to revisit that for GCC 4.9 but for 4.8 I just want std::this_thread::sleep_for() to work, even if it uses a low resolution sleep function. The __sleep_for function is in the .so and takes units of seconds and nanoseconds, so if we enable nanosleep automatically in 4.9 then code compiled with 4.8 and linked to libstdc++.so from 4.9 will get the nanosleep-capable version of __sleep_for() without needing to be recompiled.