diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-20 14:36:56 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-20 14:36:56 +0000 |
commit | bd83c8ab8d8c65c3a18f449ede7ba2abef6d1c33 (patch) | |
tree | 0d2a84cb3f0ff31372af99337ec596b7f10c07a6 /libstdc++-v3/configure | |
parent | 960a9b56d6ddfdfa9f6ec747b263e8a6dec80bcd (diff) | |
download | gcc-bd83c8ab8d8c65c3a18f449ede7ba2abef6d1c33.tar.gz |
PR libstdc++/55741
* acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Check for Sleep.
* config.h.in: Regenerate.
* configure: Regenerate.
* src/c++11/thread.cc (__sleep_for): Use Sleep if available.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194635 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/configure')
-rwxr-xr-x | libstdc++-v3/configure | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 1e7c2937524..9e8360200b4 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -19900,6 +19900,35 @@ $as_echo "#define HAVE_USLEEP 1" >>confdefs.h $as_echo "$ac_has_usleep" >&6; } fi + if test x"$ac_has_nanosleep$ac_has_sleep" = x"nono"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Sleep" >&5 +$as_echo_n "checking for Sleep... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <windows.h> +int +main () +{ +Sleep(1) + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_has_win32_sleep=yes +else + ac_has_win32_sleep=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test x"$ac_has_win32_sleep" = x"yes"; then + +$as_echo "#define HAVE_WIN32_SLEEP 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_win32_sleep" >&5 +$as_echo "$ac_has_win32_sleep" >&6; } + fi + CXXFLAGS="$ac_save_CXXFLAGS" |